Index: storage/browser/quota/usage_tracker.cc |
diff --git a/storage/browser/quota/usage_tracker.cc b/storage/browser/quota/usage_tracker.cc |
index e324bfe7d28598e79145a7c5e902c908fae9ef9a..11cb959a2505776a3eb8e156a2edbc8aeeb097a3 100644 |
--- a/storage/browser/quota/usage_tracker.cc |
+++ b/storage/browser/quota/usage_tracker.cc |
@@ -139,6 +139,13 @@ void UsageTracker::UpdateUsageCache(QuotaClient::ID client_id, |
client_tracker->UpdateUsageCache(origin, delta); |
} |
+int64_t UsageTracker::GetCachedUsage() const { |
+ int64_t usage = 0; |
+ for (const auto& client_id_and_tracker : client_tracker_map_) |
+ usage += client_id_and_tracker.second->GetCachedUsage(); |
+ return usage; |
+} |
+ |
void UsageTracker::GetCachedHostsUsage( |
std::map<std::string, int64_t>* host_usage) const { |
DCHECK(host_usage); |