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

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 missed compile errors in unit_tests and fixed broken QuotaManagerTests 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
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc ('k') | webkit/quota/quota_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc ('k') | webkit/quota/quota_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698