diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/page/PageGroup.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/page/PageGroup.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/3rdparty/webkit/WebCore/page/PageGroup.cpp b/src/3rdparty/webkit/WebCore/page/PageGroup.cpp index f0951eb..5155be1 100644 --- a/src/3rdparty/webkit/WebCore/page/PageGroup.cpp +++ b/src/3rdparty/webkit/WebCore/page/PageGroup.cpp @@ -32,8 +32,7 @@ #include "Settings.h" #if ENABLE(DOM_STORAGE) -#include "LocalStorage.h" -#include "StorageArea.h" +#include "StorageNamespace.h" #endif #if PLATFORM(CHROMIUM) @@ -97,8 +96,8 @@ void PageGroup::closeLocalStorage() PageGroupMap::iterator end = pageGroups->end(); for (PageGroupMap::iterator it = pageGroups->begin(); it != end; ++it) { - if (LocalStorage* localStorage = it->second->localStorage()) - localStorage->close(); + if (it->second->hasLocalStorage()) + it->second->localStorage()->close(); } #endif } @@ -108,10 +107,6 @@ void PageGroup::addPage(Page* page) ASSERT(page); ASSERT(!m_pages.contains(page)); m_pages.add(page); -#if ENABLE(DOM_STORAGE) - if (!m_localStorage) - m_localStorage = LocalStorage::localStorage(page->settings()->localStorageDatabasePath()); -#endif } void PageGroup::removePage(Page* page) @@ -185,8 +180,15 @@ void PageGroup::setShouldTrackVisitedLinks(bool shouldTrack) } #if ENABLE(DOM_STORAGE) -LocalStorage* PageGroup::localStorage() +StorageNamespace* PageGroup::localStorage() { + if (!m_localStorage) { + // Need a page in this page group to query the settings for the local storage database path. + Page* page = *m_pages.begin(); + ASSERT(page); + m_localStorage = StorageNamespace::localStorageNamespace(page->settings()->localStorageDatabasePath()); + } + return m_localStorage.get(); } #endif |