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

Unified Diff: webkit/appcache/appcache_storage_impl.cc

Issue 8230012: Cleanup AppCacheQuotaClient using new Callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix infinite recursion Created 9 years, 2 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
Index: webkit/appcache/appcache_storage_impl.cc
diff --git a/webkit/appcache/appcache_storage_impl.cc b/webkit/appcache/appcache_storage_impl.cc
index bd16ae2155b2c554f38f55a5ee2f7c90d6d5eb47..248b9c3bbe559a3a247a93f1fc3c5d4a5e9a8274 100644
--- a/webkit/appcache/appcache_storage_impl.cc
+++ b/webkit/appcache/appcache_storage_impl.cc
@@ -549,12 +549,10 @@ void AppCacheStorageImpl::StoreGroupAndCacheTask::GetQuotaThenSchedule() {
}
// We have to ask the quota manager for the value.
- AddRef(); // balanced in the OnQuotaCallback
storage_->pending_quota_queries_.insert(this);
quota_manager->GetUsageAndQuota(
group_record_.origin, quota::kStorageTypeTemporary,
- base::Bind(&StoreGroupAndCacheTask::OnQuotaCallback,
- base::Unretained(this)));
+ base::Bind(&StoreGroupAndCacheTask::OnQuotaCallback, this));
}
void AppCacheStorageImpl::StoreGroupAndCacheTask::OnQuotaCallback(
@@ -567,7 +565,6 @@ void AppCacheStorageImpl::StoreGroupAndCacheTask::OnQuotaCallback(
storage_->pending_quota_queries_.erase(this);
Schedule();
}
- Release(); // balanced in GetQuotaThenSchedule
}
void AppCacheStorageImpl::StoreGroupAndCacheTask::Run() {
« webkit/appcache/appcache_quota_client.cc ('K') | « webkit/appcache/appcache_quota_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698