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

Unified Diff: webkit/quota/quota_manager.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 | « content/browser/renderer_host/quota_dispatcher_host.cc ('k') | webkit/quota/quota_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/quota/quota_manager.cc
diff --git a/webkit/quota/quota_manager.cc b/webkit/quota/quota_manager.cc
index 33ee65aa5749a6b085e89d98922d8ba0ed16c5b6..d24fb6b150f0068e4fddc1d81b9a7b46fe68db82 100644
--- a/webkit/quota/quota_manager.cc
+++ b/webkit/quota/quota_manager.cc
@@ -236,9 +236,9 @@ class QuotaManager::UsageAndQuotaDispatcherTask : public QuotaTask {
CheckCompleted();
}
- void DidGetHostQuota(QuotaStatusCode status,
- const std::string& host,
+ void DidGetHostQuota(const std::string& host,
StorageType type,
+ QuotaStatusCode status,
int64 host_quota) {
DCHECK_EQ(this->host(), host);
DCHECK_EQ(this->type(), type);
@@ -362,7 +362,7 @@ class QuotaManager::UsageAndQuotaDispatcherTask : public QuotaTask {
HostQuotaCallback NewWaitableHostQuotaCallback() {
++waiting_callbacks_;
return base::Bind(&UsageAndQuotaDispatcherTask::DidGetHostQuota,
- weak_factory_.GetWeakPtr());
+ weak_factory_.GetWeakPtr(), host(), type());
}
AvailableSpaceCallback NewWaitableAvailableSpaceCallback() {
++waiting_callbacks_;
@@ -1020,7 +1020,7 @@ void QuotaManager::GetPersistentHostQuota(const std::string& host,
// This could happen if we are called on file:///.
// TODO(kinuko) We may want to respect --allow-file-access-from-files
// command line switch.
- callback.Run(kQuotaStatusOk, host, kStorageTypePersistent, 0);
+ callback.Run(kQuotaStatusOk, 0);
return;
}
@@ -1043,18 +1043,16 @@ void QuotaManager::SetPersistentHostQuota(const std::string& host,
LazyInitialize();
if (host.empty()) {
// This could happen if we are called on file:///.
- callback.Run(kQuotaErrorNotSupported, host, kStorageTypePersistent, 0);
+ callback.Run(kQuotaErrorNotSupported, 0);
return;
}
if (new_quota < 0) {
- callback.Run(kQuotaErrorInvalidModification,
- host, kStorageTypePersistent, -1);
+ callback.Run(kQuotaErrorInvalidModification, -1);
return;
}
if (db_disabled_) {
- callback.Run(kQuotaErrorInvalidAccess,
- host, kStorageTypePersistent, -1);
+ callback.Run(kQuotaErrorInvalidAccess, -1);
return;
}
@@ -1502,7 +1500,7 @@ void QuotaManager::DidGetPersistentHostQuota(const HostQuotaCallback& callback,
const int64* quota,
bool success) {
DidDatabaseWork(success);
- callback.Run(kQuotaStatusOk, host, kStorageTypePersistent, *quota);
+ callback.Run(kQuotaStatusOk, *quota);
}
void QuotaManager::DidSetPersistentHostQuota(const std::string& host,
@@ -1510,8 +1508,7 @@ void QuotaManager::DidSetPersistentHostQuota(const std::string& host,
const int64* new_quota,
bool success) {
DidDatabaseWork(success);
- callback.Run(success ? kQuotaStatusOk : kQuotaErrorInvalidAccess,
- host, kStorageTypePersistent, *new_quota);
+ callback.Run(success ? kQuotaStatusOk : kQuotaErrorInvalidAccess, *new_quota);
}
void QuotaManager::DidInitialize(int64* temporary_quota_override,
« no previous file with comments | « content/browser/renderer_host/quota_dispatcher_host.cc ('k') | webkit/quota/quota_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698