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

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

Issue 9963107: Persist sessionStorage on disk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review (pkasting) Created 8 years, 4 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
« no previous file with comments | « content/browser/dom_storage/dom_storage_context_impl.cc ('k') | webkit/dom_storage/dom_storage_area.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/dom_storage_context.h
diff --git a/content/public/browser/dom_storage_context.h b/content/public/browser/dom_storage_context.h
index 99f8cd142e883dea54a970d99baf227d78414cda..782663308150843f9684831102d756014b1d6329 100644
--- a/content/public/browser/dom_storage_context.h
+++ b/content/public/browser/dom_storage_context.h
@@ -31,6 +31,12 @@ class DOMStorageContext {
// Deletes the local storage data for the given origin.
virtual void DeleteOrigin(const GURL& origin) = 0;
+ // If this is called, sessionStorage data will be stored on disk, and can be
+ // restored after a browser restart (with RecreateSessionStorage). This
+ // function must be called right after DOMStorageContextImpl is created, and
+ // before it's used.
+ virtual void SetSaveSessionStorageOnDisk() = 0;
+
// Creates a SessionStorageNamespace with the given |persistent_id|. Used
// after tabs are restored by session restore. When created, the
// SessionStorageNamespace with the correct |persistent_id| will be
@@ -38,6 +44,11 @@ class DOMStorageContext {
virtual scoped_refptr<SessionStorageNamespace> RecreateSessionStorage(
const std::string& persistent_id) = 0;
+ // Starts deleting sessionStorages which don't have an associated
+ // SessionStorageNamespace alive. Called when SessionStorageNamespaces have
+ // been created after a session restore, or a session restore won't happen.
+ virtual void StartScavengingUnusedSessionStorage() = 0;
+
protected:
virtual ~DOMStorageContext() {}
};
« no previous file with comments | « content/browser/dom_storage/dom_storage_context_impl.cc ('k') | webkit/dom_storage/dom_storage_area.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698