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

Unified Diff: webkit/quota/quota_manager.cc

Issue 15695003: [Quota][Clean up] Drop StorageType in GlobalUsageCallback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: drop unrelated change Created 7 years, 7 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 | « webkit/quota/quota_manager.h ('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 03de7c1a80effdfd01434a0ec1ebbf70c8072ecb..c3caa9522967800b3718b42816dedd59b9ba58c0 100644
--- a/webkit/quota/quota_manager.cc
+++ b/webkit/quota/quota_manager.cc
@@ -398,8 +398,7 @@ class UsageAndQuotaCallbackDispatcher
CheckCompleted();
}
- void DidGetGlobalUsage(StorageType type,
- int64 usage,
+ void DidGetGlobalUsage(int64 usage,
int64 unlimited_usage) {
if (status_ == kQuotaStatusUnknown)
status_ = kQuotaStatusOk;
@@ -487,13 +486,16 @@ class QuotaManager::GetUsageInfoTask : public QuotaTask {
// This will populate cached hosts and usage info.
manager()->GetUsageTracker(kStorageTypeTemporary)->GetGlobalUsage(
base::Bind(&GetUsageInfoTask::DidGetGlobalUsage,
- weak_factory_.GetWeakPtr()));
+ weak_factory_.GetWeakPtr(),
+ kStorageTypeTemporary));
manager()->GetUsageTracker(kStorageTypePersistent)->GetGlobalUsage(
base::Bind(&GetUsageInfoTask::DidGetGlobalUsage,
- weak_factory_.GetWeakPtr()));
+ weak_factory_.GetWeakPtr(),
+ kStorageTypePersistent));
manager()->GetUsageTracker(kStorageTypeSyncable)->GetGlobalUsage(
base::Bind(&GetUsageInfoTask::DidGetGlobalUsage,
- weak_factory_.GetWeakPtr()));
+ weak_factory_.GetWeakPtr(),
+ kStorageTypeSyncable));
}
virtual void Completed() OVERRIDE {
@@ -1346,10 +1348,10 @@ void QuotaManager::ReportHistogram() {
}
void QuotaManager::DidGetTemporaryGlobalUsageForHistogram(
- StorageType type,
int64 usage,
int64 unlimited_usage) {
UMA_HISTOGRAM_MBYTES("Quota.GlobalUsageOfTemporaryStorage", usage);
+ StorageType type = kStorageTypeTemporary;
std::set<GURL> origins;
GetCachedOrigins(type, &origins);
kinuko 2013/05/22 10:51:33 You could simply specify kStorageTypeTemporary her
tzik 2013/05/22 11:33:48 Done.
@@ -1369,10 +1371,10 @@ void QuotaManager::DidGetTemporaryGlobalUsageForHistogram(
}
void QuotaManager::DidGetPersistentGlobalUsageForHistogram(
- StorageType type,
int64 usage,
int64 unlimited_usage) {
UMA_HISTOGRAM_MBYTES("Quota.GlobalUsageOfPersistentStorage", usage);
+ StorageType type = kStorageTypePersistent;
std::set<GURL> origins;
GetCachedOrigins(type, &origins);
kinuko 2013/05/22 10:51:33 ditto.
tzik 2013/05/22 11:33:48 Done.
« no previous file with comments | « webkit/quota/quota_manager.h ('k') | webkit/quota/quota_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698