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

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: testfix 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..a53cf620427910a9b2bebebd8043eef663ca5511 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,13 +1348,12 @@ void QuotaManager::ReportHistogram() {
}
void QuotaManager::DidGetTemporaryGlobalUsageForHistogram(
- StorageType type,
int64 usage,
int64 unlimited_usage) {
UMA_HISTOGRAM_MBYTES("Quota.GlobalUsageOfTemporaryStorage", usage);
std::set<GURL> origins;
- GetCachedOrigins(type, &origins);
+ GetCachedOrigins(kStorageTypeTemporary, &origins);
size_t num_origins = origins.size();
size_t protected_origins = 0;
@@ -1369,13 +1370,12 @@ void QuotaManager::DidGetTemporaryGlobalUsageForHistogram(
}
void QuotaManager::DidGetPersistentGlobalUsageForHistogram(
- StorageType type,
int64 usage,
int64 unlimited_usage) {
UMA_HISTOGRAM_MBYTES("Quota.GlobalUsageOfPersistentStorage", usage);
std::set<GURL> origins;
- GetCachedOrigins(type, &origins);
+ GetCachedOrigins(kStorageTypePersistent, &origins);
size_t num_origins = origins.size();
size_t protected_origins = 0;
« 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