Source/WebCore: Use a platform strategy for local storage
[WebKit-https.git] / Source / WebCore / platform / PlatformStrategies.h
index 0d16799..5b9e616 100644 (file)
@@ -36,6 +36,7 @@ class LoaderStrategy;
 class PasteboardStrategy;
 class PluginStrategy;
 class SharedWorkerStrategy;
+class StorageStrategy;
 class VisitedLinkStrategy;
 
 class PlatformStrategies {
@@ -89,6 +90,13 @@ public:
         return m_visitedLinkStrategy;
     }
 
+    StorageStrategy* storageStrategy()
+    {
+        if (!m_storageStrategy)
+            m_storageStrategy = createStorageStrategy();
+        return m_storageStrategy;
+    }
+
 protected:
     PlatformStrategies()
         : m_cookiesStrategy(0)
@@ -97,6 +105,7 @@ protected:
         , m_pasteboardStrategy(0)
         , m_pluginStrategy(0)
         , m_sharedWorkerStrategy(0)
+        , m_storageStrategy(0)
         , m_visitedLinkStrategy(0)
     {
     }
@@ -112,6 +121,7 @@ private:
     virtual PasteboardStrategy* createPasteboardStrategy() = 0;
     virtual PluginStrategy* createPluginStrategy() = 0;
     virtual SharedWorkerStrategy* createSharedWorkerStrategy() = 0;
+    virtual StorageStrategy* createStorageStrategy() = 0;
     virtual VisitedLinkStrategy* createVisitedLinkStrategy() = 0;
 
     CookiesStrategy* m_cookiesStrategy;
@@ -120,6 +130,7 @@ private:
     PasteboardStrategy* m_pasteboardStrategy;
     PluginStrategy* m_pluginStrategy;
     SharedWorkerStrategy* m_sharedWorkerStrategy;
+    StorageStrategy* m_storageStrategy;
     VisitedLinkStrategy* m_visitedLinkStrategy;
 };