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

Unified Diff: chrome/browser/profiles/profile_impl.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
« no previous file with comments | « no previous file | content/browser/appcache/chrome_appcache_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index e8f0e9584a4e1c45f4e7df703984ea31b30a9520..4af1734f2ee1bcc6703fd762610d36edce970792 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -169,10 +169,13 @@ FilePath GetMediaCachePath(const FilePath& base) {
}
void SaveSessionStateOnIOThread(
- net::URLRequestContextGetter* url_request_context_getter) {
+ net::URLRequestContextGetter* url_request_context_getter,
+ ChromeAppCacheService* appcache_service) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
url_request_context_getter->GetURLRequestContext()->cookie_store()->
GetCookieMonster()->SaveSessionCookies();
+ if (appcache_service)
+ appcache_service->set_save_session_state(true);
}
} // namespace
@@ -511,9 +514,6 @@ ProfileImpl::~ProfileImpl() {
appcache_service_.get(), true));
}
- if (webkit_context_.get())
- webkit_context_->DeleteSessionOnlyData();
-
StopCreateSessionServiceTimer();
// Remove pref observers
@@ -1584,10 +1584,16 @@ NetworkActionPredictor* ProfileImpl::GetNetworkActionPredictor() {
void ProfileImpl::SaveSessionState() {
if (!session_restore_enabled_)
return;
+ if (webkit_context_.get())
+ webkit_context_->SaveSessionState();
+ if (db_tracker_.get())
+ db_tracker_->SaveSessionState();
+
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&SaveSessionStateOnIOThread,
- make_scoped_refptr(GetRequestContext())));
+ make_scoped_refptr(GetRequestContext()),
+ make_scoped_refptr(appcache_service_.get())));
}
SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() {
« no previous file with comments | « no previous file | content/browser/appcache/chrome_appcache_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698