diff options
Diffstat (limited to 'Source/WebCore/page/PageGroup.cpp')
-rw-r--r-- | Source/WebCore/page/PageGroup.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Source/WebCore/page/PageGroup.cpp b/Source/WebCore/page/PageGroup.cpp index 96e7301..d53de08 100644 --- a/Source/WebCore/page/PageGroup.cpp +++ b/Source/WebCore/page/PageGroup.cpp @@ -33,6 +33,7 @@ #include "GroupSettings.h" #include "IDBFactoryBackendInterface.h" #include "Page.h" +#include "SecurityOrigin.h" #include "Settings.h" #include "StorageNamespace.h" @@ -115,12 +116,19 @@ void PageGroup::closeLocalStorage() #endif } +<<<<<<< HEAD #if ENABLE(DOM_STORAGE) && defined(ANDROID) void PageGroup::clearDomStorage() +======= +#if ENABLE(DOM_STORAGE) + +void PageGroup::clearLocalStorageForAllOrigins() +>>>>>>> webkit.org at r82507 { if (!pageGroups) return; +<<<<<<< HEAD PageGroupMap::iterator end = pageGroups->end(); @@ -198,6 +206,47 @@ void PageGroup::removeLocalStorage() m_localStorage = 0; } +======= + PageGroupMap::iterator end = pageGroups->end(); + for (PageGroupMap::iterator it = pageGroups->begin(); it != end; ++it) { + if (it->second->hasLocalStorage()) + it->second->localStorage()->clearAllOriginsForDeletion(); + } +} + +void PageGroup::clearLocalStorageForOrigin(SecurityOrigin* origin) +{ + if (!pageGroups) + return; + + PageGroupMap::iterator end = pageGroups->end(); + for (PageGroupMap::iterator it = pageGroups->begin(); it != end; ++it) { + if (it->second->hasLocalStorage()) + it->second->localStorage()->clearOriginForDeletion(origin); + } +} + +void PageGroup::syncLocalStorage() +{ + if (!pageGroups) + return; + + PageGroupMap::iterator end = pageGroups->end(); + for (PageGroupMap::iterator it = pageGroups->begin(); it != end; ++it) { + if (it->second->hasLocalStorage()) + it->second->localStorage()->sync(); + } +} + +unsigned PageGroup::numberOfPageGroups() +{ + if (!pageGroups) + return 0; + + return pageGroups->size(); +} + +>>>>>>> webkit.org at r82507 #endif void PageGroup::addPage(Page* page) @@ -299,6 +348,7 @@ StorageNamespace* PageGroup::localStorage() return m_localStorage.get(); } + #endif #if ENABLE(INDEXED_DATABASE) |