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

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

Issue 2592793002: Revert of Change how the quota system computes the total poolsize for temporary storage (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « storage/browser/BUILD.gn ('k') | storage/browser/quota/client_usage_tracker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
56 void GetCachedHostsUsage(std::map<std::string, int64_t>* host_usage) const; 55 void GetCachedHostsUsage(std::map<std::string, int64_t>* host_usage) const;
57 void GetCachedOriginsUsage(std::map<GURL, int64_t>* origin_usage) const; 56 void GetCachedOriginsUsage(std::map<GURL, int64_t>* origin_usage) const;
58 void GetCachedOrigins(std::set<GURL>* origins) const; 57 void GetCachedOrigins(std::set<GURL>* origins) const;
59 bool IsUsageCacheEnabledForOrigin(const GURL& origin) const; 58 bool IsUsageCacheEnabledForOrigin(const GURL& origin) const;
60 void SetUsageCacheEnabled(const GURL& origin, bool enabled); 59 void SetUsageCacheEnabled(const GURL& origin, bool enabled);
61 60
62 private: 61 private:
63 typedef CallbackQueueMap<HostUsageAccumulator, std::string, int64_t, int64_t> 62 typedef CallbackQueueMap<HostUsageAccumulator, std::string, int64_t, int64_t>
64 HostUsageAccumulatorMap; 63 HostUsageAccumulatorMap;
65 64
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 HostUsageAccumulatorMap host_usage_accumulators_; 130 HostUsageAccumulatorMap host_usage_accumulators_;
132 131
133 scoped_refptr<SpecialStoragePolicy> special_storage_policy_; 132 scoped_refptr<SpecialStoragePolicy> special_storage_policy_;
134 133
135 DISALLOW_COPY_AND_ASSIGN(ClientUsageTracker); 134 DISALLOW_COPY_AND_ASSIGN(ClientUsageTracker);
136 }; 135 };
137 136
138 } // namespace storage 137 } // namespace storage
139 138
140 #endif // STORAGE_BROWSER_QUOTA_CLIENT_USAGE_TRACKER_H_ 139 #endif // STORAGE_BROWSER_QUOTA_CLIENT_USAGE_TRACKER_H_
OLDNEW
« no previous file with comments | « storage/browser/BUILD.gn ('k') | storage/browser/quota/client_usage_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698