WebResourceCacheManager is unused, get rid of it
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Jun 2015 21:55:07 +0000 (21:55 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Jun 2015 21:55:07 +0000 (21:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=146027

Reviewed by Sam Weinig.

* DerivedSources.make:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
* UIProcess/WebProcessPool.cpp:
* UIProcess/WebResourceCacheManagerProxy.cpp: Removed.
(WebKit::WebResourceCacheManagerProxy::supplementName): Deleted.
(WebKit::WebResourceCacheManagerProxy::create): Deleted.
(WebKit::WebResourceCacheManagerProxy::WebResourceCacheManagerProxy): Deleted.
(WebKit::WebResourceCacheManagerProxy::~WebResourceCacheManagerProxy): Deleted.
(WebKit::WebResourceCacheManagerProxy::processPoolDestroyed): Deleted.
(WebKit::WebResourceCacheManagerProxy::processDidClose): Deleted.
(WebKit::WebResourceCacheManagerProxy::shouldTerminate): Deleted.
(WebKit::WebResourceCacheManagerProxy::refWebContextSupplement): Deleted.
(WebKit::WebResourceCacheManagerProxy::derefWebContextSupplement): Deleted.
(WebKit::WebResourceCacheManagerProxy::getCacheOrigins): Deleted.
(WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Deleted.
(WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin): Deleted.
(WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins): Deleted.
* UIProcess/WebResourceCacheManagerProxy.h: Removed.
* UIProcess/WebResourceCacheManagerProxy.messages.in: Removed.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/ResourceCache/WebResourceCacheManager.cpp: Removed.
(WebKit::WebResourceCacheManager::supplementName): Deleted.
(WebKit::WebResourceCacheManager::WebResourceCacheManager): Deleted.
(WebKit::WebResourceCacheManager::getCacheOrigins): Deleted.
(WebKit::WebResourceCacheManager::returnCacheOrigins): Deleted.
(WebKit::WebResourceCacheManager::clearCacheForOrigin): Deleted.
(WebKit::WebResourceCacheManager::clearCacheForAllOrigins): Deleted.
* WebProcess/ResourceCache/WebResourceCacheManager.h: Removed.
* WebProcess/ResourceCache/WebResourceCacheManager.messages.in: Removed.
* WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm: Removed.
(WebKit::partitionName): Deleted.
(WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback): Deleted.
(WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames): Deleted.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Deleted.

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

14 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/DerivedSources.make
Source/WebKit2/UIProcess/API/C/WKAPICast.h
Source/WebKit2/UIProcess/API/C/WKContext.cpp
Source/WebKit2/UIProcess/WebProcessPool.cpp
Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.cpp [deleted file]
Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.h [deleted file]
Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.messages.in [deleted file]
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.cpp [deleted file]
Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.h [deleted file]
Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.messages.in [deleted file]
Source/WebKit2/WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm [deleted file]
Source/WebKit2/WebProcess/WebProcess.cpp

index 359641d..d4ba9b4 100644 (file)
@@ -1,3 +1,47 @@
+2015-06-16  Anders Carlsson  <andersca@apple.com>
+
+        WebResourceCacheManager is unused, get rid of it
+        https://bugs.webkit.org/show_bug.cgi?id=146027
+
+        Reviewed by Sam Weinig.
+
+        * DerivedSources.make:
+        * UIProcess/API/C/WKAPICast.h:
+        * UIProcess/API/C/WKContext.cpp:
+        * UIProcess/WebProcessPool.cpp:
+        * UIProcess/WebResourceCacheManagerProxy.cpp: Removed.
+        (WebKit::WebResourceCacheManagerProxy::supplementName): Deleted.
+        (WebKit::WebResourceCacheManagerProxy::create): Deleted.
+        (WebKit::WebResourceCacheManagerProxy::WebResourceCacheManagerProxy): Deleted.
+        (WebKit::WebResourceCacheManagerProxy::~WebResourceCacheManagerProxy): Deleted.
+        (WebKit::WebResourceCacheManagerProxy::processPoolDestroyed): Deleted.
+        (WebKit::WebResourceCacheManagerProxy::processDidClose): Deleted.
+        (WebKit::WebResourceCacheManagerProxy::shouldTerminate): Deleted.
+        (WebKit::WebResourceCacheManagerProxy::refWebContextSupplement): Deleted.
+        (WebKit::WebResourceCacheManagerProxy::derefWebContextSupplement): Deleted.
+        (WebKit::WebResourceCacheManagerProxy::getCacheOrigins): Deleted.
+        (WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Deleted.
+        (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin): Deleted.
+        (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins): Deleted.
+        * UIProcess/WebResourceCacheManagerProxy.h: Removed.
+        * UIProcess/WebResourceCacheManagerProxy.messages.in: Removed.
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/ResourceCache/WebResourceCacheManager.cpp: Removed.
+        (WebKit::WebResourceCacheManager::supplementName): Deleted.
+        (WebKit::WebResourceCacheManager::WebResourceCacheManager): Deleted.
+        (WebKit::WebResourceCacheManager::getCacheOrigins): Deleted.
+        (WebKit::WebResourceCacheManager::returnCacheOrigins): Deleted.
+        (WebKit::WebResourceCacheManager::clearCacheForOrigin): Deleted.
+        (WebKit::WebResourceCacheManager::clearCacheForAllOrigins): Deleted.
+        * WebProcess/ResourceCache/WebResourceCacheManager.h: Removed.
+        * WebProcess/ResourceCache/WebResourceCacheManager.messages.in: Removed.
+        * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm: Removed.
+        (WebKit::partitionName): Deleted.
+        (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback): Deleted.
+        (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames): Deleted.
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::WebProcess): Deleted.
+
 2015-06-16  Alex Christensen  <achristensen@webkit.org>
 
         CMake build fix after r185601.
index 85c01b1..5e54337 100644 (file)
@@ -131,8 +131,6 @@ MESSAGE_RECEIVERS = \
     WebProcessConnection \
     WebProcessPool \
     WebProcessProxy \
-    WebResourceCacheManager \
-    WebResourceCacheManagerProxy \
     WebResourceLoader \
     WebUserContentController \
     WebUserContentControllerProxy \
index 7a92f35..6d7db81 100644 (file)
@@ -105,7 +105,6 @@ class WebProcessPool;
 class WebProtectionSpace;
 class WebRenderLayer;
 class WebRenderObject;
-class WebResourceCacheManagerProxy;
 class WebTextChecker;
 class WebUserContentControllerProxy;
 class WebVibrationProxy;
@@ -118,7 +117,6 @@ WK_ADD_API_MAPPING(WKBackForwardListRef, WebBackForwardList)
 WK_ADD_API_MAPPING(WKBatteryManagerRef, WebBatteryManagerProxy)
 WK_ADD_API_MAPPING(WKBatteryStatusRef, WebBatteryStatus)
 WK_ADD_API_MAPPING(WKBundleHitTestResultMediaType, BundleHitTestResultMediaType)
-WK_ADD_API_MAPPING(WKResourceCacheManagerRef, WebResourceCacheManagerProxy)
 WK_ADD_API_MAPPING(WKColorPickerResultListenerRef, WebColorPickerResultListenerProxy)
 WK_ADD_API_MAPPING(WKContextRef, WebProcessPool)
 WK_ADD_API_MAPPING(WKContextConfigurationRef, API::ProcessPoolConfiguration)
index 682ed6c..5d012e4 100644 (file)
@@ -51,7 +51,6 @@
 #include "WebKeyValueStorageManager.h"
 #include "WebMediaCacheManagerProxy.h"
 #include "WebNotificationManagerProxy.h"
-#include "WebResourceCacheManagerProxy.h"
 #if ENABLE(BATTERY_STATUS)
 #include "WebBatteryManagerProxy.h"
 #endif
index 8569e38..056d233 100644 (file)
@@ -56,7 +56,6 @@
 #include "WebProcessMessages.h"
 #include "WebProcessPoolMessages.h"
 #include "WebProcessProxy.h"
-#include "WebResourceCacheManagerProxy.h"
 #include "WebsiteDataStore.h"
 #include <WebCore/ApplicationCacheStorage.h>
 #include <WebCore/Language.h>
@@ -197,7 +196,6 @@ WebProcessPool::WebProcessPool(API::ProcessPoolConfiguration& configuration)
     addSupplement<WebKeyValueStorageManager>();
     addSupplement<WebMediaCacheManagerProxy>();
     addSupplement<WebNotificationManagerProxy>();
-    addSupplement<WebResourceCacheManagerProxy>();
     addSupplement<WebDatabaseManagerProxy>();
 #if USE(SOUP)
     addSupplement<WebSoupCustomProtocolRequestManager>();
diff --git a/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.cpp b/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.cpp
deleted file mode 100644 (file)
index fafc617..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WebResourceCacheManagerProxy.h"
-
-#include "APIDictionary.h"
-#include "APISecurityOrigin.h"
-#include "SecurityOriginData.h"
-#include "WebProcessPool.h"
-#include "WebResourceCacheManagerMessages.h"
-#include "WebResourceCacheManagerProxyMessages.h"
-
-#if ENABLE(NETWORK_PROCESS)
-#include "NetworkProcessMessages.h"
-#endif
-
-using namespace WebCore;
-
-namespace WebKit {
-
-const char* WebResourceCacheManagerProxy::supplementName()
-{
-    return "WebResourceCacheManagerProxy";
-}
-
-PassRefPtr<WebResourceCacheManagerProxy> WebResourceCacheManagerProxy::create(WebProcessPool* processPool)
-{
-    return adoptRef(new WebResourceCacheManagerProxy(processPool));
-}
-
-WebResourceCacheManagerProxy::WebResourceCacheManagerProxy(WebProcessPool* processPool)
-    : WebContextSupplement(processPool)
-{
-    WebContextSupplement::processPool()->addMessageReceiver(Messages::WebResourceCacheManagerProxy::messageReceiverName(), *this);
-}
-
-WebResourceCacheManagerProxy::~WebResourceCacheManagerProxy()
-{
-}
-
-// WebContextSupplement
-
-void WebResourceCacheManagerProxy::processPoolDestroyed()
-{
-    invalidateCallbackMap(m_arrayCallbacks, CallbackBase::Error::OwnerWasInvalidated);
-}
-
-void WebResourceCacheManagerProxy::processDidClose(WebProcessProxy*)
-{
-    invalidateCallbackMap(m_arrayCallbacks, CallbackBase::Error::ProcessExited);
-}
-
-bool WebResourceCacheManagerProxy::shouldTerminate(WebProcessProxy*) const
-{
-    return m_arrayCallbacks.isEmpty();
-}
-
-void WebResourceCacheManagerProxy::refWebContextSupplement()
-{
-    API::Object::ref();
-}
-
-void WebResourceCacheManagerProxy::derefWebContextSupplement()
-{
-    API::Object::deref();
-}
-
-void WebResourceCacheManagerProxy::getCacheOrigins(std::function<void (API::Array*, CallbackBase::Error)> callbackFunction)
-{
-    RefPtr<ArrayCallback> callback = ArrayCallback::create(WTF::move(callbackFunction));
-    uint64_t callbackID = callback->callbackID();
-    m_arrayCallbacks.set(callbackID, callback.release());
-
-    // FIXME (Multi-WebProcess): <rdar://problem/12239765> When multi-process is enabled, we need to aggregate the callback data from all processes.
-    processPool()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebResourceCacheManager::GetCacheOrigins(callbackID));
-}
-
-void WebResourceCacheManagerProxy::didGetCacheOrigins(const Vector<SecurityOriginData>& origins, uint64_t callbackID)
-{
-    RefPtr<ArrayCallback> callback = m_arrayCallbacks.take(callbackID);
-    performAPICallbackWithSecurityOriginDataVector(origins, callback.get());
-}
-
-void WebResourceCacheManagerProxy::clearCacheForOrigin(API::SecurityOrigin* origin, ResourceCachesToClear cachesToClear)
-{
-    SecurityOriginData securityOrigin;
-    securityOrigin.protocol = origin->securityOrigin().protocol();
-    securityOrigin.host = origin->securityOrigin().host();
-    securityOrigin.port = origin->securityOrigin().port();
-
-    // FIXME (Multi-WebProcess): <rdar://problem/12239765> There is no need to relaunch all processes. One process to take care of persistent cache is enough.
-    processPool()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebResourceCacheManager::ClearCacheForOrigin(securityOrigin, cachesToClear));
-}
-
-void WebResourceCacheManagerProxy::clearCacheForAllOrigins(ResourceCachesToClear cachesToClear)
-{
-#if ENABLE(NETWORK_PROCESS)
-    processPool()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::NetworkProcess::ClearCacheForAllOrigins(cachesToClear));
-#endif
-
-    // FIXME (Multi-WebProcess): <rdar://problem/12239765> There is no need to relaunch all processes. One process to take care of persistent cache is enough.
-    processPool()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebResourceCacheManager::ClearCacheForAllOrigins(cachesToClear));
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.h b/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.h
deleted file mode 100644 (file)
index 5b6d303..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebResourceCacheManagerProxy_h
-#define WebResourceCacheManagerProxy_h
-
-#include "APIObject.h"
-#include "Arguments.h"
-#include "GenericCallback.h"
-#include "MessageReceiver.h"
-#include "ResourceCachesToClear.h"
-#include "WebContextSupplement.h"
-#include <wtf/HashMap.h>
-#include <wtf/PassRefPtr.h>
-
-namespace WebKit {
-
-struct SecurityOriginData;
-class WebProcessPool;
-class WebProcessProxy;
-
-typedef GenericCallback<API::Array*> ArrayCallback;
-
-class WebResourceCacheManagerProxy : public API::ObjectImpl<API::Object::Type::CacheManager>, public WebContextSupplement, private IPC::MessageReceiver {
-public:
-    static const char* supplementName();
-
-    static PassRefPtr<WebResourceCacheManagerProxy> create(WebProcessPool*);
-    virtual ~WebResourceCacheManagerProxy();
-
-    void getCacheOrigins(std::function<void (API::Array*, CallbackBase::Error)>);
-    void clearCacheForOrigin(API::SecurityOrigin*, ResourceCachesToClear);
-    void clearCacheForAllOrigins(ResourceCachesToClear);
-
-    using API::Object::ref;
-    using API::Object::deref;
-
-private:
-    explicit WebResourceCacheManagerProxy(WebProcessPool*);
-
-    // WebContextSupplement
-    virtual void processPoolDestroyed() override;
-    virtual void processDidClose(WebProcessProxy*) override;
-    virtual bool shouldTerminate(WebProcessProxy*) const override;
-    virtual void refWebContextSupplement() override;
-    virtual void derefWebContextSupplement() override;
-
-    // IPC::MessageReceiver
-    virtual void didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) override;
-
-    // Message handlers.
-    void didGetCacheOrigins(const Vector<SecurityOriginData>& originIdentifiers, uint64_t callbackID);
-
-    HashMap<uint64_t, RefPtr<ArrayCallback>> m_arrayCallbacks;
-};
-
-} // namespace WebKit
-
-#endif // DatabaseManagerProxy_h
diff --git a/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.messages.in b/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.messages.in
deleted file mode 100644 (file)
index c1e73a9..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright (C) 2011 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-messages -> WebResourceCacheManagerProxy {
-    DidGetCacheOrigins(Vector<WebKit::SecurityOriginData> originIdentifiers, uint64_t callbackID)
-}
index eb385d4..188c97a 100644 (file)
                3309345B1315B9980097A7BC /* WKCookieManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 330934591315B9980097A7BC /* WKCookieManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
                33152975130D0CB200ED2483 /* SecurityOriginData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33152973130D0CB200ED2483 /* SecurityOriginData.cpp */; };
                33152976130D0CB200ED2483 /* SecurityOriginData.h in Headers */ = {isa = PBXBuildFile; fileRef = 33152974130D0CB200ED2483 /* SecurityOriginData.h */; };
-               3336762F130C9998006C9DE2 /* WebResourceCacheManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3336762C130C9998006C9DE2 /* WebResourceCacheManager.cpp */; };
-               33367630130C9998006C9DE2 /* WebResourceCacheManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 3336762D130C9998006C9DE2 /* WebResourceCacheManager.h */; };
-               33367635130C99B2006C9DE2 /* WebResourceCacheManagerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33367632130C99B2006C9DE2 /* WebResourceCacheManagerProxy.cpp */; };
-               33367636130C99B2006C9DE2 /* WebResourceCacheManagerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 33367633130C99B2006C9DE2 /* WebResourceCacheManagerProxy.h */; };
                3336763A130C99DC006C9DE2 /* WKResourceCacheManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33367638130C99DC006C9DE2 /* WKResourceCacheManager.cpp */; };
                3336763B130C99DC006C9DE2 /* WKResourceCacheManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 33367639130C99DC006C9DE2 /* WKResourceCacheManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               33367655130C9ECA006C9DE2 /* WebResourceCacheManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33367651130C9ECA006C9DE2 /* WebResourceCacheManagerMessageReceiver.cpp */; };
-               33367656130C9ECA006C9DE2 /* WebResourceCacheManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 33367652130C9ECA006C9DE2 /* WebResourceCacheManagerMessages.h */; };
-               33367657130C9ECA006C9DE2 /* WebResourceCacheManagerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33367653130C9ECA006C9DE2 /* WebResourceCacheManagerProxyMessageReceiver.cpp */; };
-               33367658130C9ECB006C9DE2 /* WebResourceCacheManagerProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 33367654130C9ECA006C9DE2 /* WebResourceCacheManagerProxyMessages.h */; };
                33AA1066131F060000D4A575 /* WebCookieManagerProxyClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33AA1064131F060000D4A575 /* WebCookieManagerProxyClient.cpp */; };
                33AA1067131F060000D4A575 /* WebCookieManagerProxyClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 33AA1065131F060000D4A575 /* WebCookieManagerProxyClient.h */; };
                33D3A3B51339600B00709BE4 /* WKMediaCacheManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33D3A3B31339600B00709BE4 /* WKMediaCacheManager.cpp */; };
                33D3A3C91339617900709BE4 /* WebMediaCacheManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 33D3A3C51339617900709BE4 /* WebMediaCacheManagerMessages.h */; };
                33D3A3CA1339617900709BE4 /* WebMediaCacheManagerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33D3A3C61339617900709BE4 /* WebMediaCacheManagerProxyMessageReceiver.cpp */; };
                33D3A3CB1339617900709BE4 /* WebMediaCacheManagerProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 33D3A3C71339617900709BE4 /* WebMediaCacheManagerProxyMessages.h */; };
-               33F9D5B91312F1EE000D683F /* WebResourceCacheManagerCFNet.mm in Sources */ = {isa = PBXBuildFile; fileRef = 33F9D5B81312F1EE000D683F /* WebResourceCacheManagerCFNet.mm */; };
                370F34A21829BE1E009027C8 /* WKNavigationData.mm in Sources */ = {isa = PBXBuildFile; fileRef = 370F34A01829BE1E009027C8 /* WKNavigationData.mm */; };
                370F34A31829BE1E009027C8 /* WKNavigationData.h in Headers */ = {isa = PBXBuildFile; fileRef = 370F34A11829BE1E009027C8 /* WKNavigationData.h */; settings = {ATTRIBUTES = (Private, ); }; };
                370F34A51829BEA3009027C8 /* WKNavigationDataInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 370F34A41829BEA3009027C8 /* WKNavigationDataInternal.h */; };
                330934591315B9980097A7BC /* WKCookieManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKCookieManager.h; sourceTree = "<group>"; };
                33152973130D0CB200ED2483 /* SecurityOriginData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SecurityOriginData.cpp; sourceTree = "<group>"; };
                33152974130D0CB200ED2483 /* SecurityOriginData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecurityOriginData.h; sourceTree = "<group>"; };
-               3336762C130C9998006C9DE2 /* WebResourceCacheManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebResourceCacheManager.cpp; path = ResourceCache/WebResourceCacheManager.cpp; sourceTree = "<group>"; };
-               3336762D130C9998006C9DE2 /* WebResourceCacheManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebResourceCacheManager.h; path = ResourceCache/WebResourceCacheManager.h; sourceTree = "<group>"; };
-               3336762E130C9998006C9DE2 /* WebResourceCacheManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebResourceCacheManager.messages.in; path = ResourceCache/WebResourceCacheManager.messages.in; sourceTree = "<group>"; };
-               33367632130C99B2006C9DE2 /* WebResourceCacheManagerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebResourceCacheManagerProxy.cpp; sourceTree = "<group>"; };
-               33367633130C99B2006C9DE2 /* WebResourceCacheManagerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebResourceCacheManagerProxy.h; sourceTree = "<group>"; };
-               33367634130C99B2006C9DE2 /* WebResourceCacheManagerProxy.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebResourceCacheManagerProxy.messages.in; sourceTree = "<group>"; };
                33367638130C99DC006C9DE2 /* WKResourceCacheManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKResourceCacheManager.cpp; sourceTree = "<group>"; };
                33367639130C99DC006C9DE2 /* WKResourceCacheManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKResourceCacheManager.h; sourceTree = "<group>"; };
-               33367651130C9ECA006C9DE2 /* WebResourceCacheManagerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebResourceCacheManagerMessageReceiver.cpp; sourceTree = "<group>"; };
-               33367652130C9ECA006C9DE2 /* WebResourceCacheManagerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebResourceCacheManagerMessages.h; sourceTree = "<group>"; };
-               33367653130C9ECA006C9DE2 /* WebResourceCacheManagerProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebResourceCacheManagerProxyMessageReceiver.cpp; sourceTree = "<group>"; };
-               33367654130C9ECA006C9DE2 /* WebResourceCacheManagerProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebResourceCacheManagerProxyMessages.h; sourceTree = "<group>"; };
                33AA1064131F060000D4A575 /* WebCookieManagerProxyClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCookieManagerProxyClient.cpp; sourceTree = "<group>"; };
                33AA1065131F060000D4A575 /* WebCookieManagerProxyClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCookieManagerProxyClient.h; sourceTree = "<group>"; };
                33D3A3B31339600B00709BE4 /* WKMediaCacheManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKMediaCacheManager.cpp; sourceTree = "<group>"; };
                33D3A3C51339617900709BE4 /* WebMediaCacheManagerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebMediaCacheManagerMessages.h; sourceTree = "<group>"; };
                33D3A3C61339617900709BE4 /* WebMediaCacheManagerProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebMediaCacheManagerProxyMessageReceiver.cpp; sourceTree = "<group>"; };
                33D3A3C71339617900709BE4 /* WebMediaCacheManagerProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebMediaCacheManagerProxyMessages.h; sourceTree = "<group>"; };
-               33F9D5B81312F1EE000D683F /* WebResourceCacheManagerCFNet.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; name = WebResourceCacheManagerCFNet.mm; path = ResourceCache/cf/WebResourceCacheManagerCFNet.mm; sourceTree = "<group>"; };
                3574B37F1665932C00859BB7 /* PDFAnnotationTextWidgetDetails.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PDFAnnotationTextWidgetDetails.h; path = PDF/PDFAnnotationTextWidgetDetails.h; sourceTree = "<group>"; };
                370F34A01829BE1E009027C8 /* WKNavigationData.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKNavigationData.mm; sourceTree = "<group>"; };
                370F34A11829BE1E009027C8 /* WKNavigationData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNavigationData.h; sourceTree = "<group>"; };
                        name = Cookies;
                        sourceTree = "<group>";
                };
-               3336762B130C9978006C9DE2 /* ResourceCache */ = {
-                       isa = PBXGroup;
-                       children = (
-                               33F9D5B71312F1B1000D683F /* cf */,
-                               3336762C130C9998006C9DE2 /* WebResourceCacheManager.cpp */,
-                               3336762D130C9998006C9DE2 /* WebResourceCacheManager.h */,
-                               3336762E130C9998006C9DE2 /* WebResourceCacheManager.messages.in */,
-                       );
-                       name = ResourceCache;
-                       sourceTree = "<group>";
-               };
                33D3A3BD1339609800709BE4 /* MediaCache */ = {
                        isa = PBXGroup;
                        children = (
                        name = MediaCache;
                        sourceTree = "<group>";
                };
-               33F9D5B71312F1B1000D683F /* cf */ = {
-                       isa = PBXGroup;
-                       children = (
-                               33F9D5B81312F1EE000D683F /* WebResourceCacheManagerCFNet.mm */,
-                       );
-                       name = cf;
-                       sourceTree = "<group>";
-               };
                3709504118A88BA40087AE5D /* cf */ = {
                        isa = PBXGroup;
                        children = (
                                5105B0D2162F7A5E00E27709 /* Network */,
                                31099974146C8AA80029DEB9 /* Notifications (User) */,
                                1A6FB7AA11E64B4900DB1371 /* Plugins */,
-                               3336762B130C9978006C9DE2 /* ResourceCache */,
                                0F59478C187B3B2A00437857 /* Scrolling */,
                                1AAC4DDE16B1CBF6009425E3 /* Storage */,
                                1AAF08AA1926930B00B6390C /* UserContent */,
                                BC111B0D112F5E4F00337BAB /* WebProcessProxy.cpp */,
                                BC032DCF10F4389F0058C15A /* WebProcessProxy.h */,
                                BCEE7AB312817095009827DA /* WebProcessProxy.messages.in */,
-                               33367632130C99B2006C9DE2 /* WebResourceCacheManagerProxy.cpp */,
-                               33367633130C99B2006C9DE2 /* WebResourceCacheManagerProxy.h */,
-                               33367634130C99B2006C9DE2 /* WebResourceCacheManagerProxy.messages.in */,
                        );
                        path = UIProcess;
                        sourceTree = "<group>";
                                7CE4D2261A4916C200C7F152 /* WebProcessPoolMessages.h */,
                                BCEE7ACC12817988009827DA /* WebProcessProxyMessageReceiver.cpp */,
                                BCEE7ACD12817988009827DA /* WebProcessProxyMessages.h */,
-                               33367651130C9ECA006C9DE2 /* WebResourceCacheManagerMessageReceiver.cpp */,
-                               33367652130C9ECA006C9DE2 /* WebResourceCacheManagerMessages.h */,
-                               33367653130C9ECA006C9DE2 /* WebResourceCacheManagerProxyMessageReceiver.cpp */,
-                               33367654130C9ECA006C9DE2 /* WebResourceCacheManagerProxyMessages.h */,
                                51F060DD1654317500F3281B /* WebResourceLoaderMessageReceiver.cpp */,
                                51F060DE1654317500F3281B /* WebResourceLoaderMessages.h */,
                                1AAF08B519269E6D00B6390C /* WebUserContentControllerMessageReceiver.cpp */,
                                A1C512C9190656E500448914 /* WebQuickLookHandleClient.h in Headers */,
                                37948404150C350600E52CE9 /* WebRenderLayer.h in Headers */,
                                3760881F150413E900FC82C7 /* WebRenderObject.h in Headers */,
-                               33367630130C9998006C9DE2 /* WebResourceCacheManager.h in Headers */,
-                               33367656130C9ECA006C9DE2 /* WebResourceCacheManagerMessages.h in Headers */,
-                               33367636130C99B2006C9DE2 /* WebResourceCacheManagerProxy.h in Headers */,
-                               33367658130C9ECB006C9DE2 /* WebResourceCacheManagerProxyMessages.h in Headers */,
                                510AFFBA16542048001BA05E /* WebResourceLoader.h in Headers */,
                                51F060E01654317F00F3281B /* WebResourceLoaderMessages.h in Headers */,
                                7C361D731927FA360036A59D /* WebScriptMessageHandler.h in Headers */,
                                A1C512C8190656E500448914 /* WebQuickLookHandleClient.cpp in Sources */,
                                37948403150C350600E52CE9 /* WebRenderLayer.cpp in Sources */,
                                3760881E150413E900FC82C7 /* WebRenderObject.cpp in Sources */,
-                               3336762F130C9998006C9DE2 /* WebResourceCacheManager.cpp in Sources */,
-                               33F9D5B91312F1EE000D683F /* WebResourceCacheManagerCFNet.mm in Sources */,
-                               33367655130C9ECA006C9DE2 /* WebResourceCacheManagerMessageReceiver.cpp in Sources */,
-                               33367635130C99B2006C9DE2 /* WebResourceCacheManagerProxy.cpp in Sources */,
-                               33367657130C9ECA006C9DE2 /* WebResourceCacheManagerProxyMessageReceiver.cpp in Sources */,
                                510AFFB916542048001BA05E /* WebResourceLoader.cpp in Sources */,
                                51F060E11654318500F3281B /* WebResourceLoaderMessageReceiver.cpp in Sources */,
                                51FB08FF1639DE1A00EC324A /* WebResourceLoadScheduler.cpp in Sources */,
diff --git a/Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.cpp b/Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.cpp
deleted file mode 100644 (file)
index 88a7adc..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WebResourceCacheManager.h"
-
-#include "SecurityOriginData.h"
-#include "WebCoreArgumentCoders.h"
-#include "WebProcess.h"
-#include "WebResourceCacheManagerMessages.h"
-#include "WebResourceCacheManagerProxyMessages.h"
-#include <WebCore/MemoryCache.h>
-#include <WebCore/SecurityOrigin.h>
-#include <WebCore/SecurityOriginHash.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-const char* WebResourceCacheManager::supplementName()
-{
-    return "WebResourceCacheManager";
-}
-
-WebResourceCacheManager::WebResourceCacheManager(WebProcess* process)
-    : m_process(process)
-{
-    m_process->addMessageReceiver(Messages::WebResourceCacheManager::messageReceiverName(), *this);
-}
-
-void WebResourceCacheManager::getCacheOrigins(uint64_t callbackID) const
-{
-    MemoryCache::SecurityOriginSet origins;
-
-    MemoryCache::singleton().getOriginsWithCache(origins);
-
-#if USE(CFURLCACHE)
-    cfURLCacheHostNamesWithCallback([&origins](RetainPtr<CFArrayRef> cfURLHosts) {
-        CFIndex size = cfURLHosts ? CFArrayGetCount(cfURLHosts.get()) : 0;
-
-        String httpString("http");
-        for (CFIndex i = 0; i < size; ++i) {
-            CFStringRef host = static_cast<CFStringRef>(CFArrayGetValueAtIndex(cfURLHosts.get(), i));
-            origins.add(SecurityOrigin::create(httpString, host, 0));
-        }
-    });
-#endif
-
-    returnCacheOrigins(callbackID, origins);
-}
-
-void WebResourceCacheManager::returnCacheOrigins(uint64_t callbackID, const MemoryCache::SecurityOriginSet& origins) const
-{
-    // Create a list with the origins in both of the caches.
-    Vector<SecurityOriginData> identifiers;
-    identifiers.reserveCapacity(origins.size());
-
-    for (auto& origin : origins) {
-        SecurityOriginData originData;
-        originData.protocol = origin->protocol();
-        originData.host = origin->host();
-        originData.port = origin->port();
-
-        identifiers.uncheckedAppend(originData);
-    }
-
-    m_process->send(Messages::WebResourceCacheManagerProxy::DidGetCacheOrigins(identifiers, callbackID), 0);
-}
-
-void WebResourceCacheManager::clearCacheForOrigin(const SecurityOriginData& originData, uint32_t cachesToClear) const
-{
-#if USE(CFURLCACHE)
-    ResourceCachesToClear resourceCachesToClear = static_cast<ResourceCachesToClear>(cachesToClear);
-#else
-    UNUSED_PARAM(cachesToClear);
-#endif
-
-    Ref<SecurityOrigin> origin = SecurityOrigin::create(originData.protocol, originData.host, originData.port);
-    MemoryCache::singleton().removeResourcesWithOrigin(origin.get());
-
-#if USE(CFURLCACHE)
-    if (resourceCachesToClear != InMemoryResourceCachesOnly) { 
-        RetainPtr<CFMutableArrayRef> hostArray = adoptCF(CFArrayCreateMutable(0, 0, &kCFTypeArrayCallBacks));
-        CFArrayAppendValue(hostArray.get(), origin->host().createCFString().get());
-
-        clearCFURLCacheForHostNames(hostArray.get());
-    }
-#endif
-}
-
-void WebResourceCacheManager::clearCacheForAllOrigins(uint32_t cachesToClear) const
-{
-    ResourceCachesToClear resourceCachesToClear = static_cast<ResourceCachesToClear>(cachesToClear);
-    m_process->clearResourceCaches(resourceCachesToClear);
-}
-
-} // namespace WebKit
diff --git a/Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.h b/Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.h
deleted file mode 100644 (file)
index f990074..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebResourceCacheManager_h
-#define WebResourceCacheManager_h
-
-#include "MessageReceiver.h"
-#include "ResourceCachesToClear.h"
-#include "WebProcessSupplement.h"
-#include <WebCore/MemoryCache.h>
-#include <wtf/Noncopyable.h>
-#include <wtf/RetainPtr.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebKit {
-
-class WebProcess;
-struct SecurityOriginData;
-
-class WebResourceCacheManager : public WebProcessSupplement, public IPC::MessageReceiver {
-    WTF_MAKE_NONCOPYABLE(WebResourceCacheManager);
-public:
-    WebResourceCacheManager(WebProcess*);
-
-    static const char* supplementName();
-
-#if USE(CFURLCACHE)
-    static void cfURLCacheHostNamesWithCallback(std::function<void (RetainPtr<CFArrayRef>)>);
-    static void clearCFURLCacheForHostNames(CFArrayRef);
-#endif
-
-private:
-    // IPC::MessageReceiver
-    // Implemented in generated WebResourceCacheManagerMessageReceiver.cpp
-    virtual void didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) override;
-
-    void getCacheOrigins(uint64_t callbackID) const;
-    void returnCacheOrigins(uint64_t callbackID, const WebCore::MemoryCache::SecurityOriginSet&) const;
-    void clearCacheForOrigin(const SecurityOriginData&, uint32_t cachesToClear) const;
-    void clearCacheForAllOrigins(uint32_t cachesToClear) const;
-
-    WebProcess* m_process;
-};
-
-} // namespace WebKit
-
-#endif // WebResourceCacheManager_h
diff --git a/Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.messages.in b/Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.messages.in
deleted file mode 100644 (file)
index 8cf9e7a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2011 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-messages -> WebResourceCacheManager {
-    void GetCacheOrigins(uint64_t callbackID)
-    void ClearCacheForOrigin(struct WebKit::SecurityOriginData originIdentifier, uint32_t cachesToClear)
-    void ClearCacheForAllOrigins(uint32_t cachesToClear)
-}
diff --git a/Source/WebKit2/WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm b/Source/WebKit2/WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm
deleted file mode 100644 (file)
index e3a5521..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "WebResourceCacheManager.h"
-
-#if USE(CFURLCACHE)
-
-#if ENABLE(CACHE_PARTITIONING)
-#include <WebCore/PublicSuffix.h>
-#include <wtf/text/CString.h>
-#endif
-
-#import "WebKitSystemInterface.h"
-
-namespace WebKit {
-
-static RetainPtr<CFStringRef> partitionName(CFStringRef domain)
-{
-#if ENABLE(PUBLIC_SUFFIX_LIST)
-    String highLevel = WebCore::topPrivatelyControlledDomain(domain);
-    if (highLevel.isNull())
-        return 0;
-    CString utf8String = highLevel.utf8();
-    return adoptCF(CFStringCreateWithBytes(0, reinterpret_cast<const UInt8*>(utf8String.data()), utf8String.length(), kCFStringEncodingUTF8, false));
-#else
-    return domain;
-#endif
-}
-
-void WebResourceCacheManager::cfURLCacheHostNamesWithCallback(std::function<void (RetainPtr<CFArrayRef>)> callback)
-{
-    WKCFURLCacheCopyAllPartitionNames(^(CFArrayRef partitionNames) {
-        RetainPtr<CFArrayRef> hostNamesInPersistentStore = adoptCF(WKCFURLCacheCopyAllHostNamesInPersistentStoreForPartition(CFSTR("")));
-        RetainPtr<CFMutableArrayRef> hostNames = adoptCF(CFArrayCreateMutableCopy(0, 0, hostNamesInPersistentStore.get()));
-        if (partitionNames) {
-            CFArrayAppendArray(hostNames.get(), partitionNames, CFRangeMake(0, CFArrayGetCount(partitionNames)));
-            CFRelease(partitionNames);
-        }
-        callback(WTF::move(hostNames));
-    });
-}
-
-void WebResourceCacheManager::clearCFURLCacheForHostNames(CFArrayRef hostNames)
-{
-    WKCFURLCacheDeleteHostNamesInPersistentStore(hostNames);
-
-    CFIndex size = CFArrayGetCount(hostNames);
-    for (CFIndex i = 0; i < size; ++i) {
-        RetainPtr<CFStringRef> partition = partitionName(static_cast<CFStringRef>(CFArrayGetValueAtIndex(hostNames, i)));
-        RetainPtr<CFArrayRef> partitionHostNames = adoptCF(WKCFURLCacheCopyAllHostNamesInPersistentStoreForPartition(partition.get()));
-        WKCFURLCacheDeleteHostNamesInPersistentStoreForPartition(partitionHostNames.get(), partition.get());
-    }
-}
-
-} // namespace WebKit
-
-#endif // USE(CFURLCACHE)
index 8ddb1bb..9c589b1 100644 (file)
@@ -59,7 +59,6 @@
 #include "WebProcessMessages.h"
 #include "WebProcessPoolMessages.h"
 #include "WebProcessProxyMessages.h"
-#include "WebResourceCacheManager.h"
 #include "WebsiteData.h"
 #include "WebsiteDataTypes.h"
 #include <JavaScriptCore/JSLock.h>
@@ -183,7 +182,6 @@ WebProcess::WebProcess()
     // so that ports have a chance to customize, and ifdefs in this file are
     // limited.
     addSupplement<WebGeolocationManager>();
-    addSupplement<WebResourceCacheManager>();
     addSupplement<WebCookieManager>();
     addSupplement<WebMediaCacheManager>();
     addSupplement<AuthenticationManager>();