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 |