OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_REMOVER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... | |
32 } | 32 } |
33 | 33 |
34 namespace net { | 34 namespace net { |
35 class URLRequestContextGetter; | 35 class URLRequestContextGetter; |
36 } | 36 } |
37 | 37 |
38 namespace quota { | 38 namespace quota { |
39 class QuotaManager; | 39 class QuotaManager; |
40 } | 40 } |
41 | 41 |
42 // When BrowsingDataRemover successfully removes data, a notification of type | |
43 // NOTIFICATION_BROWSING_DATA_REMOVED is triggered with a Details object of | |
44 // this type. | |
45 typedef std::pair<base::Time, int> BrowsingDataRemoverNotificationDetail; | |
battre
2011/12/13 12:16:34
Can you make this a struct? Neither the meaning of
Mike West
2011/12/13 13:07:54
Good idea. Done.
| |
46 | |
42 // BrowsingDataRemover is responsible for removing data related to browsing: | 47 // BrowsingDataRemover is responsible for removing data related to browsing: |
43 // visits in url database, downloads, cookies ... | 48 // visits in url database, downloads, cookies ... |
44 | 49 |
45 class BrowsingDataRemover : public content::NotificationObserver, | 50 class BrowsingDataRemover : public content::NotificationObserver, |
46 public base::WaitableEventWatcher::Delegate { | 51 public base::WaitableEventWatcher::Delegate { |
47 public: | 52 public: |
48 // Time period ranges available when doing browsing data removals. | 53 // Time period ranges available when doing browsing data removals. |
49 enum TimePeriod { | 54 enum TimePeriod { |
50 LAST_HOUR = 0, | 55 LAST_HOUR = 0, |
51 LAST_DAY, | 56 LAST_DAY, |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
248 bool waiting_for_clear_networking_history_; | 253 bool waiting_for_clear_networking_history_; |
249 bool waiting_for_clear_cookies_; | 254 bool waiting_for_clear_cookies_; |
250 bool waiting_for_clear_cache_; | 255 bool waiting_for_clear_cache_; |
251 bool waiting_for_clear_lso_data_; | 256 bool waiting_for_clear_lso_data_; |
252 | 257 |
253 // Tracking how many origins need to be deleted, and whether we're finished | 258 // Tracking how many origins need to be deleted, and whether we're finished |
254 // gathering origins. | 259 // gathering origins. |
255 int quota_managed_origins_to_delete_count_; | 260 int quota_managed_origins_to_delete_count_; |
256 int quota_managed_storage_types_to_delete_count_; | 261 int quota_managed_storage_types_to_delete_count_; |
257 | 262 |
263 // The removal mask for the current removal operation. | |
264 int remove_mask_; | |
265 | |
258 ObserverList<Observer> observer_list_; | 266 ObserverList<Observer> observer_list_; |
259 | 267 |
260 // Used if we need to clear history. | 268 // Used if we need to clear history. |
261 CancelableRequestConsumer request_consumer_; | 269 CancelableRequestConsumer request_consumer_; |
262 | 270 |
263 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 271 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
264 }; | 272 }; |
265 | 273 |
266 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 274 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
OLD | NEW |