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

Unified Diff: webkit/appcache/appcache_service.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 | « webkit/appcache/appcache_service.h ('k') | webkit/appcache/appcache_storage_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache_service.cc
diff --git a/webkit/appcache/appcache_service.cc b/webkit/appcache/appcache_service.cc
index bc0f4cc17207a60a3d94bbb10b5f744859de110a..dce47baf5ed31925ba852d2dabdba6927e390f87 100644
--- a/webkit/appcache/appcache_service.cc
+++ b/webkit/appcache/appcache_service.cc
@@ -273,7 +273,7 @@ void AppCacheService::GetInfoHelper::OnAllInfo(
AppCacheService::AppCacheService(quota::QuotaManagerProxy* quota_manager_proxy)
: appcache_policy_(NULL), quota_client_(NULL),
quota_manager_proxy_(quota_manager_proxy),
- request_context_(NULL) {
+ request_context_(NULL), clear_local_state_on_exit_(false) {
if (quota_manager_proxy_) {
quota_client_ = new AppCacheQuotaClient(this);
quota_manager_proxy_->RegisterClient(quota_client_);
@@ -288,6 +288,10 @@ AppCacheService::~AppCacheService() {
STLDeleteElements(&pending_helpers_);
if (quota_client_)
quota_client_->NotifyAppCacheDestroyed();
+
+ // Destroy storage_ first; ~AppCacheStorageImpl accesses other data members
+ // (special_storage_policy_).
+ storage_.reset();
}
void AppCacheService::Initialize(const FilePath& cache_directory,
« no previous file with comments | « webkit/appcache/appcache_service.h ('k') | webkit/appcache/appcache_storage_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698