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

Unified Diff: webkit/quota/quota_manager.h

Issue 8079004: Retrieve per host storage usage from QuotaManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: The final version to land Created 9 years, 2 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/usage_tracker.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 255c0e63426e24d29da9bcc4f7bdda2a2d3e4314..2d0de6a9d9b9672ee568d35eda2afc5de3e9afa1 100644
--- a/webkit/quota/quota_manager.h
+++ b/webkit/quota/quota_manager.h
@@ -74,6 +74,16 @@ class QuotaEvictionHandler {
GetUsageAndQuotaForEvictionCallback* callback) = 0;
};
+struct UsageInfo {
+ UsageInfo(const std::string& host, StorageType type, int64 usage)
+ : host(host),
+ type(type),
+ usage(usage) {}
+ std::string host;
+ StorageType type;
+ int64 usage;
+};
+
// 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.
@@ -97,6 +107,9 @@ class QuotaManager : public QuotaTaskObserver,
// Returns a proxy object that can be used on any thread.
QuotaManagerProxy* proxy() { return proxy_.get(); }
+ // Called by clients or webapps. Returns usage per host.
+ void GetUsageInfo(GetUsageInfoCallback* callback);
+
// Called by clients or webapps.
// This method is declared as virtual to allow test code to override it.
// note: returns host usage and quota
@@ -188,6 +201,7 @@ class QuotaManager : public QuotaTaskObserver,
class UpdateModifiedTimeTask;
class GetModifiedSinceTask;
+ class GetUsageInfoTask;
class UsageAndQuotaDispatcherTask;
class UsageAndQuotaDispatcherTaskForTemporary;
class UsageAndQuotaDispatcherTaskForPersistent;
« no previous file with comments | « no previous file | webkit/quota/quota_manager.cc » ('j') | webkit/quota/usage_tracker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698