| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/chrome_browsing_data_remover_delegate.h" | 5 #include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 #include "chrome/browser/search_engines/template_url_service_factory.h" | 40 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 41 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 41 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
| 42 #include "chrome/browser/translate/language_model_factory.h" | 42 #include "chrome/browser/translate/language_model_factory.h" |
| 43 #include "chrome/browser/web_data_service_factory.h" | 43 #include "chrome/browser/web_data_service_factory.h" |
| 44 #include "chrome/common/features.h" | 44 #include "chrome/common/features.h" |
| 45 #include "chrome/common/pref_names.h" | 45 #include "chrome/common/pref_names.h" |
| 46 #include "chrome/common/url_constants.h" | 46 #include "chrome/common/url_constants.h" |
| 47 #include "components/autofill/core/browser/personal_data_manager.h" | 47 #include "components/autofill/core/browser/personal_data_manager.h" |
| 48 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 48 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
| 49 #include "components/bookmarks/browser/bookmark_model.h" | 49 #include "components/bookmarks/browser/bookmark_model.h" |
| 50 #include "components/content_settings/core/browser/content_settings_registry.h" |
| 50 #include "components/content_settings/core/browser/host_content_settings_map.h" | 51 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 51 #include "components/content_settings/core/common/content_settings.h" | 52 #include "components/content_settings/core/common/content_settings.h" |
| 52 #include "components/content_settings/core/common/content_settings_pattern.h" | 53 #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" | 54 #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" | 55 #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" | 56 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings.h" |
| 56 #include "components/domain_reliability/service.h" | 57 #include "components/domain_reliability/service.h" |
| 57 #include "components/history/core/browser/history_service.h" | 58 #include "components/history/core/browser/history_service.h" |
| 58 #include "components/nacl/browser/nacl_browser.h" | 59 #include "components/nacl/browser/nacl_browser.h" |
| 59 #include "components/nacl/browser/pnacl_host.h" | 60 #include "components/nacl/browser/pnacl_host.h" |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 &ChromeBrowsingDataRemoverDelegate::OnClearedCookies, | 704 &ChromeBrowsingDataRemoverDelegate::OnClearedCookies, |
| 704 weak_ptr_factory_.GetWeakPtr())))); | 705 weak_ptr_factory_.GetWeakPtr())))); |
| 705 } | 706 } |
| 706 } | 707 } |
| 707 } | 708 } |
| 708 | 709 |
| 709 MediaDeviceIDSalt::Reset(profile_->GetPrefs()); | 710 MediaDeviceIDSalt::Reset(profile_->GetPrefs()); |
| 710 } | 711 } |
| 711 | 712 |
| 712 ////////////////////////////////////////////////////////////////////////////// | 713 ////////////////////////////////////////////////////////////////////////////// |
| 714 // DATA_TYPE_CONTENT_SETTINGS |
| 715 if (remove_mask & DATA_TYPE_CONTENT_SETTINGS) { |
| 716 const auto* registry = |
| 717 content_settings::ContentSettingsRegistry::GetInstance(); |
| 718 auto* map = HostContentSettingsMapFactory::GetForProfile(profile_); |
| 719 for (const content_settings::ContentSettingsInfo* info : *registry) { |
| 720 map->ClearSettingsForOneTypeWithPredicate( |
| 721 info->website_settings_info()->type(), delete_begin_, |
| 722 base::Bind(&WebsiteSettingsFilterAdapter, filter)); |
| 723 } |
| 724 } |
| 725 |
| 726 ////////////////////////////////////////////////////////////////////////////// |
| 713 // DATA_TYPE_DURABLE_PERMISSION | 727 // DATA_TYPE_DURABLE_PERMISSION |
| 714 if (remove_mask & DATA_TYPE_DURABLE_PERMISSION) { | 728 if (remove_mask & DATA_TYPE_DURABLE_PERMISSION) { |
| 715 HostContentSettingsMapFactory::GetForProfile(profile_) | 729 HostContentSettingsMapFactory::GetForProfile(profile_) |
| 716 ->ClearSettingsForOneTypeWithPredicate( | 730 ->ClearSettingsForOneTypeWithPredicate( |
| 717 CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, base::Time(), | 731 CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, base::Time(), |
| 718 base::Bind(&WebsiteSettingsFilterAdapter, filter)); | 732 base::Bind(&WebsiteSettingsFilterAdapter, filter)); |
| 719 } | 733 } |
| 720 | 734 |
| 721 ////////////////////////////////////////////////////////////////////////////// | 735 ////////////////////////////////////////////////////////////////////////////// |
| 722 // DATA_TYPE_SITE_USAGE_DATA | 736 // DATA_TYPE_SITE_USAGE_DATA |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1144 } | 1158 } |
| 1145 | 1159 |
| 1146 void ChromeBrowsingDataRemoverDelegate:: | 1160 void ChromeBrowsingDataRemoverDelegate:: |
| 1147 OnDeauthorizeFlashContentLicensesCompleted( | 1161 OnDeauthorizeFlashContentLicensesCompleted( |
| 1148 uint32_t request_id, | 1162 uint32_t request_id, |
| 1149 bool /* success */) { | 1163 bool /* success */) { |
| 1150 DCHECK_EQ(request_id, deauthorize_flash_content_licenses_request_id_); | 1164 DCHECK_EQ(request_id, deauthorize_flash_content_licenses_request_id_); |
| 1151 clear_flash_content_licenses_.GetCompletionCallback().Run(); | 1165 clear_flash_content_licenses_.GetCompletionCallback().Run(); |
| 1152 } | 1166 } |
| 1153 #endif | 1167 #endif |
| OLD | NEW |