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

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: Fixes for Kinuko San Review #1 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..0d8876d445fb5d918a439279dfb9ba27d99cc4d9 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);
@@ -164,16 +164,10 @@ class QuotaDispatcherHost::RequestQuotaDispatcher
// Now we're allowed to set the new quota.
quota_manager()->SetPersistentHostQuota(
host_, requested_quota_,
- base::Bind(&self_type::DidSetHostQuota,
- weak_factory_.GetWeakPtr()));
+ base::Bind(&self_type::DidSetHostQuota, weak_factory_.GetWeakPtr()));
}
- void DidSetHostQuota(QuotaStatusCode status,
- const std::string& host,
- StorageType type,
- int64 new_quota) {
- DCHECK_EQ(host_, host);
- DCHECK_EQ(type_, type);
+ void DidSetHostQuota(QuotaStatusCode status, int64 new_quota) {
DidFinish(status, new_quota);
}

Powered by Google App Engine
This is Rietveld 408576698