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

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

Issue 2387823002: Adding ClearBlackList to the PreviewsBlackList and plumbing to UI (Closed)
Patch Set: Created 4 years, 2 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 #include <utility> 10 #include <utility>
(...skipping 19 matching lines...) Expand all
30 #include "chrome/browser/io_thread.h" 30 #include "chrome/browser/io_thread.h"
31 #include "chrome/browser/media/media_device_id_salt.h" 31 #include "chrome/browser/media/media_device_id_salt.h"
32 #include "chrome/browser/net/predictor.h" 32 #include "chrome/browser/net/predictor.h"
33 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 33 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
34 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" 34 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h"
35 #include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h" 35 #include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h"
36 #include "chrome/browser/password_manager/password_store_factory.h" 36 #include "chrome/browser/password_manager/password_store_factory.h"
37 #include "chrome/browser/permissions/permission_decision_auto_blocker.h" 37 #include "chrome/browser/permissions/permission_decision_auto_blocker.h"
38 #include "chrome/browser/prerender/prerender_manager.h" 38 #include "chrome/browser/prerender/prerender_manager.h"
39 #include "chrome/browser/prerender/prerender_manager_factory.h" 39 #include "chrome/browser/prerender/prerender_manager_factory.h"
40 #include "chrome/browser/previews/previews_service.h"
41 #include "chrome/browser/previews/previews_service_factory.h"
40 #include "chrome/browser/profiles/profile.h" 42 #include "chrome/browser/profiles/profile.h"
41 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 43 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
42 #include "chrome/browser/search_engines/template_url_service_factory.h" 44 #include "chrome/browser/search_engines/template_url_service_factory.h"
43 #include "chrome/browser/sessions/tab_restore_service_factory.h" 45 #include "chrome/browser/sessions/tab_restore_service_factory.h"
44 #include "chrome/browser/web_data_service_factory.h" 46 #include "chrome/browser/web_data_service_factory.h"
45 #include "chrome/common/features.h" 47 #include "chrome/common/features.h"
46 #include "chrome/common/pref_names.h" 48 #include "chrome/common/pref_names.h"
47 #include "chrome/common/url_constants.h" 49 #include "chrome/common/url_constants.h"
48 #include "components/autofill/core/browser/personal_data_manager.h" 50 #include "components/autofill/core/browser/personal_data_manager.h"
49 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" 51 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
50 #include "components/browsing_data/content/storage_partition_http_cache_data_rem over.h" 52 #include "components/browsing_data/content/storage_partition_http_cache_data_rem over.h"
51 #include "components/content_settings/core/browser/host_content_settings_map.h" 53 #include "components/content_settings/core/browser/host_content_settings_map.h"
52 #include "components/content_settings/core/common/content_settings.h" 54 #include "components/content_settings/core/common/content_settings.h"
53 #include "components/content_settings/core/common/content_settings_pattern.h" 55 #include "components/content_settings/core/common/content_settings_pattern.h"
54 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_comp ression_stats.h" 56 #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_serv ice.h" 57 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv ice.h"
56 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h" 58 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h"
57 #include "components/domain_reliability/service.h" 59 #include "components/domain_reliability/service.h"
58 #include "components/history/core/browser/history_service.h" 60 #include "components/history/core/browser/history_service.h"
59 #include "components/nacl/browser/nacl_browser.h" 61 #include "components/nacl/browser/nacl_browser.h"
60 #include "components/nacl/browser/pnacl_host.h" 62 #include "components/nacl/browser/pnacl_host.h"
61 #include "components/ntp_snippets/content_suggestions_service.h" 63 #include "components/ntp_snippets/content_suggestions_service.h"
62 #include "components/omnibox/browser/omnibox_pref_names.h" 64 #include "components/omnibox/browser/omnibox_pref_names.h"
63 #include "components/password_manager/core/browser/password_store.h" 65 #include "components/password_manager/core/browser/password_store.h"
64 #include "components/power/origin_power_map.h" 66 #include "components/power/origin_power_map.h"
65 #include "components/power/origin_power_map_factory.h" 67 #include "components/power/origin_power_map_factory.h"
66 #include "components/prefs/pref_service.h" 68 #include "components/prefs/pref_service.h"
69 #include "components/previews/core/previews_ui_service.h"
67 #include "components/search_engines/template_url_service.h" 70 #include "components/search_engines/template_url_service.h"
68 #include "components/sessions/core/tab_restore_service.h" 71 #include "components/sessions/core/tab_restore_service.h"
69 #include "components/web_cache/browser/web_cache_manager.h" 72 #include "components/web_cache/browser/web_cache_manager.h"
70 #include "content/public/browser/browser_thread.h" 73 #include "content/public/browser/browser_thread.h"
71 #include "content/public/browser/download_manager.h" 74 #include "content/public/browser/download_manager.h"
72 #include "content/public/browser/notification_service.h" 75 #include "content/public/browser/notification_service.h"
73 #include "content/public/browser/plugin_data_remover.h" 76 #include "content/public/browser/plugin_data_remover.h"
74 #include "content/public/browser/ssl_host_state_delegate.h" 77 #include "content/public/browser/ssl_host_state_delegate.h"
75 #include "content/public/browser/storage_partition.h" 78 #include "content/public/browser/storage_partition.h"
76 #include "content/public/browser/user_metrics.h" 79 #include "content/public/browser/user_metrics.h"
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 // |data_reduction_proxy_settings| is null if |profile_| is off the record. 718 // |data_reduction_proxy_settings| is null if |profile_| is off the record.
716 if (data_reduction_proxy_settings) { 719 if (data_reduction_proxy_settings) {
717 data_reduction_proxy::DataReductionProxyService* 720 data_reduction_proxy::DataReductionProxyService*
718 data_reduction_proxy_service = 721 data_reduction_proxy_service =
719 data_reduction_proxy_settings->data_reduction_proxy_service(); 722 data_reduction_proxy_settings->data_reduction_proxy_service();
720 if (data_reduction_proxy_service) { 723 if (data_reduction_proxy_service) {
721 data_reduction_proxy_service->compression_stats() 724 data_reduction_proxy_service->compression_stats()
722 ->DeleteBrowsingHistory(delete_begin_, delete_end_); 725 ->DeleteBrowsingHistory(delete_begin_, delete_end_);
723 } 726 }
724 } 727 }
728
729 // |previews_service| is null if |profile_| is off the record.
730 PreviewsService* previews_service =
731 PreviewsServiceFactory::GetForProfile(profile_);
732 if (previews_service && previews_service->previews_ui_service()) {
733 previews_service->previews_ui_service()->ClearBlackList(delete_begin_,
tbansal1 2016/10/03 16:48:12 Currently, the Clear Browsing Dialogue has "data c
RyanSturm 2016/10/03 17:23:13 Done.
msramek 2016/10/04 09:06:18 I appreciate the diligence, but this probably won'
RyanSturm 2016/10/04 20:27:23 Thanks. I'll remove it.
734 delete_end_);
735 }
725 } 736 }
726 737
727 if ((remove_mask & REMOVE_DOWNLOADS) && may_delete_history) { 738 if ((remove_mask & REMOVE_DOWNLOADS) && may_delete_history) {
728 content::RecordAction(UserMetricsAction("ClearBrowsingData_Downloads")); 739 content::RecordAction(UserMetricsAction("ClearBrowsingData_Downloads"));
729 content::DownloadManager* download_manager = 740 content::DownloadManager* download_manager =
730 BrowserContext::GetDownloadManager(profile_); 741 BrowserContext::GetDownloadManager(profile_);
731 download_manager->RemoveDownloadsByURLAndTime(filter, 742 download_manager->RemoveDownloadsByURLAndTime(filter,
732 delete_begin_, delete_end_); 743 delete_begin_, delete_end_);
733 DownloadPrefs* download_prefs = DownloadPrefs::FromDownloadManager( 744 DownloadPrefs* download_prefs = DownloadPrefs::FromDownloadManager(
734 download_manager); 745 download_manager);
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 waiting_for_clear_offline_page_data_ = false; 1547 waiting_for_clear_offline_page_data_ = false;
1537 NotifyIfDone(); 1548 NotifyIfDone();
1538 } 1549 }
1539 #endif 1550 #endif
1540 1551
1541 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { 1552 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() {
1542 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1553 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1543 waiting_for_clear_domain_reliability_monitor_ = false; 1554 waiting_for_clear_domain_reliability_monitor_ = false;
1544 NotifyIfDone(); 1555 NotifyIfDone();
1545 } 1556 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698