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

Side by Side Diff: storage/browser/quota/client_usage_tracker.h

Issue 1782053004: Change how the quota system computes the total poolsize for temporary storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef STORAGE_BROWSER_QUOTA_CLIENT_USAGE_TRACKER_H_ 5 #ifndef STORAGE_BROWSER_QUOTA_CLIENT_USAGE_TRACKER_H_
6 #define STORAGE_BROWSER_QUOTA_CLIENT_USAGE_TRACKER_H_ 6 #define STORAGE_BROWSER_QUOTA_CLIENT_USAGE_TRACKER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 QuotaClient* client, 45 QuotaClient* client,
46 StorageType type, 46 StorageType type,
47 SpecialStoragePolicy* special_storage_policy, 47 SpecialStoragePolicy* special_storage_policy,
48 StorageMonitor* storage_monitor); 48 StorageMonitor* storage_monitor);
49 ~ClientUsageTracker() override; 49 ~ClientUsageTracker() override;
50 50
51 void GetGlobalLimitedUsage(const UsageCallback& callback); 51 void GetGlobalLimitedUsage(const UsageCallback& callback);
52 void GetGlobalUsage(const GlobalUsageCallback& callback); 52 void GetGlobalUsage(const GlobalUsageCallback& callback);
53 void GetHostUsage(const std::string& host, const UsageCallback& callback); 53 void GetHostUsage(const std::string& host, const UsageCallback& callback);
54 void UpdateUsageCache(const GURL& origin, int64_t delta); 54 void UpdateUsageCache(const GURL& origin, int64_t delta);
55 int64_t GetCachedUsage() const;
55 void GetCachedHostsUsage(std::map<std::string, int64_t>* host_usage) const; 56 void GetCachedHostsUsage(std::map<std::string, int64_t>* host_usage) const;
56 void GetCachedOriginsUsage(std::map<GURL, int64_t>* origin_usage) const; 57 void GetCachedOriginsUsage(std::map<GURL, int64_t>* origin_usage) const;
57 void GetCachedOrigins(std::set<GURL>* origins) const; 58 void GetCachedOrigins(std::set<GURL>* origins) const;
58 bool IsUsageCacheEnabledForOrigin(const GURL& origin) const; 59 bool IsUsageCacheEnabledForOrigin(const GURL& origin) const;
59 void SetUsageCacheEnabled(const GURL& origin, bool enabled); 60 void SetUsageCacheEnabled(const GURL& origin, bool enabled);
60 61
61 private: 62 private:
62 typedef CallbackQueueMap<HostUsageAccumulator, std::string, int64_t, int64_t> 63 typedef CallbackQueueMap<HostUsageAccumulator, std::string, int64_t, int64_t>
63 HostUsageAccumulatorMap; 64 HostUsageAccumulatorMap;
64 65
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 HostUsageAccumulatorMap host_usage_accumulators_; 131 HostUsageAccumulatorMap host_usage_accumulators_;
131 132
132 scoped_refptr<SpecialStoragePolicy> special_storage_policy_; 133 scoped_refptr<SpecialStoragePolicy> special_storage_policy_;
133 134
134 DISALLOW_COPY_AND_ASSIGN(ClientUsageTracker); 135 DISALLOW_COPY_AND_ASSIGN(ClientUsageTracker);
135 }; 136 };
136 137
137 } // namespace storage 138 } // namespace storage
138 139
139 #endif // STORAGE_BROWSER_QUOTA_CLIENT_USAGE_TRACKER_H_ 140 #endif // STORAGE_BROWSER_QUOTA_CLIENT_USAGE_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698