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

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

Issue 9963107: Persist sessionStorage on disk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: code review Created 8 years, 5 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/public/browser/browser_context.h
diff --git a/content/public/browser/browser_context.h b/content/public/browser/browser_context.h
index 487246aa0375a8e1542c800ee56a25e3667efc91..801e7ead669455f9bd3f587bfb6421d1e0c4e1d9 100644
--- a/content/public/browser/browser_context.h
+++ b/content/public/browser/browser_context.h
@@ -73,6 +73,7 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
// Tells the HTML5 objects on this context to purge any uneeded memory.
static void PurgeMemory(BrowserContext* browser_context);
+ BrowserContext();
virtual ~BrowserContext();
// Returns the path of the directory where this context's data is stored.
@@ -123,6 +124,19 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
// Returns a special storage policy implementation, or NULL.
virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() = 0;
+
+ // Controls if sessionStorage should be saved on disk. This function must be
+ // called before any of the services are requested (see static getters
+ // above). Even if |save_session_storage_on_disk| is true, sessionStorage
+ // won't be saved if |IsOffTheRecord| returns true.
+ void SetSaveSessionStorageOnDisk(bool save_session_storage_on_disk);
+
+ bool save_session_storage_on_disk() const {
+ return save_session_storage_on_disk_;
+ }
+
+private:
+ bool save_session_storage_on_disk_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698