2010-07-30 Joseph Pecoraro <joepeck@webkit.org>
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 31 Jul 2010 02:22:45 +0000 (02:22 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 31 Jul 2010 02:22:45 +0000 (02:22 +0000)
commitb00edc640c9f89e1abaf94faaa430777b9cbd08c
tree3e13edb60e14c77ad9dcc92ccdd738afea8f44f4
parent51fd483c9a16c44f818fdd63a6c241ab89e9a0bb
2010-07-30  Joseph Pecoraro  <joepeck@webkit.org>

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: https://svn.webkit.org/repository/webkit/trunk@64400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
46 files changed:
WebCore/ChangeLog
WebCore/WebCore.exp.in
WebCore/loader/EmptyClients.h
WebCore/loader/appcache/ApplicationCacheGroup.cpp
WebCore/loader/appcache/ApplicationCacheGroup.h
WebCore/loader/appcache/ApplicationCacheStorage.cpp
WebCore/loader/appcache/ApplicationCacheStorage.h
WebCore/page/ChromeClient.h
WebKit/ChangeLog
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/chromium/ChangeLog
WebKit/chromium/src/ChromeClientImpl.cpp
WebKit/chromium/src/ChromeClientImpl.h
WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
WebKit/efl/WebCoreSupport/ChromeClientEfl.h
WebKit/gtk/ChangeLog
WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
WebKit/haiku/ChangeLog
WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp
WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h
WebKit/mac/ChangeLog
WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m
WebKit/mac/Storage/WebDatabaseSecurityOrigin.h [new file with mode: 0644]
WebKit/mac/Storage/WebDatabaseSecurityOrigin.mm [new file with mode: 0644]
WebKit/mac/WebCoreSupport/WebApplicationCache.h
WebKit/mac/WebCoreSupport/WebApplicationCacheSecurityOrigin.h [new file with mode: 0644]
WebKit/mac/WebCoreSupport/WebApplicationCacheSecurityOrigin.mm [new file with mode: 0644]
WebKit/mac/WebCoreSupport/WebChromeClient.h
WebKit/mac/WebCoreSupport/WebChromeClient.mm
WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm [moved from WebKit/mac/Storage/WebSecurityOrigin.mm with 79% similarity]
WebKit/mac/WebCoreSupport/WebSecurityOriginInternal.h [moved from WebKit/mac/Storage/WebSecurityOriginInternal.h with 100% similarity]
WebKit/mac/WebCoreSupport/WebSecurityOriginPrivate.h [moved from WebKit/mac/Storage/WebSecurityOriginPrivate.h with 79% similarity]
WebKit/mac/WebView/WebUIDelegatePrivate.h
WebKit/qt/ChangeLog
WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
WebKit/qt/WebCoreSupport/ChromeClientQt.h
WebKit/win/ChangeLog
WebKit/win/WebCoreSupport/WebChromeClient.cpp
WebKit/win/WebCoreSupport/WebChromeClient.h
WebKit/wx/ChangeLog
WebKit/wx/WebKitSupport/ChromeClientWx.cpp
WebKit/wx/WebKitSupport/ChromeClientWx.h
WebKit2/ChangeLog
WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h