Chromium Code Reviews| 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 NotificationDetail { | |
|
jochen (gone - plz use gerrit)
2011/12/13 13:18:48
NotificationDetails
Mike West
2011/12/13 14:23:26
Done.
| |
| 84 NotificationDetail(base::Time removal_begin, | |
| 85 int removal_mask); | |
|
jochen (gone - plz use gerrit)
2011/12/13 13:18:48
for structs, we usually also provide a constructor
Mike West
2011/12/13 14:23:26
Done.
| |
| 86 ~NotificationDetail(); | |
| 87 | |
| 88 // The beginning of the removal time range. | |
| 89 base::Time removal_begin; | |
| 90 | |
| 91 // The removal mask (see the RemoveDataMask enum for details) | |
| 92 int removal_mask; | |
| 93 }; | |
| 94 | |
| 80 // Observer is notified when the removal is done. Done means keywords have | 95 // Observer is notified when the removal is done. Done means keywords have |
| 81 // been deleted, cache cleared and all other tasks scheduled. | 96 // been deleted, cache cleared and all other tasks scheduled. |
| 82 class Observer { | 97 class Observer { |
| 83 public: | 98 public: |
| 84 virtual void OnBrowsingDataRemoverDone() = 0; | 99 virtual void OnBrowsingDataRemoverDone() = 0; |
| 85 | 100 |
| 86 protected: | 101 protected: |
| 87 virtual ~Observer() {} | 102 virtual ~Observer() {} |
| 88 }; | 103 }; |
| 89 | 104 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 248 bool waiting_for_clear_networking_history_; | 263 bool waiting_for_clear_networking_history_; |
| 249 bool waiting_for_clear_cookies_; | 264 bool waiting_for_clear_cookies_; |
| 250 bool waiting_for_clear_cache_; | 265 bool waiting_for_clear_cache_; |
| 251 bool waiting_for_clear_lso_data_; | 266 bool waiting_for_clear_lso_data_; |
| 252 | 267 |
| 253 // Tracking how many origins need to be deleted, and whether we're finished | 268 // Tracking how many origins need to be deleted, and whether we're finished |
| 254 // gathering origins. | 269 // gathering origins. |
| 255 int quota_managed_origins_to_delete_count_; | 270 int quota_managed_origins_to_delete_count_; |
| 256 int quota_managed_storage_types_to_delete_count_; | 271 int quota_managed_storage_types_to_delete_count_; |
| 257 | 272 |
| 273 // The removal mask for the current removal operation. | |
| 274 int remove_mask_; | |
| 275 | |
| 258 ObserverList<Observer> observer_list_; | 276 ObserverList<Observer> observer_list_; |
| 259 | 277 |
| 260 // Used if we need to clear history. | 278 // Used if we need to clear history. |
| 261 CancelableRequestConsumer request_consumer_; | 279 CancelableRequestConsumer request_consumer_; |
| 262 | 280 |
| 263 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 281 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
| 264 }; | 282 }; |
| 265 | 283 |
| 266 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 284 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
| OLD | NEW |