-
joepeck@webkit.org authored
Reviewed by David Kilzer. WebCore: 2010-07-30 Joseph Pecoraro <joepeck@webkit.org> Part 4 - Client Notification when the Quota is Reached Notify the WebKit client when the per-origin quota is reached via a delegate method reachedApplicationCacheOriginQuota. Call the delegate method when the quota is reached. * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::ApplicationCacheGroup): (WebCore::ApplicationCacheGroup::didFinishLoading): (WebCore::ApplicationCacheGroup::didReachOriginQuota): (WebCore::ApplicationCacheGroup::cacheUpdateFailedDueToOriginQuota): (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): (WebCore::ApplicationCacheGroup::scheduleReachedOriginQuotaCallback): * loader/appcache/ApplicationCacheGroup.h: Some minor refactoring to access more quota information without repeating code. Such as origin usage, and creating an origin record. * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::usageForOrigin): (WebCore::ApplicationCacheStorage::storeUpdatedQuotaForOrigin): (WebCore::ApplicationCacheStorage::store): (WebCore::ApplicationCacheStorage::ensureOriginRecord): * loader/appcache/ApplicationCacheStorage.h: Boilerplate. Exports and definition of the delegate method. * WebCore.OfflineWebApplications.exp: * loader/EmptyClients.h: (WebCore::EmptyChromeClient::reachedApplicationCacheOriginQuota): * page/ChromeClient.h: Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) https://bugs.webkit.org/show_bug.cgi?id=40627 WebKit: 2010-07-30 Joseph Pecoraro <joepeck@webkit.org> Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) https://bugs.webkit.org/show_bug.cgi?id=40627 * WebKit.xcodeproj/project.pbxproj: * efl/WebCoreSupport/ChromeClientEfl.cpp: (WebCore::ChromeClientEfl::reachedApplicationCacheOriginQuota): * efl/WebCoreSupport/ChromeClientEfl.h: WebKit/chromium: 2010-07-30 Joseph Pecoraro <joepeck@webkit.org> Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) https://bugs.webkit.org/show_bug.cgi?id=40627 * src/ChromeClientImpl.cpp: (WebKit::ChromeClientImpl::reachedApplicationCacheOriginQuota): * src/ChromeClientImpl.h: WebKit/gtk: 2010-07-30 Joseph Pecoraro <joepeck@webkit.org> Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) https://bugs.webkit.org/show_bug.cgi?id=40627 * WebCoreSupport/ChromeClientGtk.cpp: (WebKit::ChromeClient::reachedApplicationCacheOriginQuota): * WebCoreSupport/ChromeClientGtk.h: WebKit/haiku: 2010-07-30 Joseph Pecoraro <joepeck@webkit.org> Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) https://bugs.webkit.org/show_bug.cgi?id=40627 * WebCoreSupport/ChromeClientHaiku.cpp: (WebCore::ChromeClientWx::reachedApplicationCacheOriginQuota): * WebCoreSupport/ChromeClientHaiku.h: WebKit/mac: 2010-07-30 Joseph Pecoraro <joepeck@webkit.org> Part 4 - Client Notification when the Quota is Reached Notify the WebKit client when the per-origin quota is reached via a delegate method reachedApplicationCacheOriginQuota. Refactor the WebSecurityOrigin class to be generic enough to allow quota management of both Databases or Application Caches via subclasses. * Storage/WebDatabaseSecurityOrigin.h: Added. * Storage/WebDatabaseSecurityOrigin.mm: Added. (-[WebDatabaseSecurityOrigin quota]): (-[WebDatabaseSecurityOrigin setQuota:]): * WebCoreSupport/WebApplicationCacheSecurityOrigin.h: Added. * WebCoreSupport/WebApplicationCacheSecurityOrigin.mm: Added. (-[WebApplicationCacheSecurityOrigin quota]): (-[WebApplicationCacheSecurityOrigin setQuota:]): * Storage/WebSecurityOrigin.mm: Removed. (Moved to WebCoreSupport) * Storage/WebSecurityOriginPrivate.h: Removed. (Moved to WebCoreSupport) * WebCoreSupport/WebSecurityOrigin.mm: Added. (-[WebSecurityOrigin usage]): to be implemented by subclasses. (-[WebSecurityOrigin quota]): to be implemented by subclasses. (-[WebSecurityOrigin setQuota:]): to be implemented by subclasses. * WebCoreSupport/WebSecurityOriginInternal.h: Renamed from WebKit/mac/Storage/WebSecurityOriginInternal.h. * WebCoreSupport/WebSecurityOriginPrivate.h: Added. Turn the notification into a WebUI Delegate to call. Following the example of Databases. * DefaultDelegates/WebDefaultUIDelegate.m: (-[WebDefaultUIDelegate webView:exceededApplicationCacheOriginQuotaForSecurityOrigin:]): * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::exceededDatabaseQuota): use the Databases Security Origin subclass. (WebChromeClient::reachedApplicationCacheOriginQuota): use the Application Cache Security Origin subclass. * WebView/WebUIDelegatePrivate.h: Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) https://bugs.webkit.org/show_bug.cgi?id=40627 WebKit/qt: 2010-07-30 Joseph Pecoraro <joepeck@webkit.org> Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) https://bugs.webkit.org/show_bug.cgi?id=40627 * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::reachedApplicationCacheOriginQuota): * WebCoreSupport/ChromeClientQt.h: WebKit/win: 2010-07-30 Joseph Pecoraro <joepeck@webkit.org> Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) https://bugs.webkit.org/show_bug.cgi?id=40627 * WebCoreSupport/WebChromeClient.cpp: (WebChromeClient::reachedApplicationCacheOriginQuota): * WebCoreSupport/WebChromeClient.h: WebKit/wx: 2010-07-30 Joseph Pecoraro <joepeck@webkit.org> Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) https://bugs.webkit.org/show_bug.cgi?id=40627 * WebKitSupport/ChromeClientWx.cpp: (WebCore::ChromeClientWx::reachedApplicationCacheOriginQuota): * WebKitSupport/ChromeClientWx.h: WebKit2: 2010-07-30 Joseph Pecoraro <joepeck@webkit.org> Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) https://bugs.webkit.org/show_bug.cgi?id=40627 * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): * WebProcess/WebCoreSupport/WebChromeClient.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
263d1335