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

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: Fixed indentation in generated code 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..37ab306db28bc5d32fad985033c995a6bf54e05c 100644
--- a/content/browser/devtools/protocol/usage_and_quota_query.h
+++ b/content/browser/devtools/protocol/usage_and_quota_query.h
@@ -15,7 +15,7 @@ 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(QueryUsageAndQuotaResponse)>;
UsageAndQuotaQuery(scoped_refptr<storage::QuotaManager> quota_manager,
const GURL& security_origin,
@@ -32,20 +32,26 @@ class UsageAndQuotaQuery : public base::RefCounted<UsageAndQuotaQuery> {
void DidGetPersistentQuota(storage::QuotaStatusCode status, int64 value);
- using UsageItemsCallback =
- base::Callback<void(const std::vector<UsageItem>&)>;
+ void GetHostUsage(ListBuilder<UsageItem>* list,
+ storage::StorageType storage_type);
- void GetHostUsage(storage::StorageType storage_type,
- const UsageItemsCallback& items_callback);
+ void GetUsageForClient(ListBuilder<UsageItem>* 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(ListBuilder<UsageItem>* 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_;
dgozman 2014/11/06 14:20:42 Please initialize this field in constructor.
vkuzkokov 2014/11/06 16:30:12 Done.
+ double persistent_quota_;
dgozman 2014/11/06 14:20:42 ditto
vkuzkokov 2014/11/06 16:30:12 Done.
+ ListBuilder<UsageItem> temporary_usage_;
+ ListBuilder<UsageItem> persistent_usage_;
+ ListBuilder<UsageItem> syncable_usage_;
};
} // namespace page

Powered by Google App Engine
This is Rietveld 408576698