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

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

Issue 2592793002: Revert of Change how the quota system computes the total poolsize for temporary storage (Closed)
Patch Set: Created 3 years, 12 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
« no previous file with comments | « storage/browser/quota/special_storage_policy.h ('k') | storage/browser/quota/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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_USAGE_TRACKER_H_ 5 #ifndef STORAGE_BROWSER_QUOTA_USAGE_TRACKER_H_
6 #define STORAGE_BROWSER_QUOTA_USAGE_TRACKER_H_ 6 #define STORAGE_BROWSER_QUOTA_USAGE_TRACKER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 29 matching lines...) Expand all
40 40
41 StorageType type() const { return type_; } 41 StorageType type() const { return type_; }
42 ClientUsageTracker* GetClientTracker(QuotaClient::ID client_id); 42 ClientUsageTracker* GetClientTracker(QuotaClient::ID client_id);
43 43
44 void GetGlobalLimitedUsage(const UsageCallback& callback); 44 void GetGlobalLimitedUsage(const UsageCallback& callback);
45 void GetGlobalUsage(const GlobalUsageCallback& callback); 45 void GetGlobalUsage(const GlobalUsageCallback& callback);
46 void GetHostUsage(const std::string& host, const UsageCallback& callback); 46 void GetHostUsage(const std::string& host, const UsageCallback& callback);
47 void UpdateUsageCache(QuotaClient::ID client_id, 47 void UpdateUsageCache(QuotaClient::ID client_id,
48 const GURL& origin, 48 const GURL& origin,
49 int64_t delta); 49 int64_t delta);
50 int64_t GetCachedUsage() const; 50 void GetCachedOriginsUsage(std::map<GURL, int64_t>* origin_usage) const;
51 void GetCachedHostsUsage(std::map<std::string, int64_t>* host_usage) const; 51 void GetCachedHostsUsage(std::map<std::string, int64_t>* host_usage) const;
52 void GetCachedOriginsUsage(std::map<GURL, int64_t>* origin_usage) const;
53 void GetCachedOrigins(std::set<GURL>* origins) const; 52 void GetCachedOrigins(std::set<GURL>* origins) const;
54 bool IsWorking() const { 53 bool IsWorking() const {
55 return global_usage_callbacks_.HasCallbacks() || 54 return global_usage_callbacks_.HasCallbacks() ||
56 host_usage_callbacks_.HasAnyCallbacks(); 55 host_usage_callbacks_.HasAnyCallbacks();
57 } 56 }
58 57
59 void SetUsageCacheEnabled(QuotaClient::ID client_id, 58 void SetUsageCacheEnabled(QuotaClient::ID client_id,
60 const GURL& origin, 59 const GURL& origin,
61 bool enabled); 60 bool enabled);
62 61
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 93
95 StorageMonitor* storage_monitor_; 94 StorageMonitor* storage_monitor_;
96 95
97 base::WeakPtrFactory<UsageTracker> weak_factory_; 96 base::WeakPtrFactory<UsageTracker> weak_factory_;
98 DISALLOW_COPY_AND_ASSIGN(UsageTracker); 97 DISALLOW_COPY_AND_ASSIGN(UsageTracker);
99 }; 98 };
100 99
101 } // namespace storage 100 } // namespace storage
102 101
103 #endif // STORAGE_BROWSER_QUOTA_USAGE_TRACKER_H_ 102 #endif // STORAGE_BROWSER_QUOTA_USAGE_TRACKER_H_
OLDNEW
« no previous file with comments | « storage/browser/quota/special_storage_policy.h ('k') | storage/browser/quota/usage_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698