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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 REMOVE_PASSWORDS = 1 << 10, | 70 REMOVE_PASSWORDS = 1 << 10, |
71 REMOVE_WEBSQL = 1 << 11, | 71 REMOVE_WEBSQL = 1 << 11, |
72 | 72 |
73 // "Site data" includes cookies, appcache, file systems, indexedDBs, local | 73 // "Site data" includes cookies, appcache, file systems, indexedDBs, local |
74 // storage, webSQL, and LSO data. | 74 // storage, webSQL, and LSO data. |
75 REMOVE_SITE_DATA = REMOVE_APPCACHE | REMOVE_COOKIES | REMOVE_FILE_SYSTEMS | | 75 REMOVE_SITE_DATA = REMOVE_APPCACHE | REMOVE_COOKIES | REMOVE_FILE_SYSTEMS | |
76 REMOVE_INDEXEDDB | REMOVE_LOCAL_STORAGE | | 76 REMOVE_INDEXEDDB | REMOVE_LOCAL_STORAGE | |
77 REMOVE_LSO_DATA | REMOVE_WEBSQL | 77 REMOVE_LSO_DATA | REMOVE_WEBSQL |
78 }; | 78 }; |
79 | 79 |
| 80 // When BrowsingDataRemover successfully removes data, a notification of type |
| 81 // NOTIFICATION_BROWSING_DATA_REMOVED is triggered with a Details object of |
| 82 // this type. |
| 83 struct NotificationDetails { |
| 84 NotificationDetails(); |
| 85 NotificationDetails(const NotificationDetails& details); |
| 86 NotificationDetails(base::Time removal_begin, |
| 87 int removal_mask); |
| 88 ~NotificationDetails(); |
| 89 |
| 90 // The beginning of the removal time range. |
| 91 base::Time removal_begin; |
| 92 |
| 93 // The removal mask (see the RemoveDataMask enum for details) |
| 94 int removal_mask; |
| 95 }; |
| 96 |
80 // Observer is notified when the removal is done. Done means keywords have | 97 // Observer is notified when the removal is done. Done means keywords have |
81 // been deleted, cache cleared and all other tasks scheduled. | 98 // been deleted, cache cleared and all other tasks scheduled. |
82 class Observer { | 99 class Observer { |
83 public: | 100 public: |
84 virtual void OnBrowsingDataRemoverDone() = 0; | 101 virtual void OnBrowsingDataRemoverDone() = 0; |
85 | 102 |
86 protected: | 103 protected: |
87 virtual ~Observer() {} | 104 virtual ~Observer() {} |
88 }; | 105 }; |
89 | 106 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 bool waiting_for_clear_networking_history_; | 265 bool waiting_for_clear_networking_history_; |
249 bool waiting_for_clear_cookies_; | 266 bool waiting_for_clear_cookies_; |
250 bool waiting_for_clear_cache_; | 267 bool waiting_for_clear_cache_; |
251 bool waiting_for_clear_lso_data_; | 268 bool waiting_for_clear_lso_data_; |
252 | 269 |
253 // Tracking how many origins need to be deleted, and whether we're finished | 270 // Tracking how many origins need to be deleted, and whether we're finished |
254 // gathering origins. | 271 // gathering origins. |
255 int quota_managed_origins_to_delete_count_; | 272 int quota_managed_origins_to_delete_count_; |
256 int quota_managed_storage_types_to_delete_count_; | 273 int quota_managed_storage_types_to_delete_count_; |
257 | 274 |
| 275 // The removal mask for the current removal operation. |
| 276 int remove_mask_; |
| 277 |
258 ObserverList<Observer> observer_list_; | 278 ObserverList<Observer> observer_list_; |
259 | 279 |
260 // Used if we need to clear history. | 280 // Used if we need to clear history. |
261 CancelableRequestConsumer request_consumer_; | 281 CancelableRequestConsumer request_consumer_; |
262 | 282 |
263 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 283 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
264 }; | 284 }; |
265 | 285 |
266 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 286 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
OLD | NEW |