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

Side by Side Diff: chrome/browser/ui/webui/quota_internals/quota_internals_proxy.h

Issue 1782053004: Change how the quota system computes the total poolsize for temporary storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_QUOTA_INTERNALS_QUOTA_INTERNALS_PROXY_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_QUOTA_INTERNALS_QUOTA_INTERNALS_PROXY_H_
6 #define CHROME_BROWSER_UI_WEBUI_QUOTA_INTERNALS_QUOTA_INTERNALS_PROXY_H_ 6 #define CHROME_BROWSER_UI_WEBUI_QUOTA_INTERNALS_QUOTA_INTERNALS_PROXY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 virtual ~QuotaInternalsProxy(); 52 virtual ~QuotaInternalsProxy();
53 53
54 void ReportAvailableSpace(int64_t available_space); 54 void ReportAvailableSpace(int64_t available_space);
55 void ReportGlobalInfo(const GlobalStorageInfo& data); 55 void ReportGlobalInfo(const GlobalStorageInfo& data);
56 void ReportPerHostInfo(const std::vector<PerHostStorageInfo>& hosts); 56 void ReportPerHostInfo(const std::vector<PerHostStorageInfo>& hosts);
57 void ReportPerOriginInfo(const std::vector<PerOriginStorageInfo>& origins); 57 void ReportPerOriginInfo(const std::vector<PerOriginStorageInfo>& origins);
58 void ReportStatistics(const Statistics& stats); 58 void ReportStatistics(const Statistics& stats);
59 59
60 // Called on IO Thread by QuotaManager as callback. 60 // Called on IO Thread by QuotaManager as callback.
61 void DidGetAvailableSpace(storage::QuotaStatusCode status, int64_t space); 61 void DidGetSettings(const storage::QuotaSettings& settings);
62 void DidGetGlobalQuota(storage::StorageType type, 62 void DidGetCapacity(int64_t total_space, int64_t available_space);
63 storage::QuotaStatusCode status,
64 int64_t quota);
65 void DidGetGlobalUsage(storage::StorageType type, 63 void DidGetGlobalUsage(storage::StorageType type,
66 int64_t usage, 64 int64_t usage,
67 int64_t unlimited_usage); 65 int64_t unlimited_usage);
68 void DidDumpQuotaTable(const QuotaTableEntries& entries); 66 void DidDumpQuotaTable(const QuotaTableEntries& entries);
69 void DidDumpOriginInfoTable(const OriginInfoTableEntries& entries); 67 void DidDumpOriginInfoTable(const OriginInfoTableEntries& entries);
70 void DidGetHostUsage(const std::string& host, 68 void DidGetHostUsage(const std::string& host,
71 storage::StorageType type, 69 storage::StorageType type,
72 int64_t usage); 70 int64_t usage);
73 71
74 // Helper. Called on IO Thread. 72 // Helper. Called on IO Thread.
75 void RequestPerOriginInfo(storage::StorageType type); 73 void RequestPerOriginInfo(storage::StorageType type);
76 void VisitHost(const std::string& host, storage::StorageType type); 74 void VisitHost(const std::string& host, storage::StorageType type);
77 void GetHostUsage(const std::string& host, storage::StorageType type); 75 void GetHostUsage(const std::string& host, storage::StorageType type);
78 76
79 // Used on UI Thread. 77 // Used on UI Thread.
80 QuotaInternalsHandler* handler_; 78 QuotaInternalsHandler* handler_;
81 79
82 // Used on IO Thread. 80 // Used on IO Thread.
83 scoped_refptr<storage::QuotaManager> quota_manager_; 81 scoped_refptr<storage::QuotaManager> quota_manager_;
84 std::set<std::pair<std::string, storage::StorageType> > hosts_visited_, 82 std::set<std::pair<std::string, storage::StorageType> > hosts_visited_,
85 hosts_pending_; 83 hosts_pending_;
86 std::vector<PerHostStorageInfo> report_pending_; 84 std::vector<PerHostStorageInfo> report_pending_;
87 base::WeakPtrFactory<QuotaInternalsProxy> weak_factory_; 85 base::WeakPtrFactory<QuotaInternalsProxy> weak_factory_;
88 86
89 DISALLOW_COPY_AND_ASSIGN(QuotaInternalsProxy); 87 DISALLOW_COPY_AND_ASSIGN(QuotaInternalsProxy);
90 }; 88 };
91 } // namespace quota_internals 89 } // namespace quota_internals
92 90
93 #endif // CHROME_BROWSER_UI_WEBUI_QUOTA_INTERNALS_QUOTA_INTERNALS_PROXY_H_ 91 #endif // CHROME_BROWSER_UI_WEBUI_QUOTA_INTERNALS_QUOTA_INTERNALS_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698