Add StorageStrategy member functions to WebKit2
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Jan 2013 21:10:43 +0000 (21:10 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Jan 2013 21:10:43 +0000 (21:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=108105

Reviewed by Tim Horton.

Source/WebCore:

StorageStrategy::sessionStorageNamespace should be virtual, not static...

* WebCore.exp.in:
* storage/StorageStrategy.h:
(StorageStrategy):

Source/WebKit2:

Add default implementations that just chain up to the base class for now.

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::localStorageNamespace):
(WebKit::WebPlatformStrategies::sessionStorageNamespace):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):

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

Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/storage/StorageStrategy.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h

index 211729f..4420c24 100644 (file)
@@ -1,3 +1,16 @@
+2013-01-28  Anders Carlsson  <andersca@apple.com>
+
+        Add StorageStrategy member functions to WebKit2
+        https://bugs.webkit.org/show_bug.cgi?id=108105
+
+        Reviewed by Tim Horton.
+
+        StorageStrategy::sessionStorageNamespace should be virtual, not static...
+
+        * WebCore.exp.in:
+        * storage/StorageStrategy.h:
+        (StorageStrategy):
+
 2013-01-28  Uday Kiran  <udaykiran@motorola.com>
 
         getComputedStyle returns "left" instead of "none" for "float" on abspos elements
index 1c99e60..48e8d2f 100644 (file)
@@ -423,6 +423,7 @@ __ZN7WebCore15ResourceRequest24setHTTPPipeliningEnabledEb
 __ZN7WebCore15ScrollAlignment17alignCenterAlwaysE
 __ZN7WebCore15ScrollAlignment19alignToEdgeIfNeededE
 __ZN7WebCore15StorageStrategy21localStorageNamespaceERKN3WTF6StringEj
+__ZN7WebCore15StorageStrategy23sessionStorageNamespaceEPNS_4PageEj
 __ZN7WebCore15StringTruncator13rightTruncateERKN3WTF6StringEfRKNS_4FontENS0_24EnableRoundingHacksOrNotE
 __ZN7WebCore15StringTruncator14centerTruncateERKN3WTF6StringEfRKNS_4FontENS0_24EnableRoundingHacksOrNotE
 __ZN7WebCore15StringTruncator5widthERKN3WTF6StringERKNS_4FontENS0_24EnableRoundingHacksOrNotE
index 7642807..41de429 100644 (file)
@@ -38,7 +38,7 @@ class StorageNamespace;
 class StorageStrategy {
 public:
     virtual PassRefPtr<StorageNamespace> localStorageNamespace(const String& path, unsigned quota);
-    static PassRefPtr<StorageNamespace> sessionStorageNamespace(Page*, unsigned quota);
+    virtual PassRefPtr<StorageNamespace> sessionStorageNamespace(Page*, unsigned quota);
 
 protected:
     virtual ~StorageStrategy()
index 28eab43..86c74be 100644 (file)
@@ -1,3 +1,18 @@
+2013-01-28  Anders Carlsson  <andersca@apple.com>
+
+        Add StorageStrategy member functions to WebKit2
+        https://bugs.webkit.org/show_bug.cgi?id=108105
+
+        Reviewed by Tim Horton.
+
+        Add default implementations that just chain up to the base class for now.
+
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
+        (WebKit::WebPlatformStrategies::localStorageNamespace):
+        (WebKit::WebPlatformStrategies::sessionStorageNamespace):
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
+        (WebPlatformStrategies):
+
 2013-01-28  Adam Barth  <abarth@webkit.org>
 
         Remove webkitNotifications.createHTMLNotification
index 6586171..3527a05 100644 (file)
@@ -47,6 +47,7 @@
 #include <WebCore/PlatformCookieJar.h>
 #include <WebCore/PlatformPasteboard.h>
 #include <WebCore/ResourceError.h>
+#include <WebCore/StorageNamespace.h>
 #include <wtf/Atomics.h>
 
 #if ENABLE(NETWORK_PROCESS)
@@ -300,6 +301,18 @@ void WebPlatformStrategies::populatePluginCache()
 }
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
 
+// StorageStrategy
+
+PassRefPtr<StorageNamespace> WebPlatformStrategies::localStorageNamespace(const String& path, unsigned quota)
+{
+    return StorageStrategy::localStorageNamespace(path, quota);
+}
+
+PassRefPtr<StorageNamespace> WebPlatformStrategies::sessionStorageNamespace(Page* page, unsigned quota)
+{
+    return sessionStorageNamespace(page, quota);
+}
+
 // VisitedLinkStrategy
 
 bool WebPlatformStrategies::isLinkVisited(Page*, LinkHash linkHash, const KURL&, const AtomicString&)
index 89f3961..3048b11 100644 (file)
@@ -80,6 +80,10 @@ private:
     virtual void refreshPlugins() OVERRIDE;
     virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&) OVERRIDE;
 
+    // WebCore::StorageStrategy.
+    virtual PassRefPtr<WebCore::StorageNamespace> localStorageNamespace(const String& path, unsigned quota) OVERRIDE;
+    virtual PassRefPtr<WebCore::StorageNamespace> sessionStorageNamespace(WebCore::Page*, unsigned quota) OVERRIDE;
+
     // WebCore::VisitedLinkStrategy
     virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::KURL& baseURL, const WTF::AtomicString& attributeURL) OVERRIDE;
     virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash) OVERRIDE;