Title: [199798] trunk/Source/WebCore
Revision
199798
Author
[email protected]
Date
2016-04-20 16:49:20 -0700 (Wed, 20 Apr 2016)

Log Message

Get rid of a couple of uses of ApplicationCacheStorage::singleton()
https://bugs.webkit.org/show_bug.cgi?id=156818

Reviewed by Geoffrey Garen.

* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::addResource):
* loader/appcache/ApplicationCacheGroup.h:
(WebCore::ApplicationCacheGroup::storage):
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setApplicationCacheOriginQuota):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (199797 => 199798)


--- trunk/Source/WebCore/ChangeLog	2016-04-20 23:43:34 UTC (rev 199797)
+++ trunk/Source/WebCore/ChangeLog	2016-04-20 23:49:20 UTC (rev 199798)
@@ -1,3 +1,18 @@
+2016-04-20  Anders Carlsson  <[email protected]>
+
+        Get rid of a couple of uses of ApplicationCacheStorage::singleton()
+        https://bugs.webkit.org/show_bug.cgi?id=156818
+
+        Reviewed by Geoffrey Garen.
+
+        * loader/appcache/ApplicationCache.cpp:
+        (WebCore::ApplicationCache::addResource):
+        * loader/appcache/ApplicationCacheGroup.h:
+        (WebCore::ApplicationCacheGroup::storage):
+        * testing/Internals.cpp:
+        (WebCore::Internals::resetToConsistentState):
+        (WebCore::Internals::setApplicationCacheOriginQuota):
+
 2016-04-20  Brady Eidson  <[email protected]>
 
         Modern IDB (Workers): Introduce "IDBConnectionProxy" for future threading abstraction, and adopt it in IDBFactory.

Modified: trunk/Source/WebCore/loader/appcache/ApplicationCache.cpp (199797 => 199798)


--- trunk/Source/WebCore/loader/appcache/ApplicationCache.cpp	2016-04-20 23:43:34 UTC (rev 199797)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCache.cpp	2016-04-20 23:49:20 UTC (rev 199798)
@@ -91,7 +91,7 @@
         ASSERT(resource->type() & ApplicationCacheResource::Master);
         
         // Add the resource to the storage.
-        ApplicationCacheStorage::singleton().store(resource.get(), this);
+        m_group->storage().store(resource.get(), this);
     }
 
     m_estimatedSizeInStorage += resource->estimatedSizeInStorage();

Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.h (199797 => 199798)


--- trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.h	2016-04-20 23:43:34 UTC (rev 199797)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.h	2016-04-20 23:49:20 UTC (rev 199798)
@@ -63,7 +63,8 @@
     
     static void selectCache(Frame*, const URL& manifestURL);
     static void selectCacheWithoutManifestURL(Frame*);
-    
+
+    ApplicationCacheStorage& storage() { return m_storage; }
     const URL& manifestURL() const { return m_manifestURL; }
     const SecurityOrigin* origin() const { return m_origin.get(); }
     UpdateStatus updateStatus() const { return m_updateStatus; }

Modified: trunk/Source/WebCore/testing/Internals.cpp (199797 => 199798)


--- trunk/Source/WebCore/testing/Internals.cpp	2016-04-20 23:43:34 UTC (rev 199797)
+++ trunk/Source/WebCore/testing/Internals.cpp	2016-04-20 23:49:20 UTC (rev 199798)
@@ -398,7 +398,7 @@
     if (page.mainFrame().editor().isOverwriteModeEnabled())
         page.mainFrame().editor().toggleOverwriteModeEnabled();
     page.mainFrame().loader().clearTestingOverrides();
-    ApplicationCacheStorage::singleton().setDefaultOriginQuota(ApplicationCacheStorage::noQuota());
+    page.applicationCacheStorage().setDefaultOriginQuota(ApplicationCacheStorage::noQuota());
 #if ENABLE(VIDEO)
     PlatformMediaSessionManager::sharedManager().resetRestrictions();
     PlatformMediaSessionManager::sharedManager().setWillIgnoreSystemInterruptions(true);
@@ -2276,7 +2276,7 @@
     Document* document = contextDocument();
     if (!document)
         return;
-    ApplicationCacheStorage::singleton().storeUpdatedQuotaForOrigin(document->securityOrigin(), quota);
+    document->page()->applicationCacheStorage().storeUpdatedQuotaForOrigin(document->securityOrigin(), quota);
 }
 
 void Internals::registerURLSchemeAsBypassingContentSecurityPolicy(const String& scheme)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to