| 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() {
|
|
|