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_MOCK_BROWSING_DATA_QUOTA_HELPER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_QUOTA_HELPER_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_QUOTA_HELPER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_QUOTA_HELPER_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <list> | 10 #include <list> |
9 #include <string> | 11 #include <string> |
10 | 12 |
| 13 #include "base/macros.h" |
11 #include "chrome/browser/browsing_data/browsing_data_quota_helper.h" | 14 #include "chrome/browser/browsing_data/browsing_data_quota_helper.h" |
12 | 15 |
13 class MockBrowsingDataQuotaHelper : public BrowsingDataQuotaHelper { | 16 class MockBrowsingDataQuotaHelper : public BrowsingDataQuotaHelper { |
14 public: | 17 public: |
15 explicit MockBrowsingDataQuotaHelper(Profile* profile); | 18 explicit MockBrowsingDataQuotaHelper(Profile* profile); |
16 | 19 |
17 void StartFetching(const FetchResultCallback& callback) override; | 20 void StartFetching(const FetchResultCallback& callback) override; |
18 void RevokeHostQuota(const std::string& host) override; | 21 void RevokeHostQuota(const std::string& host) override; |
19 | 22 |
20 void AddHost(const std::string& host, | 23 void AddHost(const std::string& host, |
21 int64 temporary_usage, | 24 int64_t temporary_usage, |
22 int64 persistent_usage, | 25 int64_t persistent_usage, |
23 int64 syncable_usage); | 26 int64_t syncable_usage); |
24 void AddQuotaSamples(); | 27 void AddQuotaSamples(); |
25 void Notify(); | 28 void Notify(); |
26 | 29 |
27 private: | 30 private: |
28 ~MockBrowsingDataQuotaHelper() override; | 31 ~MockBrowsingDataQuotaHelper() override; |
29 | 32 |
30 FetchResultCallback callback_; | 33 FetchResultCallback callback_; |
31 std::list<QuotaInfo> response_; | 34 std::list<QuotaInfo> response_; |
32 | 35 |
33 DISALLOW_COPY_AND_ASSIGN(MockBrowsingDataQuotaHelper); | 36 DISALLOW_COPY_AND_ASSIGN(MockBrowsingDataQuotaHelper); |
34 }; | 37 }; |
35 | 38 |
36 #endif // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_QUOTA_HELPER_H_ | 39 #endif // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_QUOTA_HELPER_H_ |
OLD | NEW |