Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1390)

Unified Diff: content/browser/in_process_webkit/dom_storage_context.h

Issue 8929007: Restore sessionStorage when chrome restarts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix: cloning storage areas. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « content/browser/in_process_webkit/dom_storage_area.cc ('k') | content/browser/in_process_webkit/dom_storage_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698