OLD | NEW |
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 Loading... |
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 DidGetSettings(const storage::QuotaSettings& settings); | 61 void DidGetAvailableSpace(storage::QuotaStatusCode status, int64_t space); |
62 void DidGetCapacity(int64_t total_space, int64_t available_space); | 62 void DidGetGlobalQuota(storage::StorageType type, |
| 63 storage::QuotaStatusCode status, |
| 64 int64_t quota); |
63 void DidGetGlobalUsage(storage::StorageType type, | 65 void DidGetGlobalUsage(storage::StorageType type, |
64 int64_t usage, | 66 int64_t usage, |
65 int64_t unlimited_usage); | 67 int64_t unlimited_usage); |
66 void DidDumpQuotaTable(const QuotaTableEntries& entries); | 68 void DidDumpQuotaTable(const QuotaTableEntries& entries); |
67 void DidDumpOriginInfoTable(const OriginInfoTableEntries& entries); | 69 void DidDumpOriginInfoTable(const OriginInfoTableEntries& entries); |
68 void DidGetHostUsage(const std::string& host, | 70 void DidGetHostUsage(const std::string& host, |
69 storage::StorageType type, | 71 storage::StorageType type, |
70 int64_t usage); | 72 int64_t usage); |
71 | 73 |
72 // Helper. Called on IO Thread. | 74 // Helper. Called on IO Thread. |
73 void RequestPerOriginInfo(storage::StorageType type); | 75 void RequestPerOriginInfo(storage::StorageType type); |
74 void VisitHost(const std::string& host, storage::StorageType type); | 76 void VisitHost(const std::string& host, storage::StorageType type); |
75 void GetHostUsage(const std::string& host, storage::StorageType type); | 77 void GetHostUsage(const std::string& host, storage::StorageType type); |
76 | 78 |
77 // Used on UI Thread. | 79 // Used on UI Thread. |
78 QuotaInternalsHandler* handler_; | 80 QuotaInternalsHandler* handler_; |
79 | 81 |
80 // Used on IO Thread. | 82 // Used on IO Thread. |
81 scoped_refptr<storage::QuotaManager> quota_manager_; | 83 scoped_refptr<storage::QuotaManager> quota_manager_; |
82 std::set<std::pair<std::string, storage::StorageType> > hosts_visited_, | 84 std::set<std::pair<std::string, storage::StorageType> > hosts_visited_, |
83 hosts_pending_; | 85 hosts_pending_; |
84 std::vector<PerHostStorageInfo> report_pending_; | 86 std::vector<PerHostStorageInfo> report_pending_; |
85 base::WeakPtrFactory<QuotaInternalsProxy> weak_factory_; | 87 base::WeakPtrFactory<QuotaInternalsProxy> weak_factory_; |
86 | 88 |
87 DISALLOW_COPY_AND_ASSIGN(QuotaInternalsProxy); | 89 DISALLOW_COPY_AND_ASSIGN(QuotaInternalsProxy); |
88 }; | 90 }; |
89 } // namespace quota_internals | 91 } // namespace quota_internals |
90 | 92 |
91 #endif // CHROME_BROWSER_UI_WEBUI_QUOTA_INTERNALS_QUOTA_INTERNALS_PROXY_H_ | 93 #endif // CHROME_BROWSER_UI_WEBUI_QUOTA_INTERNALS_QUOTA_INTERNALS_PROXY_H_ |
OLD | NEW |