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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 int origin_type_mask; | 166 int origin_type_mask; |
167 }; | 167 }; |
168 | 168 |
169 struct TimeRange { | 169 struct TimeRange { |
170 TimeRange(base::Time begin, base::Time end) : begin(begin), end(end) {} | 170 TimeRange(base::Time begin, base::Time end) : begin(begin), end(end) {} |
171 | 171 |
172 base::Time begin; | 172 base::Time begin; |
173 base::Time end; | 173 base::Time end; |
174 }; | 174 }; |
175 | 175 |
176 // Observer is notified when the removal is done. Done means keywords have | 176 // Observer is notified when the removal is active and when it's done. |
177 // been deleted, cache cleared and all other tasks scheduled. | |
178 class Observer { | 177 class Observer { |
179 public: | 178 public: |
180 virtual void OnBrowsingDataRemoverDone() = 0; | 179 // NOTE: DEPRECATED; talk to dbeam/msramek before using this. |
| 180 // |
| 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. |
| 188 virtual void OnBrowsingDataRemoverDone() {} |
181 | 189 |
182 protected: | 190 protected: |
183 virtual ~Observer() {} | 191 virtual ~Observer() {} |
184 }; | 192 }; |
185 | 193 |
186 using Callback = base::Callback<void(const NotificationDetails&)>; | 194 using Callback = base::Callback<void(const NotificationDetails&)>; |
187 using CallbackSubscription = std::unique_ptr< | 195 using CallbackSubscription = std::unique_ptr< |
188 base::CallbackList<void(const NotificationDetails&)>::Subscription>; | 196 base::CallbackList<void(const NotificationDetails&)>::Subscription>; |
189 | 197 |
190 // The completion inhibitor can artificially delay completion of the browsing | 198 // The completion inhibitor can artificially delay completion of the browsing |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 // not initialised, so the registry must be mocked out. | 503 // not initialised, so the registry must be mocked out. |
496 std::unique_ptr<WebappRegistry> webapp_registry_; | 504 std::unique_ptr<WebappRegistry> webapp_registry_; |
497 #endif | 505 #endif |
498 | 506 |
499 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_; | 507 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_; |
500 | 508 |
501 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 509 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
502 }; | 510 }; |
503 | 511 |
504 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ | 512 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
OLD | NEW |