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

Unified Diff: content/browser/renderer_host/quota_dispatcher_host.cc

Issue 10948006: Cleanup: quota::HostQuotaCallback do not need to pass host and type as arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unittests somehow missed in previous patch Created 8 years, 3 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: content/browser/renderer_host/quota_dispatcher_host.cc
diff --git a/content/browser/renderer_host/quota_dispatcher_host.cc b/content/browser/renderer_host/quota_dispatcher_host.cc
index bb66642b7aeed78dd9946f1a714078d394ef7f45..472e2c0e9e5927deadf1ac024f51a078b9f19e0a 100644
--- a/content/browser/renderer_host/quota_dispatcher_host.cc
+++ b/content/browser/renderer_host/quota_dispatcher_host.cc
@@ -113,7 +113,7 @@ class QuotaDispatcherHost::RequestQuotaDispatcher
quota_manager()->GetPersistentHostQuota(
host_,
base::Bind(&self_type::DidGetHostQuota,
- weak_factory_.GetWeakPtr()));
+ weak_factory_.GetWeakPtr(), host_, type_));
} else {
quota_manager()->GetUsageAndQuota(
origin_, type_,
@@ -123,9 +123,9 @@ class QuotaDispatcherHost::RequestQuotaDispatcher
}
private:
- void DidGetHostQuota(QuotaStatusCode status,
- const std::string& host,
+ void DidGetHostQuota(const std::string& host,
StorageType type,
+ QuotaStatusCode status,
int64 quota) {
DCHECK_EQ(type_, type);
DCHECK_EQ(host_, host);
@@ -165,12 +165,12 @@ class QuotaDispatcherHost::RequestQuotaDispatcher
quota_manager()->SetPersistentHostQuota(
host_, requested_quota_,
base::Bind(&self_type::DidSetHostQuota,
- weak_factory_.GetWeakPtr()));
+ weak_factory_.GetWeakPtr(), host_, type_));
kinuko 2012/09/18 12:03:56 Ditto. Maybe there's no need to bind them here
calvinlo 2012/09/19 03:15:38 Done.
}
- void DidSetHostQuota(QuotaStatusCode status,
- const std::string& host,
+ void DidSetHostQuota(const std::string& host,
StorageType type,
+ QuotaStatusCode status,
int64 new_quota) {
DCHECK_EQ(host_, host);
DCHECK_EQ(type_, type);

Powered by Google App Engine
This is Rietveld 408576698