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_REMOVER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_IMPL_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_IMPL_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <queue> | 10 #include <queue> |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 virtual void RemoveInternal( | 140 virtual void RemoveInternal( |
141 const base::Time& delete_begin, | 141 const base::Time& delete_begin, |
142 const base::Time& delete_end, | 142 const base::Time& delete_end, |
143 int remove_mask, | 143 int remove_mask, |
144 int origin_type_mask, | 144 int origin_type_mask, |
145 std::unique_ptr<BrowsingDataFilterBuilder> filter_builder, | 145 std::unique_ptr<BrowsingDataFilterBuilder> filter_builder, |
146 Observer* observer); | 146 Observer* observer); |
147 | 147 |
148 private: | 148 private: |
149 // Testing the private RemovalTask. | 149 // Testing the private RemovalTask. |
150 FRIEND_TEST_ALL_PREFIXES(BrowsingDataRemoverTest, MultipleTasks); | 150 FRIEND_TEST_ALL_PREFIXES(BrowsingDataRemoverImplTest, MultipleTasks); |
151 | 151 |
152 // The BrowsingDataRemover tests need to be able to access the implementation | 152 // The BrowsingDataRemover tests need to be able to access the implementation |
153 // of Remove(), as it exposes details that aren't yet available in the public | 153 // of Remove(), as it exposes details that aren't yet available in the public |
154 // API. As soon as those details are exposed via new methods, this should be | 154 // API. As soon as those details are exposed via new methods, this should be |
155 // removed. | 155 // removed. |
156 // | 156 // |
157 // TODO(mkwst): See http://crbug.com/113621 | 157 // TODO(mkwst): See http://crbug.com/113621 |
158 friend class BrowsingDataRemoverTest; | 158 friend class BrowsingDataRemoverImplTest; |
| 159 friend class ChromeBrowsingDataRemoverDelegateTest; |
159 | 160 |
160 friend class BrowsingDataRemoverFactory; | 161 friend class BrowsingDataRemoverFactory; |
161 | 162 |
162 // Represents a single removal task. Contains all parameters needed to execute | 163 // Represents a single removal task. Contains all parameters needed to execute |
163 // it and a pointer to the observer that added it. | 164 // it and a pointer to the observer that added it. |
164 struct RemovalTask { | 165 struct RemovalTask { |
165 RemovalTask(const base::Time& delete_begin, | 166 RemovalTask(const base::Time& delete_begin, |
166 const base::Time& delete_end, | 167 const base::Time& delete_end, |
167 int remove_mask, | 168 int remove_mask, |
168 int origin_type_mask, | 169 int origin_type_mask, |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 | 258 |
258 // We do not own this. | 259 // We do not own this. |
259 content::StoragePartition* storage_partition_for_testing_ = nullptr; | 260 content::StoragePartition* storage_partition_for_testing_ = nullptr; |
260 | 261 |
261 base::WeakPtrFactory<BrowsingDataRemoverImpl> weak_ptr_factory_; | 262 base::WeakPtrFactory<BrowsingDataRemoverImpl> weak_ptr_factory_; |
262 | 263 |
263 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemoverImpl); | 264 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemoverImpl); |
264 }; | 265 }; |
265 | 266 |
266 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_IMPL_H_ | 267 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_IMPL_H_ |
OLD | NEW |