Title: [180963] trunk/Source

Diff

Modified: trunk/Source/WebCore/ChangeLog (180962 => 180963)


--- trunk/Source/WebCore/ChangeLog	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebCore/ChangeLog	2015-03-04 00:10:08 UTC (rev 180963)
@@ -1,3 +1,13 @@
+2015-03-03  Chris Dumez  <cdu...@apple.com>
+
+        Access ApplicationCacheStorage global instance via singleton() static member function
+        https://bugs.webkit.org/show_bug.cgi?id=142239
+
+        Reviewed by Anders Carlsson.
+
+        Access ApplicationCacheStorage global instance via singleton() static
+        member function as per WebKit coding style.
+
 2015-03-03  Anders Carlsson  <ander...@apple.com>
 
         Try to fix the build.

Modified: trunk/Source/WebCore/loader/appcache/ApplicationCache.cpp (180962 => 180963)


--- trunk/Source/WebCore/loader/appcache/ApplicationCache.cpp	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCache.cpp	2015-03-04 00:10:08 UTC (rev 180963)
@@ -91,7 +91,7 @@
         ASSERT(resource->type() & ApplicationCacheResource::Master);
         
         // Add the resource to the storage.
-        cacheStorage().store(resource.get(), this);
+        ApplicationCacheStorage::singleton().store(resource.get(), this);
     }
 
     m_estimatedSizeInStorage += resource->estimatedSizeInStorage();
@@ -192,8 +192,10 @@
     
 void ApplicationCache::deleteCacheForOrigin(SecurityOrigin* origin)
 {
+    auto& cacheStorage = ApplicationCacheStorage::singleton();
+
     Vector<URL> urls;
-    if (!cacheStorage().getManifestURLs(&urls)) {
+    if (!cacheStorage.getManifestURLs(&urls)) {
         LOG_ERROR("Failed to retrieve ApplicationCache manifest URLs");
         return;
     }
@@ -203,11 +205,11 @@
     size_t count = urls.size();
     for (size_t i = 0; i < count; ++i) {
         if (protocolHostAndPortAreEqual(urls[i], originURL)) {
-            ApplicationCacheGroup* group = cacheStorage().findInMemoryCacheGroup(urls[i]);
+            ApplicationCacheGroup* group = cacheStorage.findInMemoryCacheGroup(urls[i]);
             if (group)
                 group->makeObsolete();
             else
-                cacheStorage().deleteCacheGroup(urls[i]);
+                cacheStorage.deleteCacheGroup(urls[i]);
         }
     }
 }
@@ -216,17 +218,18 @@
 {
     HashSet<RefPtr<SecurityOrigin>> origins;
 
-    cacheStorage().getOriginsWithCache(origins);
+    auto& cacheStorage = ApplicationCacheStorage::singleton();
+    cacheStorage.getOriginsWithCache(origins);
     for (auto& origin : origins)
         deleteCacheForOrigin(origin.get());
 
-    cacheStorage().vacuumDatabaseFile();
+    cacheStorage.vacuumDatabaseFile();
 }
 
 int64_t ApplicationCache::diskUsageForOrigin(SecurityOrigin* origin)
 {
     int64_t usage = 0;
-    cacheStorage().calculateUsageForOrigin(origin, usage);
+    ApplicationCacheStorage::singleton().calculateUsageForOrigin(origin, usage);
     return usage;
 }
 

Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp (180962 => 180963)


--- trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp	2015-03-04 00:10:08 UTC (rev 180963)
@@ -87,7 +87,7 @@
     
     stopLoading();
     
-    cacheStorage().cacheGroupDestroyed(this);
+    ApplicationCacheStorage::singleton().cacheGroupDestroyed(this);
 }
     
 ApplicationCache* ApplicationCacheGroup::cacheForMainRequest(const ResourceRequest& request, DocumentLoader* documentLoader)
@@ -102,7 +102,7 @@
     if (documentLoader->frame() && documentLoader->frame()->page()->usesEphemeralSession())
         return 0;
 
-    if (ApplicationCacheGroup* group = cacheStorage().cacheGroupForURL(url)) {
+    if (ApplicationCacheGroup* group = ApplicationCacheStorage::singleton().cacheGroupForURL(url)) {
         ASSERT(group->newestCache());
         ASSERT(!group->isObsolete());
         
@@ -121,7 +121,7 @@
     if (url.hasFragmentIdentifier())
         url.removeFragmentIdentifier();
 
-    if (ApplicationCacheGroup* group = cacheStorage().fallbackCacheGroupForURL(url)) {
+    if (ApplicationCacheGroup* group = ApplicationCacheStorage::singleton().fallbackCacheGroupForURL(url)) {
         ASSERT(group->newestCache());
         ASSERT(!group->isObsolete());
 
@@ -175,7 +175,7 @@
             bool inStorage = resource->storageID();
             resource->addType(ApplicationCacheResource::Foreign);
             if (inStorage)
-                cacheStorage().storeUpdatedType(resource, mainResourceCache);
+                ApplicationCacheStorage::singleton().storeUpdatedType(resource, mainResourceCache);
 
             // Restart the current navigation from the top of the navigation algorithm, undoing any changes that were made
             // as part of the initial load.
@@ -196,7 +196,7 @@
     if (!protocolHostAndPortAreEqual(manifestURL, request.url()))
         return;
 
-    ApplicationCacheGroup* group = cacheStorage().findOrCreateCacheGroup(manifestURL);
+    ApplicationCacheGroup* group = ApplicationCacheStorage::singleton().findOrCreateCacheGroup(manifestURL);
 
     documentLoader->applicationCacheHost()->setCandidateApplicationCacheGroup(group);
     group->m_pendingMasterResourceLoaders.add(documentLoader);
@@ -409,7 +409,7 @@
         return;
 
     m_isObsolete = true;
-    cacheStorage().cacheGroupMadeObsolete(this);
+    ApplicationCacheStorage::singleton().cacheGroupMadeObsolete(this);
     ASSERT(!m_storageID);
 }
 
@@ -773,7 +773,7 @@
 {
     ASSERT(m_frame);
     ASSERT(m_cacheBeingUpdated);
-    m_frame->page()->chrome().client().reachedMaxAppCacheSize(cacheStorage().spaceNeeded(m_cacheBeingUpdated->estimatedSizeInStorage()));
+    m_frame->page()->chrome().client().reachedMaxAppCacheSize(ApplicationCacheStorage::singleton().spaceNeeded(m_cacheBeingUpdated->estimatedSizeInStorage()));
     m_calledReachedMaxAppCacheSize = true;
     checkIfLoadIsComplete();
 }
@@ -797,7 +797,7 @@
 
 void ApplicationCacheGroup::recalculateAvailableSpaceInQuota()
 {
-    if (!cacheStorage().calculateRemainingSizeForOriginExcludingCache(m_origin.get(), m_newestCache.get(), m_availableSpaceInQuota)) {
+    if (!ApplicationCacheStorage::singleton().calculateRemainingSizeForOriginExcludingCache(m_origin.get(), m_newestCache.get(), m_availableSpaceInQuota)) {
         // Failed to determine what is left in the quota. Fallback to allowing anything.
         m_availableSpaceInQuota = ApplicationCacheStorage::noQuota();
     }
@@ -854,7 +854,7 @@
 
         // The storage could have been manually emptied by the user.
         if (!m_storageID)
-            cacheStorage().storeNewestCache(this);
+            ApplicationCacheStorage::singleton().storeNewestCache(this);
 
         postListenerTask(ApplicationCacheHost::NOUPDATE_EVENT, m_associatedDocumentLoaders);
         break;
@@ -879,7 +879,7 @@
             // the maximum size. In such a case, m_manifestResource may be 0, as
             // the manifest was already set on the newest cache object.
             ASSERT(m_cacheBeingUpdated->manifestResource());
-            ASSERT(cacheStorage().isMaximumSizeReached());
+            ASSERT(ApplicationCacheStorage::singleton().isMaximumSizeReached());
             ASSERT(m_calledReachedMaxAppCacheSize);
         }
 
@@ -888,15 +888,16 @@
         // If we exceeded the origin quota while downloading we can request a quota
         // increase now, before we attempt to store the cache.
         int64_t totalSpaceNeeded;
-        if (!cacheStorage().checkOriginQuota(this, oldNewestCache.get(), m_cacheBeingUpdated.get(), totalSpaceNeeded))
+        auto& cacheStorage = ApplicationCacheStorage::singleton();
+        if (!cacheStorage.checkOriginQuota(this, oldNewestCache.get(), m_cacheBeingUpdated.get(), totalSpaceNeeded))
             didReachOriginQuota(totalSpaceNeeded);
 
         ApplicationCacheStorage::FailureReason failureReason;
         setNewestCache(m_cacheBeingUpdated.release());
-        if (cacheStorage().storeNewestCache(this, oldNewestCache.get(), failureReason)) {
+        if (cacheStorage.storeNewestCache(this, oldNewestCache.get(), failureReason)) {
             // New cache stored, now remove the old cache.
             if (oldNewestCache)
-                cacheStorage().remove(oldNewestCache.get());
+                cacheStorage.remove(oldNewestCache.get());
 
             // Fire the final progress event.
             ASSERT(m_progressDone == m_progressTotal);

Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp (180962 => 180963)


--- trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp	2015-03-04 00:10:08 UTC (rev 180963)
@@ -1584,7 +1584,7 @@
 {
 }
 
-ApplicationCacheStorage& cacheStorage()
+ApplicationCacheStorage& ApplicationCacheStorage::singleton()
 {
     static NeverDestroyed<ApplicationCacheStorage> storage;
     return storage;

Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.h (180962 => 180963)


--- trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.h	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.h	2015-03-04 00:10:08 UTC (rev 180963)
@@ -53,6 +53,8 @@
         DiskOrOperationFailure
     };
 
+    WEBCORE_EXPORT static ApplicationCacheStorage& singleton();
+
     WEBCORE_EXPORT void setCacheDirectory(const String&);
     const String& cacheDirectory() const;
     
@@ -101,6 +103,7 @@
     static int64_t noQuota() { return std::numeric_limits<int64_t>::max(); }
 private:
     ApplicationCacheStorage();
+
     PassRefPtr<ApplicationCache> loadCache(unsigned storageID);
     ApplicationCacheGroup* loadCacheGroup(const URL& manifestURL);
     
@@ -150,8 +153,6 @@
     friend class WTF::NeverDestroyed<ApplicationCacheStorage>;
 };
 
-WEBCORE_EXPORT ApplicationCacheStorage& cacheStorage();
-
 } // namespace WebCore
 
 #endif // ApplicationCacheStorage_h

Modified: trunk/Source/WebCore/testing/Internals.cpp (180962 => 180963)


--- trunk/Source/WebCore/testing/Internals.cpp	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebCore/testing/Internals.cpp	2015-03-04 00:10:08 UTC (rev 180963)
@@ -302,7 +302,7 @@
         page->mainFrame().editor().toggleContinuousSpellChecking();
     if (page->mainFrame().editor().isOverwriteModeEnabled())
         page->mainFrame().editor().toggleOverwriteModeEnabled();
-    cacheStorage().setDefaultOriginQuota(ApplicationCacheStorage::noQuota());
+    ApplicationCacheStorage::singleton().setDefaultOriginQuota(ApplicationCacheStorage::noQuota());
 #if ENABLE(VIDEO)
     MediaSessionManager::sharedManager().resetRestrictions();
 #endif
@@ -1928,7 +1928,7 @@
     Document* document = contextDocument();
     if (!document)
         return;
-    cacheStorage().storeUpdatedQuotaForOrigin(document->securityOrigin(), quota);
+    ApplicationCacheStorage::singleton().storeUpdatedQuotaForOrigin(document->securityOrigin(), quota);
 }
 
 void Internals::registerURLSchemeAsBypassingContentSecurityPolicy(const String& scheme)

Modified: trunk/Source/WebKit/mac/ChangeLog (180962 => 180963)


--- trunk/Source/WebKit/mac/ChangeLog	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebKit/mac/ChangeLog	2015-03-04 00:10:08 UTC (rev 180963)
@@ -1,3 +1,13 @@
+2015-03-03  Chris Dumez  <cdu...@apple.com>
+
+        Access ApplicationCacheStorage global instance via singleton() static member function
+        https://bugs.webkit.org/show_bug.cgi?id=142239
+
+        Reviewed by Anders Carlsson.
+
+        Access ApplicationCacheStorage global instance via singleton() static
+        member function as per WebKit coding style.
+
 2015-03-02  Jer Noble  <jer.no...@apple.com>
 
         [WK1][WK2][Mac] Fullscreen animation is incorrect when page is scaled.

Modified: trunk/Source/WebKit/mac/Misc/WebCache.mm (180962 => 180963)


--- trunk/Source/WebKit/mac/Misc/WebCache.mm	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebKit/mac/Misc/WebCache.mm	2015-03-04 00:10:08 UTC (rev 180963)
@@ -119,7 +119,7 @@
     [WebView _setCacheModel:cacheModel];
 
     // Empty the application cache.
-    WebCore::cacheStorage().empty();
+    WebCore::ApplicationCacheStorage::singleton().empty();
 
     // Empty the Cross-Origin Preflight cache
     WebCore::CrossOriginPreflightResultCache::singleton().empty();

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebApplicationCache.mm (180962 => 180963)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebApplicationCache.mm	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebApplicationCache.mm	2015-03-04 00:10:08 UTC (rev 180963)
@@ -53,7 +53,7 @@
     
     SQLiteDatabaseTracker::setClient(WebSQLiteDatabaseTrackerClient::sharedWebSQLiteDatabaseTrackerClient());
 
-    cacheStorage().setCacheDirectory([NSString _webkit_localCacheDirectoryWithBundleIdentifier:bundleIdentifier]);
+    ApplicationCacheStorage::singleton().setCacheDirectory([NSString _webkit_localCacheDirectoryWithBundleIdentifier:bundleIdentifier]);
     
     initialized = YES;
 }
@@ -61,23 +61,24 @@
 
 + (long long)maximumSize
 {
-    return cacheStorage().maximumSize();
+    return ApplicationCacheStorage::singleton().maximumSize();
 }
 
 + (void)setMaximumSize:(long long)size
 {
-    cacheStorage().deleteAllEntries();
-    cacheStorage().setMaximumSize(size);
+    auto& cacheStorage = ApplicationCacheStorage::singleton();
+    cacheStorage.deleteAllEntries();
+    cacheStorage.setMaximumSize(size);
 }
 
 + (long long)defaultOriginQuota
 {
-    return cacheStorage().defaultOriginQuota();
+    return ApplicationCacheStorage::singleton().defaultOriginQuota();
 }
 
 + (void)setDefaultOriginQuota:(long long)size
 {
-    cacheStorage().setDefaultOriginQuota(size);
+    ApplicationCacheStorage::singleton().setDefaultOriginQuota(size);
 }
 
 + (long long)diskUsageForOrigin:(WebSecurityOrigin *)origin
@@ -98,7 +99,7 @@
 + (NSArray *)originsWithCache
 {
     HashSet<RefPtr<SecurityOrigin>> coreOrigins;
-    cacheStorage().getOriginsWithCache(coreOrigins);
+    ApplicationCacheStorage::singleton().getOriginsWithCache(coreOrigins);
     
     NSMutableArray *webOrigins = [[[NSMutableArray alloc] initWithCapacity:coreOrigins.size()] autorelease];
     

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm (180962 => 180963)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebApplicationCacheQuotaManager.mm	2015-03-04 00:10:08 UTC (rev 180963)
@@ -50,7 +50,7 @@
 - (unsigned long long)usage
 {
     long long usage;
-    if (cacheStorage().calculateUsageForOrigin([_origin _core], usage))
+    if (ApplicationCacheStorage::singleton().calculateUsageForOrigin([_origin _core], usage))
         return usage;
     return 0;
 }
@@ -58,14 +58,14 @@
 - (unsigned long long)quota
 {
     long long quota;
-    if (cacheStorage().calculateQuotaForOrigin([_origin _core], quota))
+    if (ApplicationCacheStorage::singleton().calculateQuotaForOrigin([_origin _core], quota))
         return quota;
     return 0;
 }
 
 - (void)setQuota:(unsigned long long)quota
 {
-    cacheStorage().storeUpdatedQuotaForOrigin([_origin _core], quota);
+    ApplicationCacheStorage::singleton().storeUpdatedQuotaForOrigin([_origin _core], quota);
 }
 
 @end

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (180962 => 180963)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2015-03-04 00:10:08 UTC (rev 180963)
@@ -740,7 +740,7 @@
 
     NSString* cacheDir = [NSString _webkit_localCacheDirectoryWithBundleIdentifier:appName];
 
-    cacheStorage().setCacheDirectory(cacheDir);
+    ApplicationCacheStorage::singleton().setCacheDirectory(cacheDir);
     initialized = YES;
 }
 

Modified: trunk/Source/WebKit/win/ChangeLog (180962 => 180963)


--- trunk/Source/WebKit/win/ChangeLog	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebKit/win/ChangeLog	2015-03-04 00:10:08 UTC (rev 180963)
@@ -1,3 +1,13 @@
+2015-03-03  Chris Dumez  <cdu...@apple.com>
+
+        Access ApplicationCacheStorage global instance via singleton() static member function
+        https://bugs.webkit.org/show_bug.cgi?id=142239
+
+        Reviewed by Anders Carlsson.
+
+        Access ApplicationCacheStorage global instance via singleton() static
+        member function as per WebKit coding style.
+
 2015-03-01  Chris Dumez  <cdu...@apple.com>
 
         Make NotificationCenter / Notification suspendable

Modified: trunk/Source/WebKit/win/WebApplicationCache.cpp (180962 => 180963)


--- trunk/Source/WebKit/win/WebApplicationCache.cpp	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebKit/win/WebApplicationCache.cpp	2015-03-04 00:10:08 UTC (rev 180963)
@@ -95,14 +95,15 @@
     if (!size)
         return E_POINTER;
 
-    *size = WebCore::cacheStorage().maximumSize();
+    *size = WebCore::ApplicationCacheStorage::singleton().maximumSize();
     return S_OK;
 }
 
 HRESULT WebApplicationCache::setMaximumSize(long long size)
 {
-    WebCore::cacheStorage().deleteAllEntries();
-    WebCore::cacheStorage().setMaximumSize(size);
+    auto& cacheStorage = WebCore::ApplicationCacheStorage::singleton();
+    cacheStorage.deleteAllEntries();
+    cacheStorage.setMaximumSize(size);
     return S_OK;
 }
 
@@ -111,13 +112,13 @@
     if (!quota)
         return E_POINTER;
 
-    *quota = WebCore::cacheStorage().defaultOriginQuota();
+    *quota = WebCore::ApplicationCacheStorage::singleton().defaultOriginQuota();
     return S_OK;
 }
 
 HRESULT WebApplicationCache::setDefaultOriginQuota(long long quota)
 {
-    WebCore::cacheStorage().setDefaultOriginQuota(quota);
+    WebCore::ApplicationCacheStorage::singleton().setDefaultOriginQuota(quota);
     return S_OK;
 }
 
@@ -160,7 +161,7 @@
         return E_POINTER;
 
     HashSet<RefPtr<WebCore::SecurityOrigin>> coreOrigins;
-    WebCore::cacheStorage().getOriginsWithCache(coreOrigins);
+    WebCore::ApplicationCacheStorage::singleton().getOriginsWithCache(coreOrigins);
 
     RetainPtr<CFMutableArrayRef> arrayItem = adoptCF(CFArrayCreateMutable(kCFAllocatorDefault, coreOrigins.size(), &MarshallingHelpers::kIUnknownArrayCallBacks));
 

Modified: trunk/Source/WebKit/win/WebCache.cpp (180962 => 180963)


--- trunk/Source/WebKit/win/WebCache.cpp	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebKit/win/WebCache.cpp	2015-03-04 00:10:08 UTC (rev 180963)
@@ -213,7 +213,7 @@
     memoryCache.setDisabled(false);
 
     // Empty the application cache.
-    WebCore::cacheStorage().empty();
+    WebCore::ApplicationCacheStorage::singleton().empty();
 
     // Empty the Cross-Origin Preflight cache
     WebCore::CrossOriginPreflightResultCache::singleton().empty();

Modified: trunk/Source/WebKit/win/WebView.cpp (180962 => 180963)


--- trunk/Source/WebKit/win/WebView.cpp	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebKit/win/WebView.cpp	2015-03-04 00:10:08 UTC (rev 180963)
@@ -2702,7 +2702,7 @@
 #endif
 
     if (!path.isNull())
-        cacheStorage().setCacheDirectory(path);
+        ApplicationCacheStorage::singleton().setCacheDirectory(path);
 
     initialized = true;
 }

Modified: trunk/Source/WebKit2/ChangeLog (180962 => 180963)


--- trunk/Source/WebKit2/ChangeLog	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebKit2/ChangeLog	2015-03-04 00:10:08 UTC (rev 180963)
@@ -1,3 +1,13 @@
+2015-03-03  Chris Dumez  <cdu...@apple.com>
+
+        Access ApplicationCacheStorage global instance via singleton() static member function
+        https://bugs.webkit.org/show_bug.cgi?id=142239
+
+        Reviewed by Anders Carlsson.
+
+        Access ApplicationCacheStorage global instance via singleton() static
+        member function as per WebKit coding style.
+
 2015-03-03  Joseph Pecoraro  <pecor...@apple.com>
 
         Build Fix: Add fall back handling in postprocess script for missing/unknown platform name.

Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (180962 => 180963)


--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp	2015-03-04 00:10:08 UTC (rev 180963)
@@ -701,7 +701,7 @@
     process->send(Messages::WebProcess::SetQOS(webProcessLatencyQOS(), webProcessThroughputQOS()), 0);
 #endif
 #if PLATFORM(IOS)
-    cacheStorage().setDefaultOriginQuota(25ULL * 1024 * 1024);
+    ApplicationCacheStorage::singleton().setDefaultOriginQuota(25ULL * 1024 * 1024);
 #endif
 
     if (WebPreferences::anyPagesAreUsingPrivateBrowsing())

Modified: trunk/Source/WebKit2/WebProcess/ApplicationCache/WebApplicationCacheManager.cpp (180962 => 180963)


--- trunk/Source/WebKit2/WebProcess/ApplicationCache/WebApplicationCacheManager.cpp	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebKit2/WebProcess/ApplicationCache/WebApplicationCacheManager.cpp	2015-03-04 00:10:08 UTC (rev 180963)
@@ -55,7 +55,7 @@
 {
     HashSet<RefPtr<SecurityOrigin>> origins;
 
-    cacheStorage().getOriginsWithCache(origins);
+    ApplicationCacheStorage::singleton().getOriginsWithCache(origins);
 
     Vector<SecurityOriginData> identifiers;
     identifiers.reserveCapacity(origins.size());
@@ -89,7 +89,7 @@
 
 void WebApplicationCacheManager::setAppCacheMaximumSize(uint64_t size)
 {
-    cacheStorage().setMaximumSize(size);
+    ApplicationCacheStorage::singleton().setMaximumSize(size);
 }
 
 } // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (180962 => 180963)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2015-03-04 00:10:08 UTC (rev 180963)
@@ -374,19 +374,20 @@
 void InjectedBundle::setApplicationCacheOriginQuota(const String& originString, uint64_t bytes)
 {
     RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromString(originString);
-    cacheStorage().storeUpdatedQuotaForOrigin(origin.get(), bytes);
+    ApplicationCacheStorage::singleton().storeUpdatedQuotaForOrigin(origin.get(), bytes);
 }
 
 void InjectedBundle::resetApplicationCacheOriginQuota(const String& originString)
 {
     RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromString(originString);
-    cacheStorage().storeUpdatedQuotaForOrigin(origin.get(), cacheStorage().defaultOriginQuota());
+    auto& cacheStorage = ApplicationCacheStorage::singleton();
+    cacheStorage.storeUpdatedQuotaForOrigin(origin.get(), cacheStorage.defaultOriginQuota());
 }
 
 PassRefPtr<API::Array> InjectedBundle::originsWithApplicationCache()
 {
     HashSet<RefPtr<SecurityOrigin>> origins;
-    cacheStorage().getOriginsWithCache(origins);
+    ApplicationCacheStorage::singleton().getOriginsWithCache(origins);
 
     Vector<RefPtr<API::Object>> originIdentifiers;
     originIdentifiers.reserveInitialCapacity(origins.size());

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (180962 => 180963)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp	2015-03-04 00:10:08 UTC (rev 180963)
@@ -724,8 +724,9 @@
     if (WebPage::synchronousMessagesShouldSpinRunLoop())
         syncSendFlags |= IPC::SpinRunLoopWhileWaitingForReply;
 
+    auto& cacheStorage = ApplicationCacheStorage::singleton();
     int64_t currentQuota = 0;
-    if (!cacheStorage().calculateQuotaForOrigin(origin, currentQuota))
+    if (!cacheStorage.calculateQuotaForOrigin(origin, currentQuota))
         return;
 
     uint64_t newQuota = 0;
@@ -733,7 +734,7 @@
         Messages::WebPageProxy::ReachedApplicationCacheOriginQuota(origin->databaseIdentifier(), currentQuota, totalBytesNeeded),
         Messages::WebPageProxy::ReachedApplicationCacheOriginQuota::Reply(newQuota), m_page->pageID(), std::chrono::milliseconds::max(), syncSendFlags);
 
-    cacheStorage().storeUpdatedQuotaForOrigin(origin, newQuota);
+    cacheStorage.storeUpdatedQuotaForOrigin(origin, newQuota);
 }
 
 #if ENABLE(DASHBOARD_SUPPORT)

Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (180962 => 180963)


--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp	2015-03-04 00:08:34 UTC (rev 180962)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp	2015-03-04 00:10:08 UTC (rev 180963)
@@ -301,7 +301,7 @@
 #endif
 
     if (!parameters.applicationCacheDirectory.isEmpty())
-        cacheStorage().setCacheDirectory(parameters.applicationCacheDirectory);
+        ApplicationCacheStorage::singleton().setCacheDirectory(parameters.applicationCacheDirectory);
 
     m_diskCacheIsDisabledForTesting = parameters.shouldUseTestingNetworkSession;
     setCacheModel(static_cast<uint32_t>(parameters.cacheModel));
@@ -729,7 +729,7 @@
 void WebProcess::clearApplicationCache()
 {
     // Empty the application cache.
-    cacheStorage().empty();
+    ApplicationCacheStorage::singleton().empty();
 }
 
 static inline void addCaseFoldedCharacters(StringHasher& hasher, const String& string)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to