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_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_IMPL_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_IMPL_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 void ProcessPendingHosts(); | 44 void ProcessPendingHosts(); |
45 void GetHostUsage(const std::string& host, quota::StorageType type); | 45 void GetHostUsage(const std::string& host, quota::StorageType type); |
46 | 46 |
47 // Callback function for GetHostUsage. | 47 // Callback function for GetHostUsage. |
48 void GotHostUsage(const std::string& host, | 48 void GotHostUsage(const std::string& host, |
49 quota::StorageType type, | 49 quota::StorageType type, |
50 int64 usage); | 50 int64 usage); |
51 | 51 |
52 void OnComplete(); | 52 void OnComplete(); |
53 void DidRevokeHostQuota(quota::QuotaStatusCode status, | 53 void DidRevokeHostQuota(const std::string& host, |
54 const std::string& host, | |
55 quota::StorageType type, | 54 quota::StorageType type, |
| 55 quota::QuotaStatusCode status, |
56 int64 quota); | 56 int64 quota); |
57 | 57 |
58 scoped_refptr<quota::QuotaManager> quota_manager_; | 58 scoped_refptr<quota::QuotaManager> quota_manager_; |
59 FetchResultCallback callback_; | 59 FetchResultCallback callback_; |
60 | 60 |
61 typedef std::set<std::pair<std::string, quota::StorageType> > PendingHosts; | 61 typedef std::set<std::pair<std::string, quota::StorageType> > PendingHosts; |
62 PendingHosts pending_hosts_; | 62 PendingHosts pending_hosts_; |
63 std::map<std::string, QuotaInfo> quota_info_; | 63 std::map<std::string, QuotaInfo> quota_info_; |
64 | 64 |
65 bool is_fetching_; | 65 bool is_fetching_; |
66 | 66 |
67 scoped_refptr<base::MessageLoopProxy> ui_thread_; | 67 scoped_refptr<base::MessageLoopProxy> ui_thread_; |
68 scoped_refptr<base::MessageLoopProxy> io_thread_; | 68 scoped_refptr<base::MessageLoopProxy> io_thread_; |
69 base::WeakPtrFactory<BrowsingDataQuotaHelperImpl> weak_factory_; | 69 base::WeakPtrFactory<BrowsingDataQuotaHelperImpl> weak_factory_; |
70 | 70 |
71 friend class BrowsingDataQuotaHelper; | 71 friend class BrowsingDataQuotaHelper; |
72 friend class BrowsingDataQuotaHelperTest; | 72 friend class BrowsingDataQuotaHelperTest; |
73 | 73 |
74 DISALLOW_COPY_AND_ASSIGN(BrowsingDataQuotaHelperImpl); | 74 DISALLOW_COPY_AND_ASSIGN(BrowsingDataQuotaHelperImpl); |
75 }; | 75 }; |
76 | 76 |
77 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_IMPL_H_ | 77 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_IMPL_H_ |
OLD | NEW |