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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 REMOVE_FORM_DATA = 1 << 5, | 97 REMOVE_FORM_DATA = 1 << 5, |
98 // In addition to visits, REMOVE_HISTORY removes keywords, last session and | 98 // In addition to visits, REMOVE_HISTORY removes keywords, last session and |
99 // passwords UI statistics. | 99 // passwords UI statistics. |
100 REMOVE_HISTORY = 1 << 6, | 100 REMOVE_HISTORY = 1 << 6, |
101 REMOVE_INDEXEDDB = 1 << 7, | 101 REMOVE_INDEXEDDB = 1 << 7, |
102 REMOVE_LOCAL_STORAGE = 1 << 8, | 102 REMOVE_LOCAL_STORAGE = 1 << 8, |
103 REMOVE_PLUGIN_DATA = 1 << 9, | 103 REMOVE_PLUGIN_DATA = 1 << 9, |
104 REMOVE_PASSWORDS = 1 << 10, | 104 REMOVE_PASSWORDS = 1 << 10, |
105 REMOVE_WEBSQL = 1 << 11, | 105 REMOVE_WEBSQL = 1 << 11, |
106 REMOVE_CHANNEL_IDS = 1 << 12, | 106 REMOVE_CHANNEL_IDS = 1 << 12, |
107 REMOVE_CONTENT_LICENSES = 1 << 13, | 107 REMOVE_MEDIA_LICENSES = 1 << 13, |
108 REMOVE_SERVICE_WORKERS = 1 << 14, | 108 REMOVE_SERVICE_WORKERS = 1 << 14, |
109 REMOVE_SITE_USAGE_DATA = 1 << 15, | 109 REMOVE_SITE_USAGE_DATA = 1 << 15, |
110 // REMOVE_NOCHECKS intentionally does not check if the Profile's prohibited | 110 // REMOVE_NOCHECKS intentionally does not check if the Profile's prohibited |
111 // from deleting history or downloads. | 111 // from deleting history or downloads. |
112 REMOVE_NOCHECKS = 1 << 16, | 112 REMOVE_NOCHECKS = 1 << 16, |
113 REMOVE_WEBRTC_IDENTITY = 1 << 17, | 113 REMOVE_WEBRTC_IDENTITY = 1 << 17, |
114 REMOVE_CACHE_STORAGE = 1 << 18, | 114 REMOVE_CACHE_STORAGE = 1 << 18, |
115 #if BUILDFLAG(ANDROID_JAVA_UI) | 115 #if BUILDFLAG(ANDROID_JAVA_UI) |
116 REMOVE_WEBAPP_DATA = 1 << 19, | 116 REMOVE_WEBAPP_DATA = 1 << 19, |
117 #endif | 117 #endif |
(...skipping 19 matching lines...) Expand all Loading... |
137 #endif | 137 #endif |
138 REMOVE_WEBRTC_IDENTITY, | 138 REMOVE_WEBRTC_IDENTITY, |
139 | 139 |
140 // Includes all the available remove options. Meant to be used by clients | 140 // Includes all the available remove options. Meant to be used by clients |
141 // that wish to wipe as much data as possible from a Profile, to make it | 141 // that wish to wipe as much data as possible from a Profile, to make it |
142 // look like a new Profile. | 142 // look like a new Profile. |
143 REMOVE_ALL = REMOVE_SITE_DATA | REMOVE_CACHE | REMOVE_DOWNLOADS | | 143 REMOVE_ALL = REMOVE_SITE_DATA | REMOVE_CACHE | REMOVE_DOWNLOADS | |
144 REMOVE_FORM_DATA | | 144 REMOVE_FORM_DATA | |
145 REMOVE_HISTORY | | 145 REMOVE_HISTORY | |
146 REMOVE_PASSWORDS | | 146 REMOVE_PASSWORDS | |
147 REMOVE_CONTENT_LICENSES, | 147 REMOVE_MEDIA_LICENSES, |
148 | 148 |
149 // Includes all available remove options. Meant to be used when the Profile | 149 // Includes all available remove options. Meant to be used when the Profile |
150 // is scheduled to be deleted, and all possible data should be wiped from | 150 // is scheduled to be deleted, and all possible data should be wiped from |
151 // disk as soon as possible. | 151 // disk as soon as possible. |
152 REMOVE_WIPE_PROFILE = REMOVE_ALL | REMOVE_NOCHECKS, | 152 REMOVE_WIPE_PROFILE = REMOVE_ALL | REMOVE_NOCHECKS, |
153 }; | 153 }; |
154 | 154 |
155 // A helper enum to report the deletion of cookies and/or cache. Do not | 155 // A helper enum to report the deletion of cookies and/or cache. Do not |
156 // reorder the entries, as this enum is passed to UMA. | 156 // reorder the entries, as this enum is passed to UMA. |
157 enum CookieOrCacheDeletionChoice { | 157 enum CookieOrCacheDeletionChoice { |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 | 318 |
319 // Callback for when TemplateURLService has finished loading. Clears the data, | 319 // Callback for when TemplateURLService has finished loading. Clears the data, |
320 // clears the respective waiting flag, and invokes NotifyIfDone. | 320 // clears the respective waiting flag, and invokes NotifyIfDone. |
321 void OnKeywordsLoaded(); | 321 void OnKeywordsLoaded(); |
322 | 322 |
323 #if defined(ENABLE_PLUGINS) | 323 #if defined(ENABLE_PLUGINS) |
324 // Called when plugin data has been cleared. Invokes NotifyIfDone. | 324 // Called when plugin data has been cleared. Invokes NotifyIfDone. |
325 void OnWaitableEventSignaled(base::WaitableEvent* waitable_event); | 325 void OnWaitableEventSignaled(base::WaitableEvent* waitable_event); |
326 | 326 |
327 // PepperFlashSettingsManager::Client implementation. | 327 // PepperFlashSettingsManager::Client implementation. |
328 void OnDeauthorizeContentLicensesCompleted(uint32_t request_id, | 328 void OnDeauthorizeFlashContentLicensesCompleted(uint32_t request_id, |
329 bool success) override; | 329 bool success) override; |
330 #endif | 330 #endif |
331 | 331 |
332 #if defined (OS_CHROMEOS) | 332 #if defined (OS_CHROMEOS) |
333 void OnClearPlatformKeys(chromeos::DBusMethodCallStatus call_status, | 333 void OnClearPlatformKeys(chromeos::DBusMethodCallStatus call_status, |
334 bool result); | 334 bool result); |
335 #endif | 335 #endif |
336 | 336 |
337 // Removes the specified items related to browsing for a specific host. If the | 337 // Removes the specified items related to browsing for a specific host. If the |
338 // provided |remove_url| is empty, data is removed for all origins; otherwise, | 338 // provided |remove_url| is empty, data is removed for all origins; otherwise, |
339 // it is restricted by the origin filter origin (where implemented yet). The | 339 // it is restricted by the origin filter origin (where implemented yet). The |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 | 454 |
455 #if defined(ENABLE_PLUGINS) | 455 #if defined(ENABLE_PLUGINS) |
456 // Used to delete plugin data. | 456 // Used to delete plugin data. |
457 std::unique_ptr<content::PluginDataRemover> plugin_data_remover_; | 457 std::unique_ptr<content::PluginDataRemover> plugin_data_remover_; |
458 base::WaitableEventWatcher watcher_; | 458 base::WaitableEventWatcher watcher_; |
459 | 459 |
460 // Used to deauthorize content licenses for Pepper Flash. | 460 // Used to deauthorize content licenses for Pepper Flash. |
461 std::unique_ptr<PepperFlashSettingsManager> pepper_flash_settings_manager_; | 461 std::unique_ptr<PepperFlashSettingsManager> pepper_flash_settings_manager_; |
462 #endif | 462 #endif |
463 | 463 |
464 uint32_t deauthorize_content_licenses_request_id_ = 0; | 464 uint32_t deauthorize_flash_content_licenses_request_id_ = 0; |
465 // True if we're waiting for various data to be deleted. | 465 // True if we're waiting for various data to be deleted. |
466 // These may only be accessed from UI thread in order to avoid races! | 466 // These may only be accessed from UI thread in order to avoid races! |
467 bool waiting_for_clear_autofill_origin_urls_ = false; | 467 bool waiting_for_clear_autofill_origin_urls_ = false; |
468 bool waiting_for_clear_cache_ = false; | 468 bool waiting_for_clear_cache_ = false; |
469 bool waiting_for_clear_channel_ids_ = false; | 469 bool waiting_for_clear_channel_ids_ = false; |
470 bool waiting_for_clear_content_licenses_ = false; | 470 bool waiting_for_clear_flash_content_licenses_ = false; |
471 // Non-zero if waiting for cookies to be cleared. | 471 // Non-zero if waiting for cookies to be cleared. |
472 int waiting_for_clear_cookies_count_ = 0; | 472 int waiting_for_clear_cookies_count_ = 0; |
473 bool waiting_for_clear_domain_reliability_monitor_ = false; | 473 bool waiting_for_clear_domain_reliability_monitor_ = false; |
474 bool waiting_for_clear_form_ = false; | 474 bool waiting_for_clear_form_ = false; |
475 bool waiting_for_clear_history_ = false; | 475 bool waiting_for_clear_history_ = false; |
476 bool waiting_for_clear_hostname_resolution_cache_ = false; | 476 bool waiting_for_clear_hostname_resolution_cache_ = false; |
477 bool waiting_for_clear_keyword_data_ = false; | 477 bool waiting_for_clear_keyword_data_ = false; |
478 bool waiting_for_clear_nacl_cache_ = false; | 478 bool waiting_for_clear_nacl_cache_ = false; |
479 bool waiting_for_clear_network_predictor_ = false; | 479 bool waiting_for_clear_network_predictor_ = false; |
480 bool waiting_for_clear_networking_history_ = false; | 480 bool waiting_for_clear_networking_history_ = false; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 // not initialised, so the registry must be mocked out. | 516 // not initialised, so the registry must be mocked out. |
517 std::unique_ptr<WebappRegistry> webapp_registry_; | 517 std::unique_ptr<WebappRegistry> webapp_registry_; |
518 #endif | 518 #endif |
519 | 519 |
520 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_; | 520 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_; |
521 | 521 |
522 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 522 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
523 }; | 523 }; |
524 | 524 |
525 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ | 525 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
OLD | NEW |