Chromium Code Reviews| Index: storage/browser/quota/quota_manager.h |
| diff --git a/storage/browser/quota/quota_manager.h b/storage/browser/quota/quota_manager.h |
| index 07106dfe5fb86d299a4c84473182a0490f536f31..3942da88ecc7ab0f332aee2c2309a1408c564378 100644 |
| --- a/storage/browser/quota/quota_manager.h |
| +++ b/storage/browser/quota/quota_manager.h |
| @@ -69,10 +69,19 @@ struct STORAGE_EXPORT UsageAndQuota { |
| int64 available_disk_space); |
| }; |
| +class STORAGE_EXPORT TemporaryStorageEvictionPolicy { |
|
raymes
2015/07/08 04:43:29
Perhaps make a note that this isn't hooked up in t
calamity
2015/07/10 05:05:05
Done.
|
| + public: |
| + virtual void GetEvictionOrigin(const std::map<GURL, int64>& usage_map, |
|
raymes
2015/07/08 04:43:29
We should document this. I think it's good to note
calamity
2015/07/10 05:05:05
Done.
|
| + int64 global_quota, |
| + const GetEvictionOriginCallback& callback) = 0; |
| + |
| + protected: |
| + ~TemporaryStorageEvictionPolicy() {} |
| +}; |
| + |
| // An interface called by QuotaTemporaryStorageEvictor. |
| class STORAGE_EXPORT QuotaEvictionHandler { |
| public: |
| - typedef base::Callback<void(const GURL&)> GetLRUOriginCallback; |
| typedef StatusCallback EvictOriginDataCallback; |
| typedef base::Callback<void(QuotaStatusCode status, |
| const UsageAndQuota& usage_and_quota)> |
| @@ -80,9 +89,8 @@ class STORAGE_EXPORT QuotaEvictionHandler { |
| // Returns the least recently used origin. It might return empty |
| // GURL when there are no evictable origins. |
| - virtual void GetLRUOrigin( |
| - StorageType type, |
| - const GetLRUOriginCallback& callback) = 0; |
| + virtual void GetEvictionOrigin(StorageType type, |
| + const GetEvictionOriginCallback& callback) = 0; |
| virtual void EvictOriginData( |
| const GURL& origin, |
| @@ -362,14 +370,17 @@ class STORAGE_EXPORT QuotaManager |
| int64 unlimited_usage); |
| // QuotaEvictionHandler. |
| - void GetLRUOrigin(StorageType type, |
| - const GetLRUOriginCallback& callback) override; |
| + void GetEvictionOrigin(StorageType type, |
| + const GetEvictionOriginCallback& callback) override; |
| void EvictOriginData(const GURL& origin, |
| StorageType type, |
| const EvictOriginDataCallback& callback) override; |
| void GetUsageAndQuotaForEviction( |
| const UsageAndQuotaCallback& callback) override; |
| + void GetLRUOrigin(StorageType type, |
| + const GetEvictionOriginCallback& callback); |
| + |
| void DidSetTemporaryGlobalOverrideQuota(const QuotaCallback& callback, |
| const int64* new_quota, |
| bool success); |
| @@ -408,7 +419,7 @@ class STORAGE_EXPORT QuotaManager |
| scoped_refptr<base::SequencedTaskRunner> db_thread_; |
| mutable scoped_ptr<QuotaDatabase> database_; |
| - GetLRUOriginCallback lru_origin_callback_; |
| + GetEvictionOriginCallback lru_origin_callback_; |
| std::set<GURL> access_notified_origins_; |
| QuotaClientList clients_; |