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 <queue> | 10 #include <queue> |
11 #include <set> | 11 #include <set> |
12 | 12 |
13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/memory/ref_counted.h" | |
17 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
18 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
19 #include "base/sequenced_task_runner_helpers.h" | |
20 #include "base/synchronization/waitable_event_watcher.h" | 18 #include "base/synchronization/waitable_event_watcher.h" |
21 #include "base/task/cancelable_task_tracker.h" | |
22 #include "base/time/time.h" | 19 #include "base/time/time.h" |
23 #include "build/build_config.h" | 20 #include "build/build_config.h" |
| 21 #include "chrome/browser/browsing_data/browsing_data_remover_delegate.h" |
24 #include "chrome/common/features.h" | 22 #include "chrome/common/features.h" |
25 #include "components/browsing_data/core/browsing_data_utils.h" | 23 #include "components/browsing_data/core/browsing_data_utils.h" |
26 #include "components/content_settings/core/common/content_settings_pattern.h" | |
27 #include "components/content_settings/core/common/content_settings_types.h" | |
28 #include "components/keyed_service/core/keyed_service.h" | 24 #include "components/keyed_service/core/keyed_service.h" |
29 #include "components/offline_pages/core/offline_page_model.h" | |
30 #include "components/prefs/pref_member.h" | |
31 #include "components/search_engines/template_url_service.h" | |
32 #include "media/media_features.h" | |
33 #include "ppapi/features/features.h" | 25 #include "ppapi/features/features.h" |
34 #include "storage/common/quota/quota_types.h" | 26 #include "storage/common/quota/quota_types.h" |
35 #include "url/gurl.h" | 27 #include "url/gurl.h" |
36 | 28 |
37 #if BUILDFLAG(ENABLE_PLUGINS) | |
38 #include "chrome/browser/pepper_flash_settings_manager.h" | |
39 #endif | |
40 | |
41 #if defined(OS_CHROMEOS) | |
42 #include "chromeos/dbus/dbus_method_call_status.h" | |
43 #endif | |
44 | |
45 class BrowsingDataFilterBuilder; | 29 class BrowsingDataFilterBuilder; |
46 class BrowsingDataFlashLSOHelper; | 30 class BrowsingDataFlashLSOHelper; |
47 class BrowsingDataRemoverFactory; | 31 class BrowsingDataRemoverFactory; |
48 class Profile; | 32 class Profile; |
49 class WebappRegistry; | |
50 | |
51 namespace chrome_browser_net { | |
52 class Predictor; | |
53 } | |
54 | 33 |
55 namespace content { | 34 namespace content { |
56 class BrowserContext; | 35 class BrowserContext; |
57 class PluginDataRemover; | 36 class PluginDataRemover; |
58 class StoragePartition; | 37 class StoragePartition; |
59 } | 38 } |
60 | 39 |
61 //////////////////////////////////////////////////////////////////////////////// | 40 //////////////////////////////////////////////////////////////////////////////// |
62 // BrowsingDataRemover is responsible for removing data related to browsing: | 41 // BrowsingDataRemover is responsible for removing data related to browsing: |
63 // visits in url database, downloads, cookies ... | 42 // visits in url database, downloads, cookies ... |
(...skipping 19 matching lines...) Expand all Loading... |
83 // remover->RemoveAndReply(Unbounded(), REMOVE_COOKIES, ALL, this); | 62 // remover->RemoveAndReply(Unbounded(), REMOVE_COOKIES, ALL, this); |
84 // } | 63 // } |
85 // | 64 // |
86 // void OnBrowsingDataRemoverDone() { | 65 // void OnBrowsingDataRemoverDone() { |
87 // LOG(INFO) << "Cookies were deleted."; | 66 // LOG(INFO) << "Cookies were deleted."; |
88 // } | 67 // } |
89 // } | 68 // } |
90 // | 69 // |
91 //////////////////////////////////////////////////////////////////////////////// | 70 //////////////////////////////////////////////////////////////////////////////// |
92 | 71 |
93 class BrowsingDataRemover : public KeyedService | 72 class BrowsingDataRemover : public KeyedService { |
94 #if BUILDFLAG(ENABLE_PLUGINS) | |
95 , public PepperFlashSettingsManager::Client | |
96 #endif | |
97 { | |
98 public: | 73 public: |
99 // Mask used for Remove. | 74 // Mask used for Remove. |
100 enum RemoveDataMask { | 75 enum RemoveDataMask { |
101 REMOVE_APPCACHE = 1 << 0, | 76 REMOVE_APPCACHE = 1 << 0, |
102 REMOVE_CACHE = 1 << 1, | 77 REMOVE_CACHE = 1 << 1, |
103 REMOVE_COOKIES = 1 << 2, | 78 REMOVE_COOKIES = 1 << 2, |
104 REMOVE_DOWNLOADS = 1 << 3, | 79 REMOVE_DOWNLOADS = 1 << 3, |
105 REMOVE_FILE_SYSTEMS = 1 << 4, | 80 REMOVE_FILE_SYSTEMS = 1 << 4, |
106 REMOVE_FORM_DATA = 1 << 5, | 81 REMOVE_FORM_DATA = 1 << 5, |
107 // In addition to visits, REMOVE_HISTORY removes keywords, last session and | 82 // In addition to visits, REMOVE_HISTORY removes keywords, last session and |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 | 207 |
233 // Sets a CompletionInhibitor, which will be notified each time an instance is | 208 // Sets a CompletionInhibitor, which will be notified each time an instance is |
234 // about to complete a browsing data removal process, and will be able to | 209 // about to complete a browsing data removal process, and will be able to |
235 // artificially delay the completion. | 210 // artificially delay the completion. |
236 // TODO(crbug.com/483528): Make this non-static. | 211 // TODO(crbug.com/483528): Make this non-static. |
237 static void set_completion_inhibitor_for_testing( | 212 static void set_completion_inhibitor_for_testing( |
238 CompletionInhibitor* inhibitor) { | 213 CompletionInhibitor* inhibitor) { |
239 completion_inhibitor_ = inhibitor; | 214 completion_inhibitor_ = inhibitor; |
240 } | 215 } |
241 | 216 |
| 217 // Called by the embedder to provide the delegate that will take care of |
| 218 // deleting embedder-specific data. |
| 219 void set_embedder_delegate( |
| 220 std::unique_ptr<BrowsingDataRemoverDelegate> embedder_delegate) { |
| 221 embedder_delegate_ = std::move(embedder_delegate); |
| 222 } |
| 223 |
| 224 BrowsingDataRemoverDelegate* get_embedder_delegate() const { |
| 225 return embedder_delegate_.get(); |
| 226 } |
| 227 |
242 // Removes browsing data within the given |time_range|, with datatypes being | 228 // Removes browsing data within the given |time_range|, with datatypes being |
243 // specified by |remove_mask| and origin types by |origin_type_mask|. | 229 // specified by |remove_mask| and origin types by |origin_type_mask|. |
244 void Remove(const TimeRange& time_range, | 230 void Remove(const TimeRange& time_range, |
245 int remove_mask, | 231 int remove_mask, |
246 int origin_type_mask); | 232 int origin_type_mask); |
247 | 233 |
248 // A version of the above that in addition informs the |observer| when the | 234 // A version of the above that in addition informs the |observer| when the |
249 // removal task is finished. | 235 // removal task is finished. |
250 void RemoveAndReply(const TimeRange& time_range, | 236 void RemoveAndReply(const TimeRange& time_range, |
251 int remove_mask, | 237 int remove_mask, |
(...skipping 18 matching lines...) Expand all Loading... |
270 std::unique_ptr<BrowsingDataFilterBuilder> filter_builder, | 256 std::unique_ptr<BrowsingDataFilterBuilder> filter_builder, |
271 Observer* observer); | 257 Observer* observer); |
272 | 258 |
273 void AddObserver(Observer* observer); | 259 void AddObserver(Observer* observer); |
274 void RemoveObserver(Observer* observer); | 260 void RemoveObserver(Observer* observer); |
275 | 261 |
276 // Used for testing. | 262 // Used for testing. |
277 void OverrideStoragePartitionForTesting( | 263 void OverrideStoragePartitionForTesting( |
278 content::StoragePartition* storage_partition); | 264 content::StoragePartition* storage_partition); |
279 | 265 |
280 #if BUILDFLAG(ANDROID_JAVA_UI) | |
281 void OverrideWebappRegistryForTesting( | |
282 std::unique_ptr<WebappRegistry> webapp_registry); | |
283 #endif | |
284 | |
285 #if BUILDFLAG(ENABLE_PLUGINS) | 266 #if BUILDFLAG(ENABLE_PLUGINS) |
286 void OverrideFlashLSOHelperForTesting( | 267 void OverrideFlashLSOHelperForTesting( |
287 scoped_refptr<BrowsingDataFlashLSOHelper> flash_lso_helper); | 268 scoped_refptr<BrowsingDataFlashLSOHelper> flash_lso_helper); |
288 #endif | 269 #endif |
289 | 270 |
290 // Parameters of the last call are exposed to be used by tests. Removal and | 271 // Parameters of the last call are exposed to be used by tests. Removal and |
291 // origin type masks equal to -1 mean that no removal has ever been executed. | 272 // origin type masks equal to -1 mean that no removal has ever been executed. |
292 // TODO(msramek): If other consumers than tests are interested in this, | 273 // TODO(msramek): If other consumers than tests are interested in this, |
293 // consider returning them in OnBrowsingDataRemoverDone() callback. | 274 // consider returning them in OnBrowsingDataRemoverDone() callback. |
294 const base::Time& GetLastUsedBeginTime(); | 275 const base::Time& GetLastUsedBeginTime(); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 std::unique_ptr<BrowsingDataFilterBuilder> filter_builder; | 321 std::unique_ptr<BrowsingDataFilterBuilder> filter_builder; |
341 Observer* observer; | 322 Observer* observer; |
342 }; | 323 }; |
343 | 324 |
344 void Shutdown() override; | 325 void Shutdown() override; |
345 | 326 |
346 // Setter for |is_removing_|; DCHECKs that we can only start removing if we're | 327 // Setter for |is_removing_|; DCHECKs that we can only start removing if we're |
347 // not already removing, and vice-versa. | 328 // not already removing, and vice-versa. |
348 void SetRemoving(bool is_removing); | 329 void SetRemoving(bool is_removing); |
349 | 330 |
350 // Callback for when TemplateURLService has finished loading. Clears the data, | |
351 // clears the respective waiting flag, and invokes NotifyIfDone. | |
352 void OnKeywordsLoaded(base::Callback<bool(const GURL&)> url_filter); | |
353 | |
354 #if BUILDFLAG(ENABLE_PLUGINS) | 331 #if BUILDFLAG(ENABLE_PLUGINS) |
355 // Called when plugin data has been cleared. Invokes NotifyIfDone. | 332 // Called when plugin data has been cleared. Invokes NotifyIfDone. |
356 void OnWaitableEventSignaled(base::WaitableEvent* waitable_event); | 333 void OnWaitableEventSignaled(base::WaitableEvent* waitable_event); |
357 | 334 |
358 // Called when the list of |sites| storing Flash LSO cookies is fetched. | 335 // Called when the list of |sites| storing Flash LSO cookies is fetched. |
359 void OnSitesWithFlashDataFetched( | 336 void OnSitesWithFlashDataFetched( |
360 base::Callback<bool(const std::string&)> plugin_filter, | 337 base::Callback<bool(const std::string&)> plugin_filter, |
361 const std::vector<std::string>& sites); | 338 const std::vector<std::string>& sites); |
362 | 339 |
363 // Indicates that LSO cookies for one website have been deleted. | 340 // Indicates that LSO cookies for one website have been deleted. |
364 void OnFlashDataDeleted(); | 341 void OnFlashDataDeleted(); |
365 | |
366 // PepperFlashSettingsManager::Client implementation. | |
367 void OnDeauthorizeFlashContentLicensesCompleted(uint32_t request_id, | |
368 bool success) override; | |
369 #endif | |
370 | |
371 #if defined (OS_CHROMEOS) | |
372 void OnClearPlatformKeys(chromeos::DBusMethodCallStatus call_status, | |
373 bool result); | |
374 #endif | 342 #endif |
375 | 343 |
376 // Executes the next removal task. Called after the previous task was finished | 344 // Executes the next removal task. Called after the previous task was finished |
377 // or directly from Remove() if the task queue was empty. | 345 // or directly from Remove() if the task queue was empty. |
378 void RunNextTask(); | 346 void RunNextTask(); |
379 | 347 |
380 // Removes the specified items related to browsing for a specific host. If the | 348 // Removes the specified items related to browsing for a specific host. If the |
381 // provided |remove_url| is empty, data is removed for all origins; otherwise, | 349 // provided |remove_url| is empty, data is removed for all origins; otherwise, |
382 // it is restricted by the origin filter origin (where implemented yet). The | 350 // it is restricted by the origin filter origin (where implemented yet). The |
383 // |origin_type_mask| parameter defines the set of origins from which data | 351 // |origin_type_mask| parameter defines the set of origins from which data |
384 // should be removed (protected, unprotected, or both). | 352 // should be removed (protected, unprotected, or both). |
385 // TODO(ttr314): Remove "(where implemented yet)" constraint above once | 353 // TODO(ttr314): Remove "(where implemented yet)" constraint above once |
386 // crbug.com/113621 is done. | 354 // crbug.com/113621 is done. |
387 // TODO(crbug.com/589586): Support all backends w/ origin filter. | 355 // TODO(crbug.com/589586): Support all backends w/ origin filter. |
388 void RemoveImpl(const TimeRange& time_range, | 356 void RemoveImpl(const TimeRange& time_range, |
389 int remove_mask, | 357 int remove_mask, |
390 const BrowsingDataFilterBuilder& filter_builder, | 358 const BrowsingDataFilterBuilder& filter_builder, |
391 int origin_type_mask); | 359 int origin_type_mask); |
392 | 360 |
393 // Notifies observers and transitions to the idle state. | 361 // Notifies observers and transitions to the idle state. |
394 void Notify(); | 362 void Notify(); |
395 | 363 |
396 // Checks if we are all done, and if so, calls Notify(). | 364 // Checks if we are all done, and if so, calls Notify(). |
397 void NotifyIfDone(); | 365 void NotifyIfDone(); |
398 | 366 |
399 // Called when history deletion is done. | |
400 void OnHistoryDeletionDone(); | |
401 | |
402 // Callback for when the hostname resolution cache has been cleared. | |
403 // Clears the respective waiting flag and invokes NotifyIfDone. | |
404 void OnClearedHostnameResolutionCache(); | |
405 | |
406 // Callback for when HTTP auth cache has been cleared. | 367 // Callback for when HTTP auth cache has been cleared. |
407 // Clears the respective waiting flag and invokes NotifyIfDone. | 368 // Clears the respective waiting flag and invokes NotifyIfDone. |
408 void OnClearedHttpAuthCache(); | 369 void OnClearedHttpAuthCache(); |
409 | 370 |
410 // Callback for when speculative data in the network Predictor has been | |
411 // cleared. Clears the respective waiting flag and invokes | |
412 // NotifyIfDone. | |
413 void OnClearedNetworkPredictor(); | |
414 | |
415 // Callback for when network related data in ProfileIOData has been cleared. | |
416 // Clears the respective waiting flag and invokes NotifyIfDone. | |
417 void OnClearedNetworkingHistory(); | |
418 | |
419 // Callback for when the cache has been deleted. Invokes | 371 // Callback for when the cache has been deleted. Invokes |
420 // NotifyIfDone. | 372 // NotifyIfDone. |
421 void ClearedCache(); | 373 void ClearedCache(); |
422 #if !defined(DISABLE_NACL) | |
423 // Callback for when the NaCl cache has been deleted. Invokes | |
424 // NotifyIfDone. | |
425 void ClearedNaClCache(); | |
426 | |
427 // Callback for when the PNaCl translation cache has been deleted. Invokes | |
428 // NotifyIfDone. | |
429 void ClearedPnaclCache(); | |
430 | |
431 #endif | |
432 | |
433 // Callback for when passwords for the requested time range have been cleared. | |
434 void OnClearedPasswords(); | |
435 | |
436 // Callback for when passwords stats for the requested time range have been | |
437 // cleared. | |
438 void OnClearedPasswordsStats(); | |
439 | |
440 // Callback for when the autosignin state of passwords has been revoked. | |
441 void OnClearedAutoSignIn(); | |
442 | 374 |
443 // Callback for when cookies have been deleted. Invokes NotifyIfDone. | 375 // Callback for when cookies have been deleted. Invokes NotifyIfDone. |
444 void OnClearedCookies(); | 376 void OnClearedCookies(); |
445 | 377 |
446 // Callback for when channel IDs have been deleted. Invokes | 378 // Callback for when channel IDs have been deleted. Invokes |
447 // NotifyIfDone. | 379 // NotifyIfDone. |
448 void OnClearedChannelIDs(); | 380 void OnClearedChannelIDs(); |
449 | 381 |
450 // Callback from the above method. | |
451 void OnClearedFormData(); | |
452 | |
453 // Callback for when the Autofill profile and credit card origin URLs have | |
454 // been deleted. | |
455 void OnClearedAutofillOriginURLs(); | |
456 | |
457 // Callback on UI thread when the storage partition related data are cleared. | 382 // Callback on UI thread when the storage partition related data are cleared. |
458 void OnClearedStoragePartitionData(); | 383 void OnClearedStoragePartitionData(); |
459 | 384 |
460 #if BUILDFLAG(ENABLE_WEBRTC) | 385 // Callback for when all embedder-specific data have been deleted. |
461 // Callback on UI thread when the WebRTC logs have been deleted. | 386 // Invokes NotifyIfDone. |
462 void OnClearedWebRtcLogs(); | 387 void OnClearedEmbedderData(); |
463 #endif | |
464 | |
465 #if BUILDFLAG(ANDROID_JAVA_UI) | |
466 // Callback on UI thread when the precache history has been cleared. | |
467 void OnClearedPrecacheHistory(); | |
468 | |
469 // Callback on UI thread when the offline page data has been cleared. | |
470 void OnClearedOfflinePageData( | |
471 offline_pages::OfflinePageModel::DeletePageResult result); | |
472 #endif | |
473 | |
474 void OnClearedDomainReliabilityMonitor(); | |
475 | 388 |
476 // Returns true if we're all done. | 389 // Returns true if we're all done. |
477 bool AllDone(); | 390 bool AllDone(); |
478 | 391 |
479 // Profile we're to remove from. | 392 // Profile we're to remove from. |
480 Profile* profile_; | 393 Profile* profile_; |
481 | 394 |
| 395 // A delegate to delete the embedder-specific data. |
| 396 std::unique_ptr<BrowsingDataRemoverDelegate> embedder_delegate_; |
| 397 |
482 // Start time to delete from. | 398 // Start time to delete from. |
483 base::Time delete_begin_; | 399 base::Time delete_begin_; |
484 | 400 |
485 // End time to delete to. | 401 // End time to delete to. |
486 base::Time delete_end_; | 402 base::Time delete_end_; |
487 | 403 |
488 // The removal mask for the current removal operation. | 404 // The removal mask for the current removal operation. |
489 int remove_mask_ = 0; | 405 int remove_mask_ = 0; |
490 | 406 |
491 // From which types of origins should we remove data? | 407 // From which types of origins should we remove data? |
(...skipping 10 matching lines...) Expand all Loading... |
502 // to artificially delay completion. Used for testing. | 418 // to artificially delay completion. Used for testing. |
503 static CompletionInhibitor* completion_inhibitor_; | 419 static CompletionInhibitor* completion_inhibitor_; |
504 | 420 |
505 #if BUILDFLAG(ENABLE_PLUGINS) | 421 #if BUILDFLAG(ENABLE_PLUGINS) |
506 // Used to delete plugin data. | 422 // Used to delete plugin data. |
507 std::unique_ptr<content::PluginDataRemover> plugin_data_remover_; | 423 std::unique_ptr<content::PluginDataRemover> plugin_data_remover_; |
508 base::WaitableEventWatcher watcher_; | 424 base::WaitableEventWatcher watcher_; |
509 | 425 |
510 // Used for per-site plugin data deletion. | 426 // Used for per-site plugin data deletion. |
511 scoped_refptr<BrowsingDataFlashLSOHelper> flash_lso_helper_; | 427 scoped_refptr<BrowsingDataFlashLSOHelper> flash_lso_helper_; |
512 | |
513 // Used to deauthorize content licenses for Pepper Flash. | |
514 std::unique_ptr<PepperFlashSettingsManager> pepper_flash_settings_manager_; | |
515 #endif | 428 #endif |
516 | 429 |
517 uint32_t deauthorize_flash_content_licenses_request_id_ = 0; | |
518 // True if we're waiting for various data to be deleted. | 430 // True if we're waiting for various data to be deleted. |
519 // These may only be accessed from UI thread in order to avoid races! | 431 // These may only be accessed from UI thread in order to avoid races! |
520 bool waiting_for_synchronous_clear_operations_ = false; | 432 bool waiting_for_synchronous_clear_operations_ = false; |
521 bool waiting_for_clear_autofill_origin_urls_ = false; | 433 bool waiting_for_clear_embedder_data_ = false; |
522 bool waiting_for_clear_cache_ = false; | 434 bool waiting_for_clear_cache_ = false; |
523 bool waiting_for_clear_channel_ids_ = false; | 435 bool waiting_for_clear_channel_ids_ = false; |
524 bool waiting_for_clear_flash_content_licenses_ = false; | 436 bool waiting_for_clear_http_auth_cache_ = false; |
525 // Non-zero if waiting for cookies to be cleared. | 437 bool waiting_for_clear_storage_partition_data_ = false; |
526 int waiting_for_clear_cookies_count_ = 0; | |
527 // Counts the number of plugin data tasks. Should be the number of LSO cookies | 438 // Counts the number of plugin data tasks. Should be the number of LSO cookies |
528 // to be deleted, or 1 while we're fetching LSO cookies or deleting in bulk. | 439 // to be deleted, or 1 while we're fetching LSO cookies or deleting in bulk. |
529 int waiting_for_clear_plugin_data_count_ = 0; | 440 int waiting_for_clear_plugin_data_count_ = 0; |
530 bool waiting_for_clear_domain_reliability_monitor_ = false; | |
531 bool waiting_for_clear_form_ = false; | |
532 bool waiting_for_clear_history_ = false; | |
533 bool waiting_for_clear_hostname_resolution_cache_ = false; | |
534 bool waiting_for_clear_http_auth_cache_ = false; | |
535 bool waiting_for_clear_keyword_data_ = false; | |
536 bool waiting_for_clear_nacl_cache_ = false; | |
537 bool waiting_for_clear_network_predictor_ = false; | |
538 bool waiting_for_clear_networking_history_ = false; | |
539 bool waiting_for_clear_passwords_ = false; | |
540 bool waiting_for_clear_passwords_stats_ = false; | |
541 bool waiting_for_clear_platform_keys_ = false; | |
542 bool waiting_for_clear_pnacl_cache_ = false; | |
543 #if BUILDFLAG(ANDROID_JAVA_UI) | |
544 bool waiting_for_clear_precache_history_ = false; | |
545 bool waiting_for_clear_offline_page_data_ = false; | |
546 #endif | |
547 bool waiting_for_clear_storage_partition_data_ = false; | |
548 #if BUILDFLAG(ENABLE_WEBRTC) | |
549 bool waiting_for_clear_webrtc_logs_ = false; | |
550 #endif | |
551 bool waiting_for_clear_auto_sign_in_ = false; | |
552 | 441 |
553 // Observers of the global state and individual tasks. | 442 // Observers of the global state and individual tasks. |
554 base::ObserverList<Observer, true> observer_list_; | 443 base::ObserverList<Observer, true> observer_list_; |
555 | 444 |
556 // Used if we need to clear history. | |
557 base::CancelableTaskTracker history_task_tracker_; | |
558 | |
559 std::unique_ptr<TemplateURLService::Subscription> template_url_sub_; | |
560 | |
561 // We do not own this. | 445 // We do not own this. |
562 content::StoragePartition* storage_partition_for_testing_ = nullptr; | 446 content::StoragePartition* storage_partition_for_testing_ = nullptr; |
563 | 447 |
564 #if BUILDFLAG(ANDROID_JAVA_UI) | |
565 // WebappRegistry makes calls across the JNI. In unit tests, the Java side is | |
566 // not initialised, so the registry must be mocked out. | |
567 std::unique_ptr<WebappRegistry> webapp_registry_; | |
568 #endif | |
569 | |
570 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_; | 448 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_; |
571 | 449 |
572 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 450 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
573 }; | 451 }; |
574 | 452 |
575 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ | 453 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ |
OLD | NEW |