Index: webkit/quota/quota_manager.h |
diff --git a/webkit/quota/quota_manager.h b/webkit/quota/quota_manager.h |
index cc8bf6b38d23a8bba4c165e0950ab73cd5ab18d5..ae3eb3087f5bf732dbd2e6e51023cb1df39cb0b1 100644 |
--- a/webkit/quota/quota_manager.h |
+++ b/webkit/quota/quota_manager.h |
@@ -34,10 +34,33 @@ class UsageTracker; |
struct QuotaManagerDeleter; |
class QuotaManagerProxy; |
+// An interface called by QuotaTemporaryStorageEvictor. |
+class QuotaEvictionHandler { |
+ public: |
+ typedef Callback1<GURL>::Type GetLRUOriginCallback; |
+ typedef Callback4<QuotaStatusCode, |
+ int64 /* usage */, |
+ int64 /* quota */, |
+ int64 /* physical_avail */ >::Type DeleteOriginDataCallback; |
kinuko
2011/05/16 13:57:44
This callback being used for GetUsageAndQuotaForEv
|
+ |
+ virtual void GetUsageAndQuotaForEviction( |
+ DeleteOriginDataCallback* callback) = 0; |
+ |
+ virtual void DeleteOriginData( |
+ const GURL& origin, |
+ StorageType type, |
+ DeleteOriginDataCallback* callback) = 0; |
+ |
+ virtual void GetLRUOrigin( |
+ StorageType type, |
+ GetLRUOriginCallback* callback) = 0; |
+}; |
+ |
// The quota manager class. This class is instantiated per profile and |
// held by the profile. With the exception of the constructor and the |
// proxy() method, all methods should only be called on the IO thread. |
class QuotaManager : public QuotaTaskObserver, |
+ public QuotaEvictionHandler, |
public base::RefCountedThreadSafe< |
QuotaManager, QuotaManagerDeleter> { |
public: |
@@ -142,10 +165,17 @@ class QuotaManager : public QuotaTaskObserver, |
// The client must remain valid until OnQuotaManagerDestored is called. |
void RegisterClient(QuotaClient* client); |
- // TODO(dmikurube): Add a test for this method. |
virtual void GetLRUOrigin( |
StorageType type, |
- GetLRUOriginCallback* callback); |
+ GetLRUOriginCallback* callback) OVERRIDE; |
+ |
kinuko
2011/05/16 13:57:44
style-nit: no empty lines between OVERRIDE methods
|
+ virtual void GetUsageAndQuotaForEviction( |
+ DeleteOriginDataCallback* callback) OVERRIDE; |
+ |
+ virtual void DeleteOriginData( |
+ const GURL& origin, |
+ StorageType type, |
+ DeleteOriginDataCallback* callback) OVERRIDE; |
UsageTracker* GetUsageTracker(StorageType type) const; |