| 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 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 UserMetricsAction("ClearBrowsingData_ContentLicenses")); | 857 UserMetricsAction("ClearBrowsingData_ContentLicenses")); |
| 858 | 858 |
| 859 #if BUILDFLAG(ENABLE_PLUGINS) | 859 #if BUILDFLAG(ENABLE_PLUGINS) |
| 860 clear_flash_content_licenses_.Start(); | 860 clear_flash_content_licenses_.Start(); |
| 861 if (!pepper_flash_settings_manager_.get()) { | 861 if (!pepper_flash_settings_manager_.get()) { |
| 862 pepper_flash_settings_manager_.reset( | 862 pepper_flash_settings_manager_.reset( |
| 863 new PepperFlashSettingsManager(this, profile_)); | 863 new PepperFlashSettingsManager(this, profile_)); |
| 864 } | 864 } |
| 865 deauthorize_flash_content_licenses_request_id_ = | 865 deauthorize_flash_content_licenses_request_id_ = |
| 866 pepper_flash_settings_manager_->DeauthorizeContentLicenses(prefs); | 866 pepper_flash_settings_manager_->DeauthorizeContentLicenses(prefs); |
| 867 #endif // BUILDFLAG(ENABLE_PLUGINS) |
| 868 |
| 867 #if defined(OS_CHROMEOS) | 869 #if defined(OS_CHROMEOS) |
| 868 // On Chrome OS, also delete any content protection platform keys. | 870 // On Chrome OS, delete any content protection platform keys. |
| 869 const user_manager::User* user = | 871 const user_manager::User* user = |
| 870 chromeos::ProfileHelper::Get()->GetUserByProfile(profile_); | 872 chromeos::ProfileHelper::Get()->GetUserByProfile(profile_); |
| 871 if (!user) { | 873 if (!user) { |
| 872 LOG(WARNING) << "Failed to find user for current profile."; | 874 LOG(WARNING) << "Failed to find user for current profile."; |
| 873 } else { | 875 } else { |
| 874 clear_platform_keys_.Start(); | 876 clear_platform_keys_.Start(); |
| 875 chromeos::DBusThreadManager::Get() | 877 chromeos::DBusThreadManager::Get() |
| 876 ->GetCryptohomeClient() | 878 ->GetCryptohomeClient() |
| 877 ->TpmAttestationDeleteKeys( | 879 ->TpmAttestationDeleteKeys( |
| 878 chromeos::attestation::KEY_USER, | 880 chromeos::attestation::KEY_USER, |
| 879 cryptohome::Identification(user->GetAccountId()), | 881 cryptohome::Identification(user->GetAccountId()), |
| 880 chromeos::attestation::kContentProtectionKeyPrefix, | 882 chromeos::attestation::kContentProtectionKeyPrefix, |
| 881 base::Bind( | 883 base::Bind( |
| 882 &ChromeBrowsingDataRemoverDelegate::OnClearPlatformKeys, | 884 &ChromeBrowsingDataRemoverDelegate::OnClearPlatformKeys, |
| 883 weak_ptr_factory_.GetWeakPtr())); | 885 weak_ptr_factory_.GetWeakPtr())); |
| 884 } | 886 } |
| 885 #endif // defined(OS_CHROMEOS) | 887 #endif // defined(OS_CHROMEOS) |
| 886 #endif // BUILDFLAG(ENABLE_PLUGINS) | |
| 887 } | 888 } |
| 888 | 889 |
| 889 ////////////////////////////////////////////////////////////////////////////// | 890 ////////////////////////////////////////////////////////////////////////////// |
| 890 // Zero suggest. | 891 // Zero suggest. |
| 891 // Remove omnibox zero-suggest cache results. Filtering is not supported. | 892 // Remove omnibox zero-suggest cache results. Filtering is not supported. |
| 892 // This is not a problem, as deleting more data than necessary will just cause | 893 // This is not a problem, as deleting more data than necessary will just cause |
| 893 // another server round-trip; no data is actually lost. | 894 // another server round-trip; no data is actually lost. |
| 894 if ((remove_mask & (BrowsingDataRemover::REMOVE_CACHE | | 895 if ((remove_mask & (BrowsingDataRemover::REMOVE_CACHE | |
| 895 BrowsingDataRemover::REMOVE_COOKIES))) { | 896 BrowsingDataRemover::REMOVE_COOKIES))) { |
| 896 prefs->SetString(omnibox::kZeroSuggestCachedResults, std::string()); | 897 prefs->SetString(omnibox::kZeroSuggestCachedResults, std::string()); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1056 } | 1057 } |
| 1057 | 1058 |
| 1058 void ChromeBrowsingDataRemoverDelegate:: | 1059 void ChromeBrowsingDataRemoverDelegate:: |
| 1059 OnDeauthorizeFlashContentLicensesCompleted( | 1060 OnDeauthorizeFlashContentLicensesCompleted( |
| 1060 uint32_t request_id, | 1061 uint32_t request_id, |
| 1061 bool /* success */) { | 1062 bool /* success */) { |
| 1062 DCHECK_EQ(request_id, deauthorize_flash_content_licenses_request_id_); | 1063 DCHECK_EQ(request_id, deauthorize_flash_content_licenses_request_id_); |
| 1063 clear_flash_content_licenses_.GetCompletionCallback().Run(); | 1064 clear_flash_content_licenses_.GetCompletionCallback().Run(); |
| 1064 } | 1065 } |
| 1065 #endif | 1066 #endif |
| OLD | NEW |