| 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 #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 14 matching lines...) Expand all Loading... |
| 25 #include "chrome/browser/domain_reliability/service_factory.h" | 25 #include "chrome/browser/domain_reliability/service_factory.h" |
| 26 #include "chrome/browser/download/download_prefs.h" | 26 #include "chrome/browser/download/download_prefs.h" |
| 27 #include "chrome/browser/history/history_service_factory.h" | 27 #include "chrome/browser/history/history_service_factory.h" |
| 28 #include "chrome/browser/history/web_history_service_factory.h" | 28 #include "chrome/browser/history/web_history_service_factory.h" |
| 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/password_manager/password_store_factory.h" | 34 #include "chrome/browser/password_manager/password_store_factory.h" |
| 35 #include "chrome/browser/permissions/permission_decision_auto_blocker.h" |
| 35 #include "chrome/browser/prerender/prerender_manager.h" | 36 #include "chrome/browser/prerender/prerender_manager.h" |
| 36 #include "chrome/browser/prerender/prerender_manager_factory.h" | 37 #include "chrome/browser/prerender/prerender_manager_factory.h" |
| 37 #include "chrome/browser/profiles/profile.h" | 38 #include "chrome/browser/profiles/profile.h" |
| 38 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 39 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 39 #include "chrome/browser/search_engines/template_url_service_factory.h" | 40 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 40 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 41 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
| 41 #include "chrome/browser/web_data_service_factory.h" | 42 #include "chrome/browser/web_data_service_factory.h" |
| 42 #include "chrome/common/features.h" | 43 #include "chrome/common/features.h" |
| 43 #include "chrome/common/pref_names.h" | 44 #include "chrome/common/pref_names.h" |
| 44 #include "chrome/common/url_constants.h" | 45 #include "chrome/common/url_constants.h" |
| (...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 HostContentSettingsMapFactory::GetForProfile(profile_), | 792 HostContentSettingsMapFactory::GetForProfile(profile_), |
| 792 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, | 793 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, |
| 793 base::Bind(&ForwardPrimaryPatternCallback, same_pattern_filter)); | 794 base::Bind(&ForwardPrimaryPatternCallback, same_pattern_filter)); |
| 794 } | 795 } |
| 795 | 796 |
| 796 if (remove_mask & REMOVE_SITE_USAGE_DATA || remove_mask & REMOVE_HISTORY) { | 797 if (remove_mask & REMOVE_SITE_USAGE_DATA || remove_mask & REMOVE_HISTORY) { |
| 797 ClearSettingsForOneTypeWithPredicate( | 798 ClearSettingsForOneTypeWithPredicate( |
| 798 HostContentSettingsMapFactory::GetForProfile(profile_), | 799 HostContentSettingsMapFactory::GetForProfile(profile_), |
| 799 CONTENT_SETTINGS_TYPE_APP_BANNER, | 800 CONTENT_SETTINGS_TYPE_APP_BANNER, |
| 800 base::Bind(&ForwardPrimaryPatternCallback, same_pattern_filter)); | 801 base::Bind(&ForwardPrimaryPatternCallback, same_pattern_filter)); |
| 802 |
| 803 PermissionDecisionAutoBlocker::RemoveCountsByUrl(profile_, filter); |
| 801 } | 804 } |
| 802 | 805 |
| 803 if (remove_mask & REMOVE_PASSWORDS) { | 806 if (remove_mask & REMOVE_PASSWORDS) { |
| 804 content::RecordAction(UserMetricsAction("ClearBrowsingData_Passwords")); | 807 content::RecordAction(UserMetricsAction("ClearBrowsingData_Passwords")); |
| 805 password_manager::PasswordStore* password_store = | 808 password_manager::PasswordStore* password_store = |
| 806 PasswordStoreFactory::GetForProfile( | 809 PasswordStoreFactory::GetForProfile( |
| 807 profile_, ServiceAccessType::EXPLICIT_ACCESS).get(); | 810 profile_, ServiceAccessType::EXPLICIT_ACCESS).get(); |
| 808 | 811 |
| 809 if (password_store) { | 812 if (password_store) { |
| 810 waiting_for_clear_passwords_ = true; | 813 waiting_for_clear_passwords_ = true; |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 waiting_for_clear_offline_page_data_ = false; | 1411 waiting_for_clear_offline_page_data_ = false; |
| 1409 NotifyIfDone(); | 1412 NotifyIfDone(); |
| 1410 } | 1413 } |
| 1411 #endif | 1414 #endif |
| 1412 | 1415 |
| 1413 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { | 1416 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { |
| 1414 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1417 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1415 waiting_for_clear_domain_reliability_monitor_ = false; | 1418 waiting_for_clear_domain_reliability_monitor_ = false; |
| 1416 NotifyIfDone(); | 1419 NotifyIfDone(); |
| 1417 } | 1420 } |
| OLD | NEW |