Delete ApplicationCache static member functions
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Apr 2015 21:00:19 +0000 (21:00 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Apr 2015 21:00:19 +0000 (21:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=143534

Reviewed by Tim Horton.

Source/WebCore:

* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::deleteCacheForOrigin): Deleted.
(WebCore::ApplicationCache::deleteAllCaches): Deleted.
(WebCore::ApplicationCache::diskUsageForOrigin): Deleted.
* loader/appcache/ApplicationCache.h:

Source/WebKit2:

* WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
(WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
(WebKit::WebApplicationCacheManager::deleteAllEntries):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::clearApplicationCacheForOrigin):
(WebKit::InjectedBundle::appCacheUsageForOrigin):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182565 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/loader/appcache/ApplicationCache.cpp
Source/WebCore/loader/appcache/ApplicationCache.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/ApplicationCache/WebApplicationCacheManager.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

index b653608..c00099e 100644 (file)
@@ -1,3 +1,16 @@
+2015-04-08  Anders Carlsson  <andersca@apple.com>
+
+        Delete ApplicationCache static member functions
+        https://bugs.webkit.org/show_bug.cgi?id=143534
+
+        Reviewed by Tim Horton.
+
+        * loader/appcache/ApplicationCache.cpp:
+        (WebCore::ApplicationCache::deleteCacheForOrigin): Deleted.
+        (WebCore::ApplicationCache::deleteAllCaches): Deleted.
+        (WebCore::ApplicationCache::diskUsageForOrigin): Deleted.
+        * loader/appcache/ApplicationCache.h:
+
 2015-04-08  Alex Christensen  <achristensen@webkit.org>
 
         Block popups from content extensions.
index d8af68e..a13e690 100644 (file)
@@ -190,21 +190,6 @@ void ApplicationCache::clearStorageID()
         resource->clearStorageID();
 }
     
-void ApplicationCache::deleteCacheForOrigin(SecurityOrigin* origin)
-{
-    ApplicationCacheStorage::singleton().deleteCacheForOrigin(*origin);
-}
-
-void ApplicationCache::deleteAllCaches()
-{
-    ApplicationCacheStorage::singleton().deleteAllCaches();
-}
-
-int64_t ApplicationCache::diskUsageForOrigin(SecurityOrigin* origin)
-{
-    return ApplicationCacheStorage::singleton().diskUsageForOrigin(*origin);
-}
-
 #ifndef NDEBUG
 void ApplicationCache::dump()
 {
index 8f4b700..2c52b68 100644 (file)
@@ -48,9 +48,6 @@ class ApplicationCache : public RefCounted<ApplicationCache> {
 public:
     static Ref<ApplicationCache> create() { return adoptRef(*new ApplicationCache); }
     
-    WEBCORE_EXPORT static void deleteCacheForOrigin(SecurityOrigin*);
-    WEBCORE_EXPORT static void deleteAllCaches();
-
     ~ApplicationCache();
 
     void addResource(PassRefPtr<ApplicationCacheResource> resource);
@@ -90,8 +87,6 @@ public:
     
     static bool requestIsHTTPOrHTTPSGet(const ResourceRequest&);
 
-    WEBCORE_EXPORT static int64_t diskUsageForOrigin(SecurityOrigin*);
-    
     int64_t estimatedSizeInStorage() const { return m_estimatedSizeInStorage; }
 
 private:
index abafc43..844fa88 100644 (file)
@@ -1,3 +1,17 @@
+2015-04-08  Anders Carlsson  <andersca@apple.com>
+
+        Delete ApplicationCache static member functions
+        https://bugs.webkit.org/show_bug.cgi?id=143534
+
+        Reviewed by Tim Horton.
+
+        * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
+        (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
+        (WebKit::WebApplicationCacheManager::deleteAllEntries):
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::clearApplicationCacheForOrigin):
+        (WebKit::InjectedBundle::appCacheUsageForOrigin):
+
 2015-04-08  Enrica Casucci  <enrica@apple.com>
 
         32-bit build fix after r182554.
index 191d04d..9cc8e71 100644 (file)
@@ -78,13 +78,12 @@ void WebApplicationCacheManager::getApplicationCacheOrigins(uint64_t callbackID)
 
 void WebApplicationCacheManager::deleteEntriesForOrigin(const SecurityOriginData& originData)
 {
-    Ref<SecurityOrigin> origin(SecurityOrigin::create(originData.protocol, originData.host, originData.port));
-    ApplicationCache::deleteCacheForOrigin(&origin.get());
+    ApplicationCacheStorage::singleton().deleteCacheForOrigin(originData.securityOrigin());
 }
 
 void WebApplicationCacheManager::deleteAllEntries()
 {
-    ApplicationCache::deleteAllCaches();
+    ApplicationCacheStorage::singleton().deleteAllEntries();
 }
 
 void WebApplicationCacheManager::setAppCacheMaximumSize(uint64_t size)
index 20e7921..cc11318 100644 (file)
@@ -356,8 +356,7 @@ void InjectedBundle::clearApplicationCache()
 
 void InjectedBundle::clearApplicationCacheForOrigin(const String& originString)
 {
-    RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromString(originString);
-    ApplicationCache::deleteCacheForOrigin(origin.get());
+    ApplicationCacheStorage::singleton().deleteCacheForOrigin(SecurityOrigin::createFromString(originString));
 }
 
 void InjectedBundle::setAppCacheMaximumSize(uint64_t size)
@@ -367,8 +366,7 @@ void InjectedBundle::setAppCacheMaximumSize(uint64_t size)
 
 uint64_t InjectedBundle::appCacheUsageForOrigin(const String& originString)
 {
-    RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromString(originString);
-    return ApplicationCache::diskUsageForOrigin(origin.get());
+    return ApplicationCacheStorage::singleton().diskUsageForOrigin(SecurityOrigin::createFromString(originString));
 }
 
 void InjectedBundle::setApplicationCacheOriginQuota(const String& originString, uint64_t bytes)