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_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 int origin_type_mask; | 168 int origin_type_mask; |
169 }; | 169 }; |
170 | 170 |
171 struct TimeRange { | 171 struct TimeRange { |
172 TimeRange(base::Time begin, base::Time end) : begin(begin), end(end) {} | 172 TimeRange(base::Time begin, base::Time end) : begin(begin), end(end) {} |
173 | 173 |
174 base::Time begin; | 174 base::Time begin; |
175 base::Time end; | 175 base::Time end; |
176 }; | 176 }; |
177 | 177 |
178 // Observer is notified when the removal is done. Done means keywords have | 178 // Observer is notified when the removal is active and when it's done. |
179 // been deleted, cache cleared and all other tasks scheduled. | |
180 class Observer { | 179 class Observer { |
181 public: | 180 public: |
| 181 // Whether removal is active. Note that not having an active removal is not |
| 182 // same as completing a removal. That is why the removing status is separate |
| 183 // from the done message. |
| 184 virtual void OnBrowsingDataRemoving(bool is_removing) {} |
| 185 |
| 186 // Done means keywords have been deleted, cache cleared and all other |
| 187 // removal tasks are scheduled. |
182 virtual void OnBrowsingDataRemoverDone() = 0; | 188 virtual void OnBrowsingDataRemoverDone() = 0; |
183 | 189 |
184 protected: | 190 protected: |
185 virtual ~Observer() {} | 191 virtual ~Observer() {} |
186 }; | 192 }; |
187 | 193 |
188 using Callback = base::Callback<void(const NotificationDetails&)>; | 194 using Callback = base::Callback<void(const NotificationDetails&)>; |
189 using CallbackSubscription = std::unique_ptr< | 195 using CallbackSubscription = std::unique_ptr< |
190 base::CallbackList<void(const NotificationDetails&)>::Subscription>; | 196 base::CallbackList<void(const NotificationDetails&)>::Subscription>; |
191 | 197 |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 // not initialised, so the registry must be mocked out. | 503 // not initialised, so the registry must be mocked out. |
498 std::unique_ptr<WebappRegistry> webapp_registry_; | 504 std::unique_ptr<WebappRegistry> webapp_registry_; |
499 #endif | 505 #endif |
500 | 506 |
501 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_; | 507 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_; |
502 | 508 |
503 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 509 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
504 }; | 510 }; |
505 | 511 |
506 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ | 512 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
OLD | NEW |