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

Side by Side Diff: storage/browser/quota/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 3 years, 10 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;
51 void GetCachedHostsUsage(std::map<std::string, int64_t>* host_usage) const;
50 void GetCachedOriginsUsage(std::map<GURL, int64_t>* origin_usage) const; 52 void GetCachedOriginsUsage(std::map<GURL, int64_t>* origin_usage) const;
51 void GetCachedHostsUsage(std::map<std::string, int64_t>* host_usage) const;
52 void GetCachedOrigins(std::set<GURL>* origins) const; 53 void GetCachedOrigins(std::set<GURL>* origins) const;
53 bool IsWorking() const { 54 bool IsWorking() const {
54 return global_usage_callbacks_.HasCallbacks() || 55 return global_usage_callbacks_.HasCallbacks() ||
55 host_usage_callbacks_.HasAnyCallbacks(); 56 host_usage_callbacks_.HasAnyCallbacks();
56 } 57 }
57 58
58 void SetUsageCacheEnabled(QuotaClient::ID client_id, 59 void SetUsageCacheEnabled(QuotaClient::ID client_id,
59 const GURL& origin, 60 const GURL& origin,
60 bool enabled); 61 bool enabled);
61 62
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 94
94 StorageMonitor* storage_monitor_; 95 StorageMonitor* storage_monitor_;
95 96
96 base::WeakPtrFactory<UsageTracker> weak_factory_; 97 base::WeakPtrFactory<UsageTracker> weak_factory_;
97 DISALLOW_COPY_AND_ASSIGN(UsageTracker); 98 DISALLOW_COPY_AND_ASSIGN(UsageTracker);
98 }; 99 };
99 100
100 } // namespace storage 101 } // namespace storage
101 102
102 #endif // STORAGE_BROWSER_QUOTA_USAGE_TRACKER_H_ 103 #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