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

Unified Diff: storage/browser/quota/quota_manager.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « storage/browser/quota/client_usage_tracker.cc ('k') | storage/browser/quota/quota_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/quota/quota_manager.h
diff --git a/storage/browser/quota/quota_manager.h b/storage/browser/quota/quota_manager.h
index 506aa0ad05f806d9bd3ec58f1734ca2829a97229..a03d5279187351b289235238573ec505dae0c501 100644
--- a/storage/browser/quota/quota_manager.h
+++ b/storage/browser/quota/quota_manager.h
@@ -139,7 +139,12 @@ class STORAGE_EXPORT QuotaManager
const base::FilePath& profile_path,
const scoped_refptr<base::SingleThreadTaskRunner>& io_thread,
const scoped_refptr<base::SequencedTaskRunner>& db_thread,
- const scoped_refptr<SpecialStoragePolicy>& special_storage_policy);
+ const scoped_refptr<SpecialStoragePolicy>& special_storage_policy,
+ QuotaEvictionPolicy* temporary_storage_eviction_policy);
+
+ void set_temporary_storage_eviction_policy(QuotaEvictionPolicy* policy) {
+ temporary_storage_eviction_policy_ = policy;
+ }
// Returns a proxy object that can be used on any thread.
QuotaManagerProxy* proxy() { return proxy_.get(); }
@@ -288,6 +293,7 @@ class STORAGE_EXPORT QuotaManager
friend struct QuotaManagerDeleter;
class GetUsageInfoTask;
+ class GetTemporaryEvictionOriginTask;
class OriginDataDeleter;
class HostDataDeleter;
@@ -433,6 +439,7 @@ class STORAGE_EXPORT QuotaManager
// TODO(michaeln): Need a way to clear the cache, drop and
// reinstantiate the trackers when they're not handling requests.
+ QuotaEvictionPolicy* temporary_storage_eviction_policy_;
scoped_ptr<QuotaTemporaryStorageEvictor> temporary_storage_evictor_;
EvictionContext eviction_context_;
« no previous file with comments | « storage/browser/quota/client_usage_tracker.cc ('k') | storage/browser/quota/quota_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698