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

Unified Diff: content/browser/devtools/protocol/usage_and_quota_query.h

Issue 642263004: [DevTools] Make generated protocol structs wrappers around DictionaryValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix that will be needed for browser protocol Created 6 years, 1 month 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
Index: content/browser/devtools/protocol/usage_and_quota_query.h
diff --git a/content/browser/devtools/protocol/usage_and_quota_query.h b/content/browser/devtools/protocol/usage_and_quota_query.h
index ffbf7010a18a3d06e7443ab892d8da0d934b84fc..3a62e354b6f027f5eca10ea2c2a0f153da6bdf62 100644
--- a/content/browser/devtools/protocol/usage_and_quota_query.h
+++ b/content/browser/devtools/protocol/usage_and_quota_query.h
@@ -15,7 +15,8 @@ namespace page {
// This class can only be used on IO thread.
class UsageAndQuotaQuery : public base::RefCounted<UsageAndQuotaQuery> {
public:
- using Callback = base::Callback<void(scoped_ptr<QueryUsageAndQuotaResponse>)>;
+ using Callback =
+ base::Callback<void(scoped_refptr<QueryUsageAndQuotaResponse>)>;
UsageAndQuotaQuery(scoped_refptr<storage::QuotaManager> quota_manager,
const GURL& security_origin,
@@ -24,6 +25,8 @@ class UsageAndQuotaQuery : public base::RefCounted<UsageAndQuotaQuery> {
private:
friend class base::RefCounted<UsageAndQuotaQuery>;
+ using UsageItems = std::vector<scoped_refptr<UsageItem>>;
+
virtual ~UsageAndQuotaQuery();
void DidGetTemporaryQuota(storage::QuotaStatusCode status,
@@ -32,20 +35,25 @@ class UsageAndQuotaQuery : public base::RefCounted<UsageAndQuotaQuery> {
void DidGetPersistentQuota(storage::QuotaStatusCode status, int64 value);
- using UsageItemsCallback =
- base::Callback<void(const std::vector<UsageItem>&)>;
+ void GetHostUsage(UsageItems* list, storage::StorageType storage_type);
- void GetHostUsage(storage::StorageType storage_type,
- const UsageItemsCallback& items_callback);
+ void GetUsageForClient(UsageItems* list,
+ storage::StorageType storage_type,
+ storage::QuotaClient::ID client_id,
+ const std::string& client_name);
- void DidGetHostUsage(const UsageItemsCallback& items_callback,
- const std::vector<UsageItem>& usage_list);
+ void DidGetUsageForClient(UsageItems* list,
+ const std::string& client_name,
+ int64 value);
scoped_refptr<storage::QuotaManager> quota_manager_;
GURL security_origin_;
Callback callback_;
- Quota quota_;
- Usage usage_;
+ double temporary_quota_;
+ double persistent_quota_;
+ UsageItems temporary_usage_;
+ UsageItems persistent_usage_;
+ UsageItems syncable_usage_;
};
} // namespace page
« no previous file with comments | « content/browser/devtools/protocol/tracing_handler.cc ('k') | content/browser/devtools/protocol/usage_and_quota_query.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698