Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover.cc

Issue 2335023002: Adding a previews IO-thread blacklist (Closed)
Patch Set: updated comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "chrome/browser/browsing_data/browsing_data_remover.h" 5 #include "chrome/browser/browsing_data/browsing_data_remover.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 18 matching lines...) Expand all
29 #include "chrome/browser/io_thread.h" 29 #include "chrome/browser/io_thread.h"
30 #include "chrome/browser/media/media_device_id_salt.h" 30 #include "chrome/browser/media/media_device_id_salt.h"
31 #include "chrome/browser/net/predictor.h" 31 #include "chrome/browser/net/predictor.h"
32 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 32 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
33 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" 33 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h"
34 #include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h" 34 #include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h"
35 #include "chrome/browser/password_manager/password_store_factory.h" 35 #include "chrome/browser/password_manager/password_store_factory.h"
36 #include "chrome/browser/permissions/permission_decision_auto_blocker.h" 36 #include "chrome/browser/permissions/permission_decision_auto_blocker.h"
37 #include "chrome/browser/prerender/prerender_manager.h" 37 #include "chrome/browser/prerender/prerender_manager.h"
38 #include "chrome/browser/prerender/prerender_manager_factory.h" 38 #include "chrome/browser/prerender/prerender_manager_factory.h"
39 #include "chrome/browser/previews/previews_service.h"
40 #include "chrome/browser/previews/previews_service_factory.h"
39 #include "chrome/browser/profiles/profile.h" 41 #include "chrome/browser/profiles/profile.h"
40 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 42 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
41 #include "chrome/browser/search_engines/template_url_service_factory.h" 43 #include "chrome/browser/search_engines/template_url_service_factory.h"
42 #include "chrome/browser/sessions/tab_restore_service_factory.h" 44 #include "chrome/browser/sessions/tab_restore_service_factory.h"
43 #include "chrome/browser/web_data_service_factory.h" 45 #include "chrome/browser/web_data_service_factory.h"
44 #include "chrome/common/features.h" 46 #include "chrome/common/features.h"
45 #include "chrome/common/pref_names.h" 47 #include "chrome/common/pref_names.h"
46 #include "chrome/common/url_constants.h" 48 #include "chrome/common/url_constants.h"
47 #include "components/autofill/core/browser/personal_data_manager.h" 49 #include "components/autofill/core/browser/personal_data_manager.h"
48 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" 50 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
49 #include "components/browsing_data/content/storage_partition_http_cache_data_rem over.h" 51 #include "components/browsing_data/content/storage_partition_http_cache_data_rem over.h"
50 #include "components/content_settings/core/browser/host_content_settings_map.h" 52 #include "components/content_settings/core/browser/host_content_settings_map.h"
51 #include "components/content_settings/core/common/content_settings.h" 53 #include "components/content_settings/core/common/content_settings.h"
52 #include "components/content_settings/core/common/content_settings_pattern.h" 54 #include "components/content_settings/core/common/content_settings_pattern.h"
53 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_comp ression_stats.h" 55 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_comp ression_stats.h"
54 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv ice.h" 56 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv ice.h"
55 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h" 57 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h"
56 #include "components/domain_reliability/service.h" 58 #include "components/domain_reliability/service.h"
57 #include "components/history/core/browser/history_service.h" 59 #include "components/history/core/browser/history_service.h"
58 #include "components/nacl/browser/nacl_browser.h" 60 #include "components/nacl/browser/nacl_browser.h"
59 #include "components/nacl/browser/pnacl_host.h" 61 #include "components/nacl/browser/pnacl_host.h"
60 #include "components/ntp_snippets/content_suggestions_service.h" 62 #include "components/ntp_snippets/content_suggestions_service.h"
61 #include "components/omnibox/browser/omnibox_pref_names.h" 63 #include "components/omnibox/browser/omnibox_pref_names.h"
62 #include "components/password_manager/core/browser/password_store.h" 64 #include "components/password_manager/core/browser/password_store.h"
63 #include "components/power/origin_power_map.h" 65 #include "components/power/origin_power_map.h"
64 #include "components/power/origin_power_map_factory.h" 66 #include "components/power/origin_power_map_factory.h"
65 #include "components/prefs/pref_service.h" 67 #include "components/prefs/pref_service.h"
68 #include "components/previews/previews_ui_service.h"
66 #include "components/search_engines/template_url_service.h" 69 #include "components/search_engines/template_url_service.h"
67 #include "components/sessions/core/tab_restore_service.h" 70 #include "components/sessions/core/tab_restore_service.h"
68 #include "components/web_cache/browser/web_cache_manager.h" 71 #include "components/web_cache/browser/web_cache_manager.h"
69 #include "content/public/browser/browser_thread.h" 72 #include "content/public/browser/browser_thread.h"
70 #include "content/public/browser/download_manager.h" 73 #include "content/public/browser/download_manager.h"
71 #include "content/public/browser/notification_service.h" 74 #include "content/public/browser/notification_service.h"
72 #include "content/public/browser/plugin_data_remover.h" 75 #include "content/public/browser/plugin_data_remover.h"
73 #include "content/public/browser/ssl_host_state_delegate.h" 76 #include "content/public/browser/ssl_host_state_delegate.h"
74 #include "content/public/browser/storage_partition.h" 77 #include "content/public/browser/storage_partition.h"
75 #include "content/public/browser/user_metrics.h" 78 #include "content/public/browser/user_metrics.h"
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 data_reduction_proxy::DataReductionProxyService* 719 data_reduction_proxy::DataReductionProxyService*
717 data_reduction_proxy_service = 720 data_reduction_proxy_service =
718 data_reduction_proxy_settings->data_reduction_proxy_service(); 721 data_reduction_proxy_settings->data_reduction_proxy_service();
719 if (data_reduction_proxy_service) { 722 if (data_reduction_proxy_service) {
720 data_reduction_proxy_service->compression_stats() 723 data_reduction_proxy_service->compression_stats()
721 ->DeleteBrowsingHistory(delete_begin_, delete_end_); 724 ->DeleteBrowsingHistory(delete_begin_, delete_end_);
722 } 725 }
723 } 726 }
724 } 727 }
725 728
729 PreviewsService* previews_service =
730 PreviewsServiceFactory::GetForProfile(profile_);
731 if (previews_service && previews_service->previews_ui_service()) {
732 previews_service->previews_ui_service()->ClearBlackList(delete_begin_,
733 delete_end_);
734 }
735
726 if ((remove_mask & REMOVE_DOWNLOADS) && may_delete_history) { 736 if ((remove_mask & REMOVE_DOWNLOADS) && may_delete_history) {
727 content::RecordAction(UserMetricsAction("ClearBrowsingData_Downloads")); 737 content::RecordAction(UserMetricsAction("ClearBrowsingData_Downloads"));
728 content::DownloadManager* download_manager = 738 content::DownloadManager* download_manager =
729 BrowserContext::GetDownloadManager(profile_); 739 BrowserContext::GetDownloadManager(profile_);
730 download_manager->RemoveDownloadsByURLAndTime(filter, 740 download_manager->RemoveDownloadsByURLAndTime(filter,
731 delete_begin_, delete_end_); 741 delete_begin_, delete_end_);
732 DownloadPrefs* download_prefs = DownloadPrefs::FromDownloadManager( 742 DownloadPrefs* download_prefs = DownloadPrefs::FromDownloadManager(
733 download_manager); 743 download_manager);
734 download_prefs->SetSaveFilePath(download_prefs->DownloadPath()); 744 download_prefs->SetSaveFilePath(download_prefs->DownloadPath());
735 } 745 }
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 waiting_for_clear_offline_page_data_ = false; 1545 waiting_for_clear_offline_page_data_ = false;
1536 NotifyIfDone(); 1546 NotifyIfDone();
1537 } 1547 }
1538 #endif 1548 #endif
1539 1549
1540 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { 1550 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() {
1541 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1551 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1542 waiting_for_clear_domain_reliability_monitor_ = false; 1552 waiting_for_clear_domain_reliability_monitor_ = false;
1543 NotifyIfDone(); 1553 NotifyIfDone();
1544 } 1554 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | components/previews/previews_black_list.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698