Chromium Code Reviews| Index: storage/browser/quota/client_usage_tracker.cc |
| diff --git a/storage/browser/quota/client_usage_tracker.cc b/storage/browser/quota/client_usage_tracker.cc |
| index 968b35181a18aaa0651d3dd75dbe46174e5c7541..55c1438019f390910c8bc1adbdc3f470ce3bcfd2 100644 |
| --- a/storage/browser/quota/client_usage_tracker.cc |
| +++ b/storage/browser/quota/client_usage_tracker.cc |
| @@ -173,6 +173,15 @@ void ClientUsageTracker::GetCachedHostsUsage( |
| } |
| } |
| +void ClientUsageTracker::GetUsageForCachedOrigins( |
|
raymes
2015/09/22 06:08:49
What's the difference between this and the above f
calamity
2015/09/23 01:46:24
This one considers ports and scheme etc. The one a
raymes
2015/09/23 01:56:14
Should we use the same naming convention? GetCache
calamity
2015/09/23 02:15:56
There was a method that was already named that in
|
| + std::map<GURL, int64>* origin_usage) const { |
| + DCHECK(origin_usage); |
| + for (const auto& host_and_usage_map : cached_usage_by_host_) { |
| + for (const auto& origin_and_usage : host_and_usage_map.second) |
| + (*origin_usage)[origin_and_usage.first] += origin_and_usage.second; |
| + } |
| +} |
| + |
| void ClientUsageTracker::GetCachedOrigins(std::set<GURL>* origins) const { |
| DCHECK(origins); |
| for (const auto& host_and_usage_map : cached_usage_by_host_) { |