-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Allow quota to be set based on disk space #11569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow quota to be set based on disk space #11569
Conversation
EWS run on previous version of this PR (hash edb36dc) |
edb36dc
to
81de335
Compare
EWS run on previous version of this PR (hash 81de335) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me
81de335
to
691b3a9
Compare
EWS run on current version of this PR (hash 691b3a9) |
https://bugs.webkit.org/show_bug.cgi?id=253978 rdar://106769648 Reviewed by Geoffrey Garen. Make it possible to set origin quota based on disk space. This is achieved by letting client specify a originQuotaRatio, and using it to compute the quota: originQuota = totalDiskSpace * originQuotaRatio. If originQuotaRatio it is unset, we will use perOriginStorageQuota for quota. By default, originQuotaRatio is unset. Also, when quota is set using originQuotaRatio, quota increase will not be allowed (client will not receive delegate callback about quota is exceeded). To mitigate fingerprinting issue, StorageManager.estimate() might report a quota that is lower than actual qutoa when usage is small. Test: WKWebsiteDataStoreConfiguration.OriginQuotaRatio * Source/WTF/wtf/FileSystem.cpp: (WTF::FileSystemImpl::volumeCapacity): * Source/WTF/wtf/FileSystem.h: * Source/WTF/wtf/playstation/FileSystemPlayStation.cpp: (WTF::FileSystemImpl::volumeCapacity): * Source/WebKit/NetworkProcess/NetworkSession.cpp: (WebKit::createNetworkStorageManager): * Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp: (WebKit::NetworkSessionCreationParameters::encode const): (WebKit::NetworkSessionCreationParameters::decode): * Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h: * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp: (WebKit::NetworkStorageManager::create): (WebKit::NetworkStorageManager::NetworkStorageManager): (WebKit::NetworkStorageManager::originStorageManager): * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h: * Source/WebKit/NetworkProcess/storage/OriginStorageManager.cpp: (WebKit::OriginStorageManager::estimate): * Source/WebKit/NetworkProcess/storage/QuotaManager.cpp: (WebKit::QuotaManager::handleRequests): (WebKit::QuotaManager::reportedQuota const): * Source/WebKit/NetworkProcess/storage/QuotaManager.h: (WebKit::QuotaManager::create): (WebKit::QuotaManager::quota const): Deleted. * Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h: * Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm: (-[_WKWebsiteDataStoreConfiguration originQuotaRatio]): (-[_WKWebsiteDataStoreConfiguration setOriginQuotaRatio:]): * Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::parameters): * Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h: (WebKit::WebsiteDataStore::originQuotaRatio): * Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: (WebKit::WebsiteDataStoreConfiguration::copy const): * Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: (WebKit::WebsiteDataStoreConfiguration::originQuotaRatio const): (WebKit::WebsiteDataStoreConfiguration::setOriginQuotaRatio): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm: (-[WKWebsiteDataStoreMessageHandler userContentController:didReceiveScriptMessage:]): (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/261840@main
691b3a9
to
7bc1fa5
Compare
Committed 261840@main (7bc1fa5): https://commits.webkit.org/261840@main Reviewed commits have been landed. Closing PR #11569 and removing active labels. |
7bc1fa5
691b3a9