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

Unified Diff: content/browser/in_process_webkit/indexed_db_context.cc

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/indexed_db_context.cc
diff --git a/content/browser/in_process_webkit/indexed_db_context.cc b/content/browser/in_process_webkit/indexed_db_context.cc
index 7aeb684eef8b20261c9a3dfa862ffeac979cf404..8165724d3047a9d5eaa3a5f43055372bd9bca0b2 100644
--- a/content/browser/in_process_webkit/indexed_db_context.cc
+++ b/content/browser/in_process_webkit/indexed_db_context.cc
@@ -95,6 +95,7 @@ IndexedDBContext::IndexedDBContext(
quota::QuotaManagerProxy* quota_manager_proxy,
base::MessageLoopProxy* webkit_thread_loop)
: clear_local_state_on_exit_(false),
+ save_session_state_(false),
special_storage_policy_(special_storage_policy),
quota_manager_proxy_(quota_manager_proxy) {
if (!webkit_context->is_incognito())
@@ -114,13 +115,15 @@ IndexedDBContext::~IndexedDBContext() {
if (data_path_.empty())
return;
+ if (save_session_state_)
+ return;
+
bool has_session_only_databases =
special_storage_policy_.get() &&
special_storage_policy_->HasSessionOnlyOrigins();
// Clearning only session-only databases, and there are none.
- if (!clear_local_state_on_exit_ &&
- !has_session_only_databases)
+ if (!clear_local_state_on_exit_ && !has_session_only_databases)
return;
// No WEBKIT thread here means we are running in a unit test where no clean
« no previous file with comments | « content/browser/in_process_webkit/indexed_db_context.h ('k') | content/browser/in_process_webkit/webkit_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698