Chromium Code Reviews| Index: webkit/quota/quota_manager.h |
| diff --git a/webkit/quota/quota_manager.h b/webkit/quota/quota_manager.h |
| index ff199d0716800b218dff1be6d7d7cec6457cf474..a290d7f553dd4960f12c1bed87d0e217f261a960 100644 |
| --- a/webkit/quota/quota_manager.h |
| +++ b/webkit/quota/quota_manager.h |
| @@ -154,12 +154,24 @@ class QuotaManager : public QuotaTaskObserver, |
| class AvailableSpaceQueryTask; |
| + struct GetUsageAndQuotaForEvictionMembers { |
|
kinuko
2011/05/18 09:08:01
Can we just move all the eviction-related member v
Dai Mikurube (NOT FULLTIME)
2011/05/18 09:31:30
Renamed it to EvictionContext. (EvictOriginData-r
|
| + GetUsageAndQuotaForEvictionMembers(int64 usage, int64 quota) |
|
kinuko
2011/05/18 09:08:01
Do we want to pass any particular values here? I
Dai Mikurube (NOT FULLTIME)
2011/05/18 09:31:30
Done.
|
| + : usage_(usage), |
| + quota_(quota) { |
| + } |
| + |
| + scoped_ptr<GetUsageAndQuotaForEvictionCallback> callback_; |
| + int64 usage_; |
| + int64 quota_; |
|
kinuko
2011/05/18 09:08:01
public struct members do not need to have trailing
Dai Mikurube (NOT FULLTIME)
2011/05/18 09:31:30
Done.
|
| + }; |
| + |
| typedef std::pair<std::string, StorageType> HostAndType; |
| typedef std::map<HostAndType, UsageAndQuotaDispatcherTask*> |
| UsageAndQuotaDispatcherTaskMap; |
| friend struct QuotaManagerDeleter; |
| friend class QuotaManagerProxy; |
| + friend class QuotaManagerTest; |
| // This initialization method is lazily called on the IO thread |
| // when the first quota manager API is called. |
| @@ -179,6 +191,14 @@ class QuotaManager : public QuotaTaskObserver, |
| // Methods for eviction logic. |
| void DeleteOriginFromDatabase(const GURL& origin, StorageType type); |
| + void OnGetAvailableSpaceForEviction( |
|
kinuko
2011/05/18 09:08:01
Could we rename OnXxx -> DidXxx on those methods t
Dai Mikurube (NOT FULLTIME)
2011/05/18 09:31:30
Done.
|
| + QuotaStatusCode status, |
| + int64 available_space); |
| + void OnGetGlobalQuotaForEviction( |
| + QuotaStatusCode status, |
| + int64 quota); |
| + void OnGetGlobalUsageForEviction(int64 usage); |
| + |
| virtual void GetLRUOrigin( |
| StorageType type, |
| GetLRUOriginCallback* callback) OVERRIDE; |
| @@ -205,6 +225,8 @@ class QuotaManager : public QuotaTaskObserver, |
| scoped_ptr<UsageTracker> temporary_usage_tracker_; |
| scoped_ptr<UsageTracker> persistent_usage_tracker_; |
| + GetUsageAndQuotaForEvictionMembers get_usage_and_quota_for_eviction_members_; |
| + |
| UsageAndQuotaDispatcherTaskMap usage_and_quota_dispatchers_; |
| int64 temporary_global_quota_; |
| @@ -213,6 +235,8 @@ class QuotaManager : public QuotaTaskObserver, |
| // Map from origin to count. |
| std::map<GURL, int> origins_in_use_; |
| + base::ScopedCallbackFactory<QuotaManager> callback_factory_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(QuotaManager); |
| }; |