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

Unified Diff: storage/browser/quota/quota_manager.h

Issue 1355793002: Convert QuotaManager::GetLRUOrigin into a QuotaEvictionPolicy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@respect_exceptions
Patch Set: address comments 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 | « no previous file | 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 2729f6425abfc63efc3fc2ee0191f2f478cf1552..7e76b43813aad29e51a8f231a3455134c6d75fdc 100644
--- a/storage/browser/quota/quota_manager.h
+++ b/storage/browser/quota/quota_manager.h
@@ -15,10 +15,10 @@
#include "base/basictypes.h"
#include "base/callback.h"
-#include "base/containers/scoped_ptr_map.h"
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "base/sequenced_task_runner_helpers.h"
#include "storage/browser/quota/quota_callbacks.h"
@@ -306,6 +306,8 @@ class STORAGE_EXPORT QuotaManager
class DumpQuotaTableHelper;
class DumpOriginInfoTableHelper;
+ class LRUOriginEvictionPolicy;
+
typedef QuotaDatabase::QuotaTableEntry QuotaTableEntry;
typedef QuotaDatabase::OriginInfoTableEntry OriginInfoTableEntry;
typedef std::vector<QuotaTableEntry> QuotaTableEntries;
@@ -394,8 +396,6 @@ class STORAGE_EXPORT QuotaManager
void GetUsageAndQuotaForEviction(
const UsageAndQuotaCallback& callback) override;
- void GetLRUOrigin(StorageType type, const GetOriginCallback& callback);
-
void DidSetTemporaryGlobalOverrideQuota(const QuotaCallback& callback,
const int64* new_quota,
bool success);
@@ -409,8 +409,6 @@ class STORAGE_EXPORT QuotaManager
void DidInitialize(int64* temporary_quota_override,
int64* desired_available_space,
bool success);
- void DidGetLRUOrigin(const GURL* origin,
- bool success);
void DidGetInitialTemporaryGlobalQuota(QuotaStatusCode status,
int64 quota_unused);
void DidInitializeTemporaryOriginsInfo(bool success);
@@ -434,7 +432,6 @@ class STORAGE_EXPORT QuotaManager
scoped_refptr<base::SequencedTaskRunner> db_thread_;
mutable scoped_ptr<QuotaDatabase> database_;
- GetOriginCallback lru_origin_callback_;
std::set<GURL> access_notified_origins_;
QuotaClientList clients_;
@@ -473,8 +470,7 @@ class STORAGE_EXPORT QuotaManager
scoped_ptr<StorageMonitor> storage_monitor_;
- base::ScopedPtrMap<StorageType, scoped_ptr<QuotaEvictionPolicy>>
- eviction_policy_map_;
+ ScopedVector<QuotaEvictionPolicy> eviction_policy_map_;
bool is_getting_eviction_origin_;
« no previous file with comments | « no previous file | storage/browser/quota/quota_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698