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

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

Issue 8820009: Appcache, local storage, indexed db, databases: skip exit-time deletion when restarting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review. Created 9 years 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 84acb5ba83f7f2a01f5e9484d87be7b0221a3b4a..f084024358410d67c4e0c1b3d95a6bc888ca4b68 100644
--- a/content/browser/in_process_webkit/dom_storage_context.h
+++ b/content/browser/in_process_webkit/dom_storage_context.h
@@ -109,6 +109,11 @@ class CONTENT_EXPORT DOMStorageContext {
clear_local_state_on_exit_ = clear_local_state;
}
+ // Disables the exit-time deletion for all data (also session-only data).
+ void SaveSessionState() {
+ save_session_state_ = true;
+ }
+
void set_data_path_for_testing(const FilePath& data_path) {
data_path_ = data_path;
}
@@ -116,6 +121,7 @@ class CONTENT_EXPORT DOMStorageContext {
private:
FRIEND_TEST_ALL_PREFIXES(DOMStorageTest, SessionOnly);
+ FRIEND_TEST_ALL_PREFIXES(DOMStorageTest, SaveSessionState);
// Get the local storage instance. The object is owned by this class.
DOMStorageNamespace* CreateLocalStorage();
@@ -145,6 +151,9 @@ class CONTENT_EXPORT DOMStorageContext {
// True if the destructor should delete its files.
bool clear_local_state_on_exit_;
+ // If true, nothing (not even session-only data) should be deleted on exit.
+ bool save_session_state_;
+
// Path where the browser context data is stored.
// TODO(pastarmovj): Keep in mind that unlike indexed db data_path_ variable
// this one still has to point to the upper level dir because of the
« no previous file with comments | « content/browser/appcache/chrome_appcache_service_unittest.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