| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_REMOVER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_REMOVER_H_ |
| 6 #define CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_REMOVER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_REMOVER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 10 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
| 11 #include "components/keyed_service/core/keyed_service.h" | |
| 12 | 11 |
| 13 namespace content { | 12 namespace content { |
| 14 class BrowserContext; | 13 class BrowserContext; |
| 15 } | 14 } |
| 16 | 15 |
| 17 // A BrowsingDataRemover that only records Remove*() calls. | 16 // A BrowsingDataRemover that only records Remove*() calls. |
| 18 // Some of the other methods are NOTIMPLEMENTED() as they are not needed for | 17 // Some of the other methods are NOTIMPLEMENTED() as they are not needed for |
| 19 // existing testcases. | 18 // existing testcases. |
| 20 class MockBrowsingDataRemover : public BrowsingDataRemover, | 19 class MockBrowsingDataRemover : public BrowsingDataRemover { |
| 21 public KeyedService { | |
| 22 public: | 20 public: |
| 23 explicit MockBrowsingDataRemover(content::BrowserContext* context); | 21 explicit MockBrowsingDataRemover(content::BrowserContext* context); |
| 24 | 22 |
| 25 ~MockBrowsingDataRemover() override; | 23 ~MockBrowsingDataRemover() override; |
| 26 | 24 |
| 27 // KeyedService: | 25 // KeyedService: |
| 28 void Shutdown() override; | 26 void Shutdown() override; |
| 29 | 27 |
| 30 // BrowsingDataRemover: | 28 // BrowsingDataRemover: |
| 31 void Remove(const base::Time& delete_begin, | 29 void Remove(const base::Time& delete_begin, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 int remove_mask, | 104 int remove_mask, |
| 107 int origin_type_mask, | 105 int origin_type_mask, |
| 108 std::unique_ptr<content::BrowsingDataFilterBuilder> filter_builder, | 106 std::unique_ptr<content::BrowsingDataFilterBuilder> filter_builder, |
| 109 Observer* observer); | 107 Observer* observer); |
| 110 | 108 |
| 111 std::list<CallParameters> actual_calls_; | 109 std::list<CallParameters> actual_calls_; |
| 112 std::list<CallParameters> expected_calls_; | 110 std::list<CallParameters> expected_calls_; |
| 113 }; | 111 }; |
| 114 | 112 |
| 115 #endif // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_REMOVER_H_ | 113 #endif // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_REMOVER_H_ |
| OLD | NEW |