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

Unified Diff: webkit/quota/quota_manager.h

Issue 7029007: Implement EvictOriginData in QuotaManager. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed, updated the test, and reflected the comments. Created 9 years, 7 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 | webkit/quota/quota_manager.cc » ('j') | webkit/quota/quota_manager.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/quota/quota_manager.h
diff --git a/webkit/quota/quota_manager.h b/webkit/quota/quota_manager.h
index ff199d0716800b218dff1be6d7d7cec6457cf474..c77e2671c7970962ca8ccea6b6a9c8c92946abdb 100644
--- a/webkit/quota/quota_manager.h
+++ b/webkit/quota/quota_manager.h
@@ -160,6 +160,7 @@ class QuotaManager : public QuotaTaskObserver,
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 +180,8 @@ class QuotaManager : public QuotaTaskObserver,
// Methods for eviction logic.
void DeleteOriginFromDatabase(const GURL& origin, StorageType type);
+ void OnOriginDataEvicted(QuotaStatusCode status);
+
virtual void GetLRUOrigin(
StorageType type,
GetLRUOriginCallback* callback) OVERRIDE;
@@ -207,12 +210,18 @@ class QuotaManager : public QuotaTaskObserver,
UsageAndQuotaDispatcherTaskMap usage_and_quota_dispatchers_;
+ EvictOriginDataCallback* evict_origin_data_callback_;
kinuko 2011/05/18 04:45:12 could this be simply scoped_ptr? The current code
Dai Mikurube (NOT FULLTIME) 2011/05/18 05:08:00 I guess scoped_ptr is better. Done though I didn'
michaeln 2011/05/18 05:24:36 not a good idea to have wild pointers or dangling
Dai Mikurube (NOT FULLTIME) 2011/05/18 05:34:29 Thanks. Yes, I agree with that and modified it to
+ int num_eviction_requested_clients_;
+ int num_evicted_clients_;
+
int64 temporary_global_quota_;
QuotaCallbackQueue temporary_global_quota_callbacks_;
// Map from origin to count.
std::map<GURL, int> origins_in_use_;
+ base::ScopedCallbackFactory<QuotaManager> callback_factory_;
+
DISALLOW_COPY_AND_ASSIGN(QuotaManager);
};
« no previous file with comments | « no previous file | webkit/quota/quota_manager.cc » ('j') | webkit/quota/quota_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698