Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (176695 => 176696)
--- trunk/Source/WebCore/CMakeLists.txt 2014-12-02 23:41:23 UTC (rev 176695)
+++ trunk/Source/WebCore/CMakeLists.txt 2014-12-03 00:30:17 UTC (rev 176696)
@@ -2482,6 +2482,7 @@
storage/StorageMap.cpp
storage/StorageNamespace.cpp
storage/StorageNamespaceImpl.cpp
+ storage/StorageNamespaceProvider.cpp
storage/StorageStrategy.cpp
storage/StorageSyncManager.cpp
storage/StorageThread.cpp
Modified: trunk/Source/WebCore/ChangeLog (176695 => 176696)
--- trunk/Source/WebCore/ChangeLog 2014-12-02 23:41:23 UTC (rev 176695)
+++ trunk/Source/WebCore/ChangeLog 2014-12-03 00:30:17 UTC (rev 176696)
@@ -1,3 +1,45 @@
+2014-12-02 Anders Carlsson <[email protected]>
+
+ Begin stubbing out a StorageNamespaceProvider class
+ https://bugs.webkit.org/show_bug.cgi?id=139203
+
+ Reviewed by Tim Horton.
+
+ * CMakeLists.txt:
+ * WebCore.vcxproj/WebCore.vcxproj:
+ * WebCore.vcxproj/WebCore.vcxproj.filters:
+ * WebCore.xcodeproj/project.pbxproj:
+ Add new files.
+
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::localStorage):
+ If the page has a storage namespace provider, get the local storage from it.
+
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ Move the storage namespace provider from the configuration.
+
+ (WebCore::Page::setStorageNamespaceProvider):
+ Add a setter. This will be used by setGroupName.
+
+ * page/Page.h:
+ (WebCore::Page::storageNamespaceProvider):
+ Add a getter.
+
+ * page/PageConfiguration.cpp:
+ * page/PageConfiguration.h:
+ Add a storage namespace provider member.
+
+ * storage/StorageNamespaceProvider.cpp:
+ (WebCore::StorageNamespaceProvider::StorageNamespaceProvider):
+ (WebCore::StorageNamespaceProvider::~StorageNamespaceProvider):
+ (WebCore::StorageNamespaceProvider::addPage):
+ (WebCore::StorageNamespaceProvider::removePage):
+ (WebCore::StorageNamespaceProvider::localStorageNamespace):
+ (WebCore::StorageNamespaceProvider::transientLocalStorageNamespace):
+ * storage/StorageNamespaceProvider.h:
+ Stub out a storage namespace provider class.
+
2014-12-02 Beth Dakin <[email protected]>
More build fixing.
Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (176695 => 176696)
--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj 2014-12-02 23:41:23 UTC (rev 176695)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj 2014-12-03 00:30:17 UTC (rev 176696)
@@ -17858,6 +17858,7 @@
<ClCompile Include="..\storage\StorageMap.cpp" />
<ClCompile Include="..\storage\StorageNamespace.cpp" />
<ClCompile Include="..\storage\StorageNamespaceImpl.cpp" />
+ <ClCompile Include="..\storage\StorageNamespaceProvider.cpp" />
<ClCompile Include="..\storage\StorageSyncManager.cpp" />
<ClCompile Include="..\storage\StorageThread.cpp" />
<ClCompile Include="..\storage\StorageTracker.cpp" />
@@ -21259,6 +21260,7 @@
<ClInclude Include="..\storage\StorageMap.h" />
<ClInclude Include="..\storage\StorageNamespace.h" />
<ClInclude Include="..\storage\StorageNamespaceImpl.h" />
+ <ClInclude Include="..\storage\StorageNamespaceProvider.h" />
<ClInclude Include="..\storage\StorageSyncManager.h" />
<ClInclude Include="..\storage\StorageThread.h" />
<ClInclude Include="..\storage\StorageTracker.h" />
Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (176695 => 176696)
--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters 2014-12-02 23:41:23 UTC (rev 176695)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters 2014-12-03 00:30:17 UTC (rev 176696)
@@ -4704,6 +4704,9 @@
<ClCompile Include="..\storage\StorageNamespaceImpl.cpp">
<Filter>storage</Filter>
</ClCompile>
+ <ClCompile Include="..\storage\StorageNamespaceProvider.cpp">
+ <Filter>storage</Filter>
+ </ClCompile>
<ClCompile Include="..\storage\StorageSyncManager.cpp">
<Filter>storage</Filter>
</ClCompile>
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (176695 => 176696)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2014-12-02 23:41:23 UTC (rev 176695)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2014-12-03 00:30:17 UTC (rev 176696)
@@ -699,6 +699,8 @@
1A3586DF15264C450022A659 /* RenderMultiColumnFlowThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3586DD15264C450022A659 /* RenderMultiColumnFlowThread.cpp */; };
1A3586E015264C450022A659 /* RenderMultiColumnFlowThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3586DE15264C450022A659 /* RenderMultiColumnFlowThread.h */; };
1A3586E115264F950022A659 /* SVGAnimatedIntegerOptionalInteger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71E623CE151F72A60036E2F4 /* SVGAnimatedIntegerOptionalInteger.cpp */; };
+ 1A37636B1A2E68BB009A7EE2 /* StorageNamespaceProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3763691A2E68BB009A7EE2 /* StorageNamespaceProvider.cpp */; };
+ 1A37636C1A2E68BB009A7EE2 /* StorageNamespaceProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A37636A1A2E68BB009A7EE2 /* StorageNamespaceProvider.h */; };
1A3FF9C315265359002288A1 /* RenderNamedFlowThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC85F23E1519187300BC17BE /* RenderNamedFlowThread.cpp */; };
1A494BFA0A122F4400FDAFC1 /* JSHTMLElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A494BF80A122F4400FDAFC1 /* JSHTMLElement.cpp */; };
1A494BFB0A122F4400FDAFC1 /* JSHTMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A494BF90A122F4400FDAFC1 /* JSHTMLElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -7683,6 +7685,8 @@
1A2E6E780CC556D5004A2062 /* SQLiteAuthorizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SQLiteAuthorizer.cpp; path = sql/SQLiteAuthorizer.cpp; sourceTree = "<group>"; };
1A3586DD15264C450022A659 /* RenderMultiColumnFlowThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMultiColumnFlowThread.cpp; sourceTree = "<group>"; };
1A3586DE15264C450022A659 /* RenderMultiColumnFlowThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMultiColumnFlowThread.h; sourceTree = "<group>"; };
+ 1A3763691A2E68BB009A7EE2 /* StorageNamespaceProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageNamespaceProvider.cpp; sourceTree = "<group>"; };
+ 1A37636A1A2E68BB009A7EE2 /* StorageNamespaceProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageNamespaceProvider.h; sourceTree = "<group>"; };
1A494BBB0A122DCD00FDAFC1 /* HTMLElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLElement.idl; sourceTree = "<group>"; };
1A494BF80A122F4400FDAFC1 /* JSHTMLElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLElement.cpp; sourceTree = "<group>"; };
1A494BF90A122F4400FDAFC1 /* JSHTMLElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLElement.h; sourceTree = "<group>"; };
@@ -15130,6 +15134,8 @@
C50D0E810FF4272900AC2644 /* StorageNamespace.h */,
C55E38BC10040D5D00A56BDB /* StorageNamespaceImpl.cpp */,
C55E38BB10040D5D00A56BDB /* StorageNamespaceImpl.h */,
+ 1A3763691A2E68BB009A7EE2 /* StorageNamespaceProvider.cpp */,
+ 1A37636A1A2E68BB009A7EE2 /* StorageNamespaceProvider.h */,
1AB09DB216AF5F6C008538E7 /* StorageStrategy.cpp */,
1AB09DB316AF5F6C008538E7 /* StorageStrategy.h */,
C5102D930FD9AA2D00FAFF04 /* StorageSyncManager.cpp */,
@@ -24779,6 +24785,7 @@
FDF09DC91399B62200688E5B /* JSBiquadFilterNode.h in Headers */,
2E2D99CE10E2BBDA00496337 /* JSBlob.h in Headers */,
1449E24C107D4A8400B5793F /* JSCallbackData.h in Headers */,
+ 1A37636C1A2E68BB009A7EE2 /* StorageNamespaceProvider.h in Headers */,
65DF323A09D1DE65000BE325 /* JSCanvasGradient.h in Headers */,
65DF323C09D1DE65000BE325 /* JSCanvasPattern.h in Headers */,
65DF323C09D1DE65001BE325 /* JSCanvasProxy.h in Headers */,
@@ -28558,6 +28565,7 @@
1A750DD40A90E729000FF215 /* JSNodeIteratorCustom.cpp in Sources */,
BCD9C2C20C17B69E005C90A2 /* JSNodeList.cpp in Sources */,
BCD9C2650C17AA67005C90A2 /* JSNodeListCustom.cpp in Sources */,
+ 1A37636B1A2E68BB009A7EE2 /* StorageNamespaceProvider.cpp in Sources */,
65DF31FD09D1CC60000BE325 /* JSNotation.cpp in Sources */,
33503CA310179AD7003B47E1 /* JSNotification.cpp in Sources */,
33503CA510179AD7003B47E1 /* JSNotificationCenter.cpp in Sources */,
Modified: trunk/Source/WebCore/page/DOMWindow.cpp (176695 => 176696)
--- trunk/Source/WebCore/page/DOMWindow.cpp 2014-12-02 23:41:23 UTC (rev 176695)
+++ trunk/Source/WebCore/page/DOMWindow.cpp 2014-12-03 00:30:17 UTC (rev 176696)
@@ -92,6 +92,7 @@
#include "Storage.h"
#include "StorageArea.h"
#include "StorageNamespace.h"
+#include "StorageNamespaceProvider.h"
#include "StyleMedia.h"
#include "StyleResolver.h"
#include "SuddenTermination.h"
@@ -856,10 +857,18 @@
return nullptr;
RefPtr<StorageArea> storageArea;
- if (!document->securityOrigin()->canAccessLocalStorage(document->topOrigin()))
- storageArea = page->group().transientLocalStorage(document->topOrigin())->storageArea(document->securityOrigin());
- else
- storageArea = page->group().localStorage()->storageArea(document->securityOrigin());
+ if (auto* storageNamespaceProvider = page->storageNamespaceProvider()) {
+ if (document->securityOrigin()->canAccessLocalStorage(document->topOrigin()))
+ storageArea = storageNamespaceProvider->localStorageNamespace().storageArea(document->securityOrigin());
+ else
+ storageArea = storageNamespaceProvider->transientLocalStorageNamespace(*document->topOrigin()).storageArea(document->securityOrigin());
+ } else {
+ // FIXME: Remove this once everyone has transitioned away from using the page group local storage.
+ if (!document->securityOrigin()->canAccessLocalStorage(document->topOrigin()))
+ storageArea = page->group().transientLocalStorage(document->topOrigin())->storageArea(document->securityOrigin());
+ else
+ storageArea = page->group().localStorage()->storageArea(document->securityOrigin());
+ }
if (!storageArea->canAccessStorage(m_frame)) {
ec = SECURITY_ERR;
Modified: trunk/Source/WebCore/page/Page.cpp (176695 => 176696)
--- trunk/Source/WebCore/page/Page.cpp 2014-12-02 23:41:23 UTC (rev 176695)
+++ trunk/Source/WebCore/page/Page.cpp 2014-12-03 00:30:17 UTC (rev 176696)
@@ -79,6 +79,7 @@
#include "SharedBuffer.h"
#include "StorageArea.h"
#include "StorageNamespace.h"
+#include "StorageNamespaceProvider.h"
#include "StyleResolver.h"
#include "SubframeLoader.h"
#include "TextResourceDecoder.h"
@@ -201,6 +202,7 @@
#endif
, m_lastSpatialNavigationCandidatesCount(0) // NOTE: Only called from Internals for Spatial Navigation testing.
, m_framesHandlingBeforeUnloadEvent(0)
+ , m_storageNamespaceProvider(WTF::move(pageConfiguration.storageNamespaceProvider))
, m_userContentController(WTF::move(pageConfiguration.userContentController))
, m_visitedLinkStore(*WTF::move(pageConfiguration.visitedLinkStore))
, m_sessionID(SessionID::defaultSessionID())
@@ -211,6 +213,8 @@
setTimerThrottlingEnabled(m_viewState & ViewState::IsVisuallyIdle);
+ if (m_storageNamespaceProvider)
+ m_storageNamespaceProvider->addPage(*this);
if (m_userContentController)
m_userContentController->addPage(*this);
@@ -1611,6 +1615,17 @@
}
}
+void Page::setStorageNamespaceProvider(PassRef<StorageNamespaceProvider> storageNamespaceProvider)
+{
+ if (m_storageNamespaceProvider)
+ m_storageNamespaceProvider->removePage(*this);
+
+ m_storageNamespaceProvider = WTF::move(storageNamespaceProvider);
+ m_storageNamespaceProvider->addPage(*this);
+
+ // This needs to reset all the local storage namespaces of all the pages.
+}
+
VisitedLinkStore& Page::visitedLinkStore()
{
return m_visitedLinkStore;
Modified: trunk/Source/WebCore/page/Page.h (176695 => 176696)
--- trunk/Source/WebCore/page/Page.h 2014-12-02 23:41:23 UTC (rev 176695)
+++ trunk/Source/WebCore/page/Page.h 2014-12-03 00:30:17 UTC (rev 176696)
@@ -100,6 +100,7 @@
class ScrollingCoordinator;
class Settings;
class StorageNamespace;
+class StorageNamespaceProvider;
class UserContentController;
class ValidationMessageClient;
class ViewStateChangeObserver;
@@ -398,6 +399,9 @@
void setLastSpatialNavigationCandidateCount(unsigned count) { m_lastSpatialNavigationCandidatesCount = count; }
unsigned lastSpatialNavigationCandidateCount() const { return m_lastSpatialNavigationCandidatesCount; }
+ StorageNamespaceProvider* storageNamespaceProvider() { return m_storageNamespaceProvider.get(); }
+ void setStorageNamespaceProvider(PassRef<StorageNamespaceProvider>);
+
UserContentController* userContentController() { return m_userContentController.get(); }
void setUserContentController(UserContentController*);
@@ -566,6 +570,7 @@
unsigned m_lastSpatialNavigationCandidatesCount;
unsigned m_framesHandlingBeforeUnloadEvent;
+ RefPtr<StorageNamespaceProvider> m_storageNamespaceProvider;
RefPtr<UserContentController> m_userContentController;
Ref<VisitedLinkStore> m_visitedLinkStore;
Modified: trunk/Source/WebCore/page/PageConfiguration.cpp (176695 => 176696)
--- trunk/Source/WebCore/page/PageConfiguration.cpp 2014-12-02 23:41:23 UTC (rev 176695)
+++ trunk/Source/WebCore/page/PageConfiguration.cpp 2014-12-03 00:30:17 UTC (rev 176696)
@@ -27,6 +27,7 @@
#include "PageConfiguration.h"
#include "BackForwardClient.h"
+#include "StorageNamespaceProvider.h"
#include "UserContentController.h"
#include "VisitedLinkStore.h"
Modified: trunk/Source/WebCore/page/PageConfiguration.h (176695 => 176696)
--- trunk/Source/WebCore/page/PageConfiguration.h 2014-12-02 23:41:23 UTC (rev 176695)
+++ trunk/Source/WebCore/page/PageConfiguration.h 2014-12-03 00:30:17 UTC (rev 176696)
@@ -44,6 +44,7 @@
class InspectorClient;
class PlugInClient;
class ProgressTrackerClient;
+class StorageNamespaceProvider;
class UserContentController;
class ValidationMessageClient;
class VisitedLinkStore;
@@ -69,6 +70,7 @@
FrameLoaderClient* loaderClientForMainFrame;
DiagnosticLoggingClient* diagnosticLoggingClient;
+ RefPtr<StorageNamespaceProvider> storageNamespaceProvider;
RefPtr<UserContentController> userContentController;
RefPtr<VisitedLinkStore> visitedLinkStore;
};
Added: trunk/Source/WebCore/storage/StorageNamespaceProvider.cpp (0 => 176696)
--- trunk/Source/WebCore/storage/StorageNamespaceProvider.cpp (rev 0)
+++ trunk/Source/WebCore/storage/StorageNamespaceProvider.cpp 2014-12-03 00:30:17 UTC (rev 176696)
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2014 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 "StorageNamespaceProvider.h"
+
+#include "StorageNamespace.h"
+
+namespace WebCore {
+
+StorageNamespaceProvider::StorageNamespaceProvider()
+{
+}
+
+StorageNamespaceProvider::~StorageNamespaceProvider()
+{
+ ASSERT(m_pages.isEmpty());
+}
+
+void StorageNamespaceProvider::addPage(Page& page)
+{
+ ASSERT(!m_pages.contains(&page));
+
+ m_pages.add(&page);
+}
+
+void StorageNamespaceProvider::removePage(Page& page)
+{
+ ASSERT(m_pages.contains(&page));
+
+ m_pages.remove(&page);
+}
+
+StorageNamespace& StorageNamespaceProvider::localStorageNamespace()
+{
+ if (!m_localStorageNamespace)
+ m_localStorageNamespace = createLocalStorageNamespace();
+
+ return *m_localStorageNamespace;
+}
+
+StorageNamespace& StorageNamespaceProvider::transientLocalStorageNamespace(SecurityOrigin& securityOrigin)
+{
+ auto& slot = m_transientLocalStorageMap.add(&securityOrigin, nullptr).iterator->value;
+ if (!slot)
+ slot = createTransientLocalStorageNamespace(securityOrigin);
+
+ return *slot;
+}
+
+}
Added: trunk/Source/WebCore/storage/StorageNamespaceProvider.h (0 => 176696)
--- trunk/Source/WebCore/storage/StorageNamespaceProvider.h (rev 0)
+++ trunk/Source/WebCore/storage/StorageNamespaceProvider.h 2014-12-03 00:30:17 UTC (rev 176696)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2014 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 StorageNamespaceProvider_h
+#define StorageNamespaceProvider_h
+
+#include <WebCore/SecurityOriginHash.h>
+#include <wtf/Forward.h>
+#include <wtf/HashMap.h>
+#include <wtf/HashSet.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class Page;
+class SecurityOrigin;
+class StorageNamespace;
+
+class StorageNamespaceProvider : public RefCounted<StorageNamespaceProvider> {
+public:
+ StorageNamespaceProvider();
+ virtual ~StorageNamespaceProvider();
+
+ StorageNamespace& localStorageNamespace();
+ StorageNamespace& transientLocalStorageNamespace(SecurityOrigin&);
+ virtual RefPtr<StorageNamespace> createSessionStorageNamespace(Page&) = 0;
+
+ void addPage(Page&);
+ void removePage(Page&);
+
+private:
+ virtual RefPtr<StorageNamespace> createLocalStorageNamespace() = 0;
+ virtual RefPtr<StorageNamespace> createTransientLocalStorageNamespace(SecurityOrigin&) = 0;
+
+ HashSet<Page*> m_pages;
+
+ RefPtr<StorageNamespace> m_localStorageNamespace;
+ HashMap<RefPtr<SecurityOrigin>, RefPtr<StorageNamespace>> m_transientLocalStorageMap;
+};
+
+}
+
+#endif // StorageNamespaceProvider_h