Index: content/browser/in_process_webkit/dom_storage_context.h |
diff --git a/content/browser/in_process_webkit/dom_storage_context.h b/content/browser/in_process_webkit/dom_storage_context.h |
index 05e404043933470b3198d1cf25b8686e51421ea8..0309679e7d07011dd8241a9dd688cf5036695f0d 100644 |
--- a/content/browser/in_process_webkit/dom_storage_context.h |
+++ b/content/browser/in_process_webkit/dom_storage_context.h |
@@ -67,6 +67,12 @@ class CONTENT_EXPORT DOMStorageContext { |
// namespace if it hasn't been already. |
DOMStorageNamespace* GetStorageNamespace(int64 id, bool allocation_allowed); |
+ // Creates a session storage namespace which is backed up by the existing |
+ // |session_storage_directory|. |
+ DOMStorageNamespace* RecreateSessionStorageNamespace( |
+ int64 id, |
+ const FilePath& session_storage_directory); |
+ |
// Sometimes an event from one DOM storage message filter requires |
// communication to all of them. |
typedef std::set<DOMStorageMessageFilter*> MessageFilterSet; |
@@ -94,6 +100,9 @@ class CONTENT_EXPORT DOMStorageContext { |
// The local storage directory. |
static const FilePath::CharType kLocalStorageDirectory[]; |
+ // The session storage directory. |
+ static const FilePath::CharType kSessionStorageDirectory[]; |
+ |
// The local storage file extension. |
static const FilePath::CharType kLocalStorageExtension[]; |
@@ -113,6 +122,10 @@ class CONTENT_EXPORT DOMStorageContext { |
data_path_ = data_path; |
} |
+ // Deletes the session storages which are not in |needed_session_storages|. |
+ void DeleteUnneededSessionStorages( |
+ const std::set<std::string>& needed_session_storages); |
+ |
private: |
FRIEND_TEST_ALL_PREFIXES(DOMStorageTest, SessionOnly); |
@@ -132,7 +145,8 @@ class CONTENT_EXPORT DOMStorageContext { |
// That said, we know this is safe because this class is destroyed on the |
// WebKit thread, so there's no way it could be destroyed before this is run. |
static void CompleteCloningSessionStorage(DOMStorageContext* context, |
- int64 existing_id, int64 clone_id); |
+ int64 existing_id, int64 clone_id, |
+ const FilePath& data_path); |
// The last used storage_area_id and storage_namespace_id's. For the storage |
// namespaces, IDs allocated on the UI thread are positive and count up while |