Title: [182559] trunk/Source/WebKit/win
- Revision
- 182559
- Author
- [email protected]
- Date
- 2015-04-08 12:28:34 -0700 (Wed, 08 Apr 2015)
Log Message
Add a WebApplicationCache::storage() and use it instead of the WebCore singleton
https://bugs.webkit.org/show_bug.cgi?id=143525
Reviewed by Antti Koivisto.
* WebApplicationCache.cpp:
(WebApplicationCache::storage):
(WebApplicationCache::maximumSize):
(WebApplicationCache::setMaximumSize):
(WebApplicationCache::defaultOriginQuota):
(WebApplicationCache::setDefaultOriginQuota):
(WebApplicationCache::diskUsageForOrigin):
(WebApplicationCache::deleteAllApplicationCaches):
(WebApplicationCache::deleteCacheForOrigin):
(WebApplicationCache::originsWithCache):
* WebApplicationCache.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit/win/ChangeLog (182558 => 182559)
--- trunk/Source/WebKit/win/ChangeLog 2015-04-08 18:44:58 UTC (rev 182558)
+++ trunk/Source/WebKit/win/ChangeLog 2015-04-08 19:28:34 UTC (rev 182559)
@@ -1,3 +1,22 @@
+2015-04-08 Anders Carlsson <[email protected]>
+
+ Add a WebApplicationCache::storage() and use it instead of the WebCore singleton
+ https://bugs.webkit.org/show_bug.cgi?id=143525
+
+ Reviewed by Antti Koivisto.
+
+ * WebApplicationCache.cpp:
+ (WebApplicationCache::storage):
+ (WebApplicationCache::maximumSize):
+ (WebApplicationCache::setMaximumSize):
+ (WebApplicationCache::defaultOriginQuota):
+ (WebApplicationCache::setDefaultOriginQuota):
+ (WebApplicationCache::diskUsageForOrigin):
+ (WebApplicationCache::deleteAllApplicationCaches):
+ (WebApplicationCache::deleteCacheForOrigin):
+ (WebApplicationCache::originsWithCache):
+ * WebApplicationCache.h:
+
2015-04-01 Simon Fraser <[email protected]>
Fix Windows build.
Modified: trunk/Source/WebKit/win/WebApplicationCache.cpp (182558 => 182559)
--- trunk/Source/WebKit/win/WebApplicationCache.cpp 2015-04-08 18:44:58 UTC (rev 182558)
+++ trunk/Source/WebKit/win/WebApplicationCache.cpp 2015-04-08 19:28:34 UTC (rev 182559)
@@ -58,6 +58,11 @@
return instance;
}
+WebCore::ApplicationCacheStorage& WebApplicationCache::storage()
+{
+ return WebCore::ApplicationCacheStorage::singleton();
+}
+
// IUnknown -------------------------------------------------------------------
HRESULT WebApplicationCache::QueryInterface(REFIID riid, void** ppvObject)
@@ -95,15 +100,14 @@
if (!size)
return E_POINTER;
- *size = WebCore::ApplicationCacheStorage::singleton().maximumSize();
+ *size = storage().maximumSize();
return S_OK;
}
HRESULT WebApplicationCache::setMaximumSize(long long size)
{
- auto& cacheStorage = WebCore::ApplicationCacheStorage::singleton();
- cacheStorage.deleteAllEntries();
- cacheStorage.setMaximumSize(size);
+ storage().deleteAllEntries();
+ storage().setMaximumSize(size);
return S_OK;
}
@@ -112,13 +116,13 @@
if (!quota)
return E_POINTER;
- *quota = WebCore::ApplicationCacheStorage::singleton().defaultOriginQuota();
+ *quota = storage().defaultOriginQuota();
return S_OK;
}
HRESULT WebApplicationCache::setDefaultOriginQuota(long long quota)
{
- WebCore::ApplicationCacheStorage::singleton().setDefaultOriginQuota(quota);
+ storage().setDefaultOriginQuota(quota);
return S_OK;
}
@@ -131,13 +135,13 @@
if (!webSecurityOrigin)
return E_FAIL;
- *size = WebCore::ApplicationCache::diskUsageForOrigin(webSecurityOrigin->securityOrigin());
+ *size = storage().diskUsageForOrigin(*webSecurityOrigin->securityOrigin());
return S_OK;
}
HRESULT WebApplicationCache::deleteAllApplicationCaches()
{
- WebCore::ApplicationCache::deleteAllCaches();
+ storage().deleteAllCaches();
return S_OK;
}
@@ -151,7 +155,7 @@
if (!webSecurityOrigin)
return E_FAIL;
- WebCore::ApplicationCache::deleteCacheForOrigin(webSecurityOrigin->securityOrigin());
+ storage().deleteCacheForOrigin(*webSecurityOrigin->securityOrigin());
return S_OK;
}
@@ -161,7 +165,7 @@
return E_POINTER;
HashSet<RefPtr<WebCore::SecurityOrigin>> coreOrigins;
- WebCore::ApplicationCacheStorage::singleton().getOriginsWithCache(coreOrigins);
+ storage().getOriginsWithCache(coreOrigins);
RetainPtr<CFMutableArrayRef> arrayItem = adoptCF(CFArrayCreateMutable(kCFAllocatorDefault, coreOrigins.size(), &MarshallingHelpers::kIUnknownArrayCallBacks));
Modified: trunk/Source/WebKit/win/WebApplicationCache.h (182558 => 182559)
--- trunk/Source/WebKit/win/WebApplicationCache.h 2015-04-08 18:44:58 UTC (rev 182558)
+++ trunk/Source/WebKit/win/WebApplicationCache.h 2015-04-08 19:28:34 UTC (rev 182559)
@@ -28,9 +28,16 @@
#include "WebKit.h"
+namespace WebCore {
+class ApplicationCacheStorage;
+}
+
class DECLSPEC_UUID("1119E970-4B13-4B9A-A049-41096104B689") WebApplicationCache : public IWebApplicationCache {
public:
static WebApplicationCache* createInstance();
+
+ WebCore::ApplicationCacheStorage& storage();
+
protected:
WebApplicationCache();
~WebApplicationCache();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes