diff options
Diffstat (limited to 'storage/browser/quota/client_usage_tracker.cc')
-rw-r--r-- | storage/browser/quota/client_usage_tracker.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/storage/browser/quota/client_usage_tracker.cc b/storage/browser/quota/client_usage_tracker.cc index 968b351..0b11bd1 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::GetCachedOriginsUsage( + 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_) { |