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

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

Issue 1321733004: Use the site engagement eviction policy for temporary storage eviction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_eviction_policy
Patch Set: Created 5 years, 3 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/quota_manager.cc ('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 <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 28 matching lines...) Expand all
39 StorageType type() const { return type_; } 39 StorageType type() const { return type_; }
40 ClientUsageTracker* GetClientTracker(QuotaClient::ID client_id); 40 ClientUsageTracker* GetClientTracker(QuotaClient::ID client_id);
41 41
42 void GetGlobalLimitedUsage(const UsageCallback& callback); 42 void GetGlobalLimitedUsage(const UsageCallback& callback);
43 void GetGlobalUsage(const GlobalUsageCallback& callback); 43 void GetGlobalUsage(const GlobalUsageCallback& callback);
44 void GetHostUsage(const std::string& host, const UsageCallback& callback); 44 void GetHostUsage(const std::string& host, const UsageCallback& callback);
45 void UpdateUsageCache(QuotaClient::ID client_id, 45 void UpdateUsageCache(QuotaClient::ID client_id,
46 const GURL& origin, 46 const GURL& origin,
47 int64 delta); 47 int64 delta);
48 void GetCachedHostsUsage(std::map<std::string, int64>* host_usage) const; 48 void GetCachedHostsUsage(std::map<std::string, int64>* host_usage) const;
49 void GetCachedOriginsUsage(std::map<GURL, int64>* origin_usage) const;
49 void GetCachedOrigins(std::set<GURL>* origins) const; 50 void GetCachedOrigins(std::set<GURL>* origins) const;
50 bool IsWorking() const { 51 bool IsWorking() const {
51 return global_usage_callbacks_.HasCallbacks() || 52 return global_usage_callbacks_.HasCallbacks() ||
52 host_usage_callbacks_.HasAnyCallbacks(); 53 host_usage_callbacks_.HasAnyCallbacks();
53 } 54 }
54 55
55 void SetUsageCacheEnabled(QuotaClient::ID client_id, 56 void SetUsageCacheEnabled(QuotaClient::ID client_id,
56 const GURL& origin, 57 const GURL& origin,
57 bool enabled); 58 bool enabled);
58 59
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 92
92 StorageMonitor* storage_monitor_; 93 StorageMonitor* storage_monitor_;
93 94
94 base::WeakPtrFactory<UsageTracker> weak_factory_; 95 base::WeakPtrFactory<UsageTracker> weak_factory_;
95 DISALLOW_COPY_AND_ASSIGN(UsageTracker); 96 DISALLOW_COPY_AND_ASSIGN(UsageTracker);
96 }; 97 };
97 98
98 } // namespace storage 99 } // namespace storage
99 100
100 #endif // STORAGE_BROWSER_QUOTA_USAGE_TRACKER_H_ 101 #endif // STORAGE_BROWSER_QUOTA_USAGE_TRACKER_H_
OLDNEW
« no previous file with comments | « storage/browser/quota/quota_manager.cc ('k') | storage/browser/quota/usage_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698