| 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(quota::QuotaStatusCode status, int64 quota); |
| 54 const std::string& host, | |
| 55 quota::StorageType type, | |
| 56 int64 quota); | |
| 57 | 54 |
| 58 scoped_refptr<quota::QuotaManager> quota_manager_; | 55 scoped_refptr<quota::QuotaManager> quota_manager_; |
| 59 FetchResultCallback callback_; | 56 FetchResultCallback callback_; |
| 60 | 57 |
| 61 typedef std::set<std::pair<std::string, quota::StorageType> > PendingHosts; | 58 typedef std::set<std::pair<std::string, quota::StorageType> > PendingHosts; |
| 62 PendingHosts pending_hosts_; | 59 PendingHosts pending_hosts_; |
| 63 std::map<std::string, QuotaInfo> quota_info_; | 60 std::map<std::string, QuotaInfo> quota_info_; |
| 64 | 61 |
| 65 bool is_fetching_; | 62 bool is_fetching_; |
| 66 | 63 |
| 67 scoped_refptr<base::MessageLoopProxy> ui_thread_; | 64 scoped_refptr<base::MessageLoopProxy> ui_thread_; |
| 68 scoped_refptr<base::MessageLoopProxy> io_thread_; | 65 scoped_refptr<base::MessageLoopProxy> io_thread_; |
| 69 base::WeakPtrFactory<BrowsingDataQuotaHelperImpl> weak_factory_; | 66 base::WeakPtrFactory<BrowsingDataQuotaHelperImpl> weak_factory_; |
| 70 | 67 |
| 71 friend class BrowsingDataQuotaHelper; | 68 friend class BrowsingDataQuotaHelper; |
| 72 friend class BrowsingDataQuotaHelperTest; | 69 friend class BrowsingDataQuotaHelperTest; |
| 73 | 70 |
| 74 DISALLOW_COPY_AND_ASSIGN(BrowsingDataQuotaHelperImpl); | 71 DISALLOW_COPY_AND_ASSIGN(BrowsingDataQuotaHelperImpl); |
| 75 }; | 72 }; |
| 76 | 73 |
| 77 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_IMPL_H_ | 74 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_IMPL_H_ |
| OLD | NEW |