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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 7210006: AppCaches which belong to hosted apps are not protected from deletion (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Moving test helpers to webkit/appcache. Created 9 years, 5 months 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 | « chrome/browser/profiles/profile.cc ('k') | chrome/chrome_tests.gypi » ('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 0cbc653fe489f536df0a09c2f0652d9f36034197..8f0b93a22e1c39766f48c1583a66c668111bf257 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -594,6 +594,15 @@ ProfileImpl::~ProfileImpl() {
Source<Profile>(this),
NotificationService::NoDetails());
+ if (appcache_service_ && clear_local_state_on_exit_) {
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ NewRunnableMethod(
+ appcache_service_.get(),
+ &appcache::AppCacheService::set_clear_local_state_on_exit,
+ true));
+ }
+
StopCreateSessionServiceTimer();
// Remove pref observers
@@ -1337,8 +1346,7 @@ void ProfileImpl::CreateQuotaManagerAndClients() {
IsOffTheRecord()
? FilePath() : GetPath().Append(chrome::kAppCacheDirname),
&GetResourceContext(),
- make_scoped_refptr(GetExtensionSpecialStoragePolicy()),
- clear_local_state_on_exit_));
+ make_scoped_refptr(GetExtensionSpecialStoragePolicy())));
}
WebKitContext* ProfileImpl::GetWebKitContext() {
@@ -1393,10 +1401,6 @@ void ProfileImpl::Observe(int type,
webkit_context_->set_clear_local_state_on_exit(
clear_local_state_on_exit_);
}
- if (appcache_service_) {
- appcache_service_->SetClearLocalStateOnExit(
- clear_local_state_on_exit_);
- }
if (db_tracker_) {
db_tracker_->SetClearLocalStateOnExit(
clear_local_state_on_exit_);
« no previous file with comments | « chrome/browser/profiles/profile.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698