# Remove unused Safe Browsing and Sign-in fields from Preferences file # TODO: This patch should probably be split up and merged into # disable-signin.patch and fix-building-without-safebrowsing.patch --- a/chrome/browser/ash/login/signin/device_id_browsertest.cc +++ b/chrome/browser/ash/login/signin/device_id_browsertest.cc @@ -32,7 +32,6 @@ #include "chrome/test/base/in_process_browser_test.h" #include "chromeos/dbus/constants/dbus_paths.h" #include "components/prefs/pref_service.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/user_manager/known_user.h" #include "components/user_manager/user_manager.h" #include "content/public/test/browser_test.h" @@ -302,15 +301,6 @@ IN_PROC_BROWSER_TEST_F(DeviceIDTest, PRE SignInOnline(FakeGaiaMixin::kFakeUserEmail, FakeGaiaMixin::kFakeUserPassword, kRefreshToken1, FakeGaiaMixin::kFakeUserGaiaId); - // Simulate user that has device ID saved only in preferences (pre-M44). - PrefService* prefs = - ProfileHelper::Get() - ->GetProfileByUser(user_manager::UserManager::Get()->GetActiveUser()) - ->GetPrefs(); - prefs->SetString( - prefs::kGoogleServicesSigninScopedDeviceId, - GetDeviceId(AccountId::FromUserEmail(FakeGaiaMixin::kFakeUserEmail))); - // Can't use SetKnownUserDeviceId here, because it forbids changing a device // ID. user_manager::KnownUser known_user(g_browser_process->local_state()); @@ -339,13 +329,6 @@ IN_PROC_BROWSER_TEST_F(DeviceIDTest, PRE SignInOnline(FakeGaiaMixin::kFakeUserEmail, FakeGaiaMixin::kFakeUserPassword, kRefreshToken1, FakeGaiaMixin::kFakeUserGaiaId); - PrefService* prefs = - ProfileHelper::Get() - ->GetProfileByUser(user_manager::UserManager::Get()->GetActiveUser()) - ->GetPrefs(); - EXPECT_TRUE( - prefs->GetString(prefs::kGoogleServicesSigninScopedDeviceId).empty()); - // Can't use SetKnownUserDeviceId here, because it forbids changing a device // ID. user_manager::KnownUser known_user(g_browser_process->local_state()); --- a/chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager.cc +++ b/chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager.cc @@ -33,7 +33,6 @@ #include "components/keep_alive_registry/keep_alive_types.h" #include "components/keep_alive_registry/scoped_keep_alive.h" #include "components/prefs/pref_service.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/sync/service/sync_service.h" #include "components/sync/service/sync_user_settings.h" #include "content/public/browser/browser_context.h" @@ -440,40 +439,5 @@ bool ChromeBrowsingDataLifetimeManager:: return sync_disabled; } -#if !BUILDFLAG(IS_CHROMEOS) - // Allow clearing data if browser signin is disabled. - if (!profile_->GetPrefs()->GetBoolean(prefs::kSigninAllowed)) { - return true; - } - // If signin will be disabled on next startup, delay the browsing data - // clearing until then. - if (!profile_->GetPrefs()->GetBoolean(prefs::kSigninAllowedOnNextStartup)) { - profile_->GetPrefs()->SetBoolean( - browsing_data::prefs::kClearBrowsingDataOnExitDeletionPending, true); - return false; - } -#endif - - // Check that sync types have been disabled if neither sync nor browser sign - // in is disabled. - syncer::SyncService* sync_service = - SyncServiceFactory::GetForProfile(profile_); - - // If the sync service is not available, data can be safely cleared as it is - // not synced. - if (!sync_service) { - return true; - } - - for (syncer::UserSelectableType type : sync_types) { - if (!sync_service->GetUserSettings()->IsTypeManagedByPolicy(type)) { - return false; - } else if (sync_service->GetActiveDataTypes().HasAny( - syncer::UserSelectableTypeToAllDataTypes(type))) { - // If the sync type is disabled by policy, but the sync service has not - // deactivated the type yet, then data can not be safely cleared yet. - return false; - } - } return true; } --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -288,7 +288,6 @@ #include "components/safe_browsing/core/browser/url_checker_delegate.h" #include "components/safe_browsing/core/common/features.h" #include "components/safe_browsing/core/common/hashprefix_realtime/hash_realtime_utils.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/search_engines/template_url_service.h" #include "components/security_state/core/security_state.h" #include "components/services/on_device_translation/buildflags/buildflags.h" --- a/chrome/browser/content_settings/generated_javascript_optimizer_pref.cc +++ b/chrome/browser/content_settings/generated_javascript_optimizer_pref.cc @@ -13,7 +13,6 @@ #include "chrome/common/extensions/api/settings_private.h" #include "components/content_settings/core/common/features.h" #include "components/prefs/pref_service.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" using extensions::api::settings_private::Enforcement; using extensions::api::settings_private::PrefObject; --- a/chrome/browser/download/download_browsertest.cc +++ b/chrome/browser/download/download_browsertest.cc @@ -104,7 +104,6 @@ #include "components/safe_browsing/content/common/file_type_policies_test_util.h" #include "components/safe_browsing/content/common/proto/download_file_types.pb.h" #include "components/safe_browsing/core/common/proto/csd.pb.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/security_state/core/security_state.h" #include "components/services/quarantine/test_support.h" #include "content/public/browser/browser_task_traits.h" --- a/chrome/browser/download/download_ui_model.cc +++ b/chrome/browser/download/download_ui_model.cc @@ -33,7 +33,6 @@ #include "components/enterprise/common/proto/connectors.pb.h" #include "components/google/core/common/google_util.h" #include "components/safe_browsing/buildflags.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/safe_browsing/core/common/safebrowsing_referral_methods.h" #include "components/strings/grit/components_strings.h" #include "components/vector_icons/vector_icons.h" --- a/chrome/browser/download/download_ui_safe_browsing_util.cc +++ b/chrome/browser/download/download_ui_safe_browsing_util.cc @@ -11,7 +11,6 @@ #include "components/prefs/pref_service.h" #include "components/safe_browsing/buildflags.h" #include "components/safe_browsing/core/common/features.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #if BUILDFLAG(SAFE_BROWSING_DOWNLOAD_PROTECTION) #include "chrome/browser/browser_process.h" --- a/chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc +++ b/chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc @@ -56,7 +56,6 @@ #include "components/safe_browsing/content/browser/web_ui/safe_browsing_ui.h" #include "components/safe_browsing/core/browser/realtime/url_lookup_service_base.h" #include "components/safe_browsing/core/common/features.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/sessions/content/session_tab_helper.h" #include "components/url_matcher/url_matcher.h" #include "content/public/browser/web_contents.h" --- a/chrome/browser/enterprise/connectors/connectors_service.cc +++ b/chrome/browser/enterprise/connectors/connectors_service.cc @@ -330,8 +330,7 @@ std::string ConnectorsService::GetManage std::optional scope = std::nullopt; for (const char* scope_pref : - {enterprise_connectors::kEnterpriseRealTimeUrlCheckScope, - AnalysisConnectorScopePref(AnalysisConnector::FILE_ATTACHED), + {AnalysisConnectorScopePref(AnalysisConnector::FILE_ATTACHED), AnalysisConnectorScopePref(AnalysisConnector::FILE_DOWNLOADED), AnalysisConnectorScopePref(AnalysisConnector::BULK_DATA_ENTRY), AnalysisConnectorScopePref(AnalysisConnector::PRINT), --- a/chrome/browser/enterprise/connectors/connectors_service.h +++ b/chrome/browser/enterprise/connectors/connectors_service.h @@ -17,7 +17,6 @@ #include "components/enterprise/connectors/core/connectors_service_base.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" #include "components/keyed_service/core/keyed_service.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "content/public/browser/browser_context.h" namespace base { --- a/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc +++ b/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc @@ -26,7 +26,6 @@ #include "chrome/common/chrome_switches.h" #include "components/account_id/account_id.h" #include "components/prefs/pref_service.h" -#include "components/signin/public/base/signin_pref_names.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/navigation_handle.h" #include "content/public/browser/navigation_throttle.h" @@ -319,12 +318,6 @@ void ProfileManagementNavigationThrottle std::optional management_domain = GetDomainFromAttributeValue(domain); if (management_domain) { - auto* prefs = - Profile::FromBrowserContext( - navigation_handle()->GetWebContents()->GetBrowserContext()) - ->GetPrefs(); - prefs->SetString(prefs::kSigninInterceptionIDPCookiesUrl, - navigation_handle()->GetURL().spec()); PostNavigateTo(GURL(base::StringPrintf(kGoogleServiceLoginUrl, management_domain.value().c_str()))); return; @@ -346,11 +339,6 @@ void ProfileManagementNavigationThrottle PostNavigateTo(GURL(token_url_for_testing_)); return; } - auto* prefs = Profile::FromBrowserContext( - navigation_handle()->GetWebContents()->GetBrowserContext()) - ->GetPrefs(); - prefs->SetString(prefs::kSigninInterceptionIDPCookiesUrl, - navigation_handle()->GetURL().spec()); auto* interceptor = ProfileTokenWebSigninInterceptorFactory::GetForProfile( Profile::FromBrowserContext( --- a/chrome/browser/enterprise/signals/context_info_fetcher.cc +++ b/chrome/browser/enterprise/signals/context_info_fetcher.cc @@ -125,12 +125,6 @@ void ContextInfoFetcher::Fetch(ContextIn ChromePolicyBlocklistServiceFactory::GetForProfile( Profile::FromBrowserContext(browser_context_))); - Profile* profile = Profile::FromBrowserContext(browser_context_); - info.safe_browsing_protection_level = - device_signals::GetSafeBrowsingProtectionLevel(profile->GetPrefs()); - info.password_protection_warning_trigger = - device_signals::GetPasswordProtectionWarningTrigger(profile->GetPrefs()); - info.enterprise_profile_id = GetEnterpriseProfileId(profile); #if BUILDFLAG(IS_WIN) base::ThreadPool::CreateCOMSTATaskRunner({base::MayBlock()}) --- a/chrome/browser/enterprise/signals/context_info_fetcher.h +++ b/chrome/browser/enterprise/signals/context_info_fetcher.h @@ -15,7 +15,6 @@ #include "components/device_signals/core/common/common_types.h" #include "components/enterprise/buildflags/buildflags.h" #include "components/enterprise/connectors/core/common.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" namespace content { class BrowserContext; @@ -43,11 +42,8 @@ struct ContextInfo { std::vector on_print_providers; std::vector on_security_event_providers; std::string browser_version; - safe_browsing::SafeBrowsingState safe_browsing_protection_level; bool site_isolation_enabled; bool built_in_dns_client_enabled; - std::optional - password_protection_warning_trigger; bool chrome_remote_desktop_app_blocked; device_signals::SettingValue os_firewall; std::vector system_dns_servers; --- a/chrome/browser/enterprise/signin/managed_profile_creation_controller.cc +++ b/chrome/browser/enterprise/signin/managed_profile_creation_controller.cc @@ -32,7 +32,6 @@ #include "components/policy/core/browser/signin/user_cloud_signin_restriction_policy_fetcher.h" #include "components/policy/core/common/policy_utils.h" #include "components/prefs/pref_service.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/identity_manager/accounts_mutator.h" #include "components/signin/public/identity_manager/identity_manager.h" @@ -139,55 +138,6 @@ void ManagedProfileCreationController::O } void ManagedProfileCreationController::FetchProfileSeparationPolicies() { - // We should not fetch the policies twice. - CHECK(!policies_received_); - CHECK(!account_level_signin_restriction_policy_fetcher_); - - auto policy_fetch_callback = base::BindOnce( - &ManagedProfileCreationController::OnProfileSeparationPoliciesReceived, - weak_ptr_factory_.GetWeakPtr()); - - if (profile_separation_policies_for_testing_.has_value()) { - CHECK_IS_TEST(); - policy::ProfileSeparationPolicies profile_separation_policies = - std::exchange(profile_separation_policies_for_testing_, std::nullopt) - .value(); - std::move(policy_fetch_callback) - .Run(std::move(profile_separation_policies)); - return; - } - - // If we cannot make network calls, we will not be able to fetch the - // account level policies. - if (!g_browser_process->system_network_context_manager()) { - std::move(policy_fetch_callback).Run(policy::ProfileSeparationPolicies()); - return; - } - - CHECK(source_profile_); - account_level_signin_restriction_policy_fetcher_ = - std::make_unique( - g_browser_process->browser_policy_connector(), - g_browser_process->system_network_context_manager() - ->GetSharedURLLoaderFactory()); - account_level_signin_restriction_policy_fetcher_ - ->GetManagedAccountsSigninRestriction( - GetIdentityManager(), account_info_.account_id, - std::move(policy_fetch_callback), - policy::utils::IsPolicyTestingEnabled(source_profile_->GetPrefs(), - chrome::GetChannel()) - ? source_profile_->GetPrefs() - ->GetDefaultPrefValue( - prefs::kUserCloudSigninPolicyResponseFromPolicyTestPage) - ->GetString() - : std::string()); - - policy_fetch_timeout_.Start( - FROM_HERE, base::Seconds(5), - base::BindOnce(&ManagedProfileCreationController:: - OnProfileSeparationPoliciesReceived, - weak_ptr_factory_.GetWeakPtr(), - policy::ProfileSeparationPolicies())); } void ManagedProfileCreationController::OnProfileSeparationPoliciesReceived( @@ -211,7 +161,6 @@ void ManagedProfileCreationController::O account_level_signin_restriction_policy_fetcher_.reset(); // If the user is not allowed to sign in, we should not show the disclaimer. - if (!source_profile_->GetPrefs()->GetBoolean(prefs::kSigninAllowed)) { // If the profile creation is required by policy, we should sign the user // out since they cannot sign in to Chrome. if (profile_creation_required_by_policy_) { @@ -220,9 +169,6 @@ void ManagedProfileCreationController::O std::move(callback_).Run(base::ok(nullptr), profile_creation_required_by_policy_); } - return; - } - ShowManagementDisclaimer(); } void ManagedProfileCreationController::ShowManagementDisclaimer() { --- a/chrome/browser/enterprise/signin/oidc_authentication_signin_interceptor.cc +++ b/chrome/browser/enterprise/signin/oidc_authentication_signin_interceptor.cc @@ -49,7 +49,6 @@ #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" #include "components/policy/core/common/policy_logger.h" #include "components/prefs/pref_service.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/identity_manager/primary_account_mutator.h" #include "content/public/browser/storage_partition.h" #include "content/public/browser/web_contents.h" @@ -438,8 +437,7 @@ void OidcAuthenticationSigninInterceptor // TODO(b/355270189): The interaction between OIDC profiles and BrowserSignin // policy should be finalized, this check only prevents Chrome from crashing. - if (dasher_based_ && - !profile_->GetPrefs()->GetBoolean(prefs::kSigninAllowedOnNextStartup)) { + if (dasher_based_) { LOG_POLICY(ERROR, OIDC_ENROLLMENT) << "Google-synced OIDC profile can't be created because browser sign" "in is disabled."; --- a/chrome/browser/enterprise/signin/oidc_managed_profile_creation_delegate.cc +++ b/chrome/browser/enterprise/signin/oidc_managed_profile_creation_delegate.cc @@ -9,7 +9,6 @@ #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #include "chrome/browser/profiles/profile_attributes_storage.h" #include "components/prefs/pref_service.h" -#include "components/signin/public/base/signin_pref_names.h" OidcManagedProfileCreationDelegate::OidcManagedProfileCreationDelegate() = default; @@ -55,8 +54,6 @@ void OidcManagedProfileCreationDelegate: void OidcManagedProfileCreationDelegate::CheckManagedProfileStatus( Profile* new_profile) { - CHECK_EQ(new_profile->GetPrefs()->GetBoolean(prefs::kSigninAllowed), - dasher_based_); } void OidcManagedProfileCreationDelegate::OnManagedProfileInitialized( --- a/chrome/browser/enterprise/signin/profile_management_disclaimer_service.cc +++ b/chrome/browser/enterprise/signin/profile_management_disclaimer_service.cc @@ -39,7 +39,6 @@ #include "components/policy/core/browser/signin/user_cloud_signin_restriction_policy_fetcher.h" #include "components/policy/core/common/policy_utils.h" #include "components/prefs/pref_service.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/base/signin_prefs.h" #include "components/signin/public/base/signin_switches.h" #include "components/signin/public/identity_manager/account_info.h" --- a/chrome/browser/enterprise/signin/token_managed_profile_creation_delegate.cc +++ b/chrome/browser/enterprise/signin/token_managed_profile_creation_delegate.cc @@ -7,7 +7,6 @@ #include "chrome/browser/profiles/profile_attributes_storage.h" #include "chrome/browser/signin/signin_util.h" #include "components/prefs/pref_service.h" -#include "components/signin/public/base/signin_pref_names.h" TokenManagedProfileCreationDelegate::TokenManagedProfileCreationDelegate() = default; @@ -29,7 +28,6 @@ void TokenManagedProfileCreationDelegate void TokenManagedProfileCreationDelegate::CheckManagedProfileStatus( Profile* new_profile) { - DCHECK(!new_profile->GetPrefs()->GetBoolean(prefs::kSigninAllowed)); } void TokenManagedProfileCreationDelegate::OnManagedProfileInitialized( --- a/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc +++ b/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc @@ -105,44 +105,10 @@ api::enterprise_reporting_private::Conte info.built_in_dns_client_enabled = signals.built_in_dns_client_enabled; info.enterprise_profile_id = signals.enterprise_profile_id; - switch (signals.safe_browsing_protection_level) { - case safe_browsing::SafeBrowsingState::NO_SAFE_BROWSING: info.safe_browsing_protection_level = extensions::api:: enterprise_reporting_private::SafeBrowsingLevel::kDisabled; - break; - case safe_browsing::SafeBrowsingState::STANDARD_PROTECTION: - info.safe_browsing_protection_level = extensions::api:: - enterprise_reporting_private::SafeBrowsingLevel::kStandard; - break; - case safe_browsing::SafeBrowsingState::ENHANCED_PROTECTION: - info.safe_browsing_protection_level = extensions::api:: - enterprise_reporting_private::SafeBrowsingLevel::kEnhanced; - break; - } - if (!signals.password_protection_warning_trigger.has_value()) { info.password_protection_warning_trigger = extensions::api:: enterprise_reporting_private::PasswordProtectionTrigger::kPolicyUnset; - } else { - switch (signals.password_protection_warning_trigger.value()) { - case safe_browsing::PASSWORD_PROTECTION_OFF: - info.password_protection_warning_trigger = - extensions::api::enterprise_reporting_private:: - PasswordProtectionTrigger::kPasswordProtectionOff; - break; - case safe_browsing::PASSWORD_REUSE: - info.password_protection_warning_trigger = - extensions::api::enterprise_reporting_private:: - PasswordProtectionTrigger::kPasswordReuse; - break; - case safe_browsing::PHISHING_REUSE: - info.password_protection_warning_trigger = - extensions::api::enterprise_reporting_private:: - PasswordProtectionTrigger::kPhishingReuse; - break; - case safe_browsing::PASSWORD_PROTECTION_TRIGGER_MAX: - NOTREACHED(); - } - } return info; } --- a/chrome/browser/extensions/api/identity/identity_apitest.cc +++ b/chrome/browser/extensions/api/identity/identity_apitest.cc @@ -67,7 +67,6 @@ #include "components/signin/public/base/consent_level.h" #include "components/signin/public/base/list_accounts_test_utils.h" #include "components/signin/public/base/signin_metrics.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/base/signin_switches.h" #include "components/signin/public/identity_manager/accounts_mutator.h" #include "components/signin/public/identity_manager/identity_manager.h" --- a/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc +++ b/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc @@ -30,7 +30,6 @@ #include "chrome/common/extensions/api/identity.h" #include "components/prefs/pref_service.h" #include "components/signin/public/base/consent_level.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/base/signin_switches.h" #include "components/signin/public/identity_manager/access_token_info.h" #include "components/signin/public/identity_manager/account_info.h" @@ -71,7 +70,7 @@ namespace extensions { namespace { bool IsBrowserSigninAllowed(Profile* profile) { - return profile->GetPrefs()->GetBoolean(prefs::kSigninAllowed); + return false; } std::string_view GetOAuth2MintTokenFlowVersion() { --- a/chrome/browser/extensions/api/preference/preference_api.cc +++ b/chrome/browser/extensions/api/preference/preference_api.cc @@ -25,7 +25,6 @@ #include "components/content_settings/core/common/pref_names.h" #include "components/prefs/pref_service.h" #include "components/privacy_sandbox/privacy_sandbox_features.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "extensions/browser/api/content_settings/content_settings_service.h" #include "extensions/browser/extension_function_registry.h" #include "extensions/browser/extension_pref_value_map.h" @@ -447,17 +446,6 @@ ExtensionFunction::ResponseAction SetPre base::Value(browser_pref_value->GetBool())); } - // Whenever an extension takes control of the |kSafeBrowsingEnabled| - // preference, it must also set |kSafeBrowsingEnhanced| to false. - // See crbug.com/1064722 for more background. - // - // TODO(crbug.com/40681445): Consider extending - // chrome.privacy.services.safeBrowsingEnabled to a three-state enum. - if (prefs::kSafeBrowsingEnabled == browser_pref) { - prefs_helper->SetExtensionControlledPref(extension_id(), - prefs::kSafeBrowsingEnhanced, - scope, base::Value(false)); - } prefs_helper->SetExtensionControlledPref(extension_id(), browser_pref, scope, browser_pref_value->Clone()); @@ -507,16 +495,6 @@ ExtensionFunction::ResponseAction ClearP prefs_helper->RemoveExtensionControlledPref(extension_id(), browser_pref, scope); - // Whenever an extension clears the |kSafeBrowsingEnabled| preference, - // it must also clear |kSafeBrowsingEnhanced|. See crbug.com/1064722 for - // more background. - // - // TODO(crbug.com/40681445): Consider extending - // chrome.privacy.services.safeBrowsingEnabled to a three-state enum. - if (prefs::kSafeBrowsingEnabled == browser_pref) { - prefs_helper->RemoveExtensionControlledPref( - extension_id(), prefs::kSafeBrowsingEnhanced, scope); - } return RespondNow(NoArguments()); } --- a/chrome/browser/extensions/api/preference/preference_apitest.cc +++ b/chrome/browser/extensions/api/preference/preference_apitest.cc @@ -31,7 +31,6 @@ #include "components/prefs/pref_service.h" #include "components/privacy_sandbox/privacy_sandbox_features.h" #include "components/privacy_sandbox/privacy_sandbox_prefs.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/translate/core/browser/translate_pref_names.h" #include "content/public/test/browser_test.h" #include "content/public/test/test_devtools_protocol_client.h" @@ -91,7 +90,6 @@ class ExtensionPreferenceApiTest prefs->GetInteger(prefetch::prefs::kNetworkPredictionOptions)); EXPECT_TRUE( prefs->GetBoolean(password_manager::prefs::kCredentialsEnableService)); - EXPECT_TRUE(prefs->GetBoolean(prefs::kSafeBrowsingEnabled)); EXPECT_TRUE(prefs->GetBoolean(prefs::kSearchSuggestEnabled)); VerifyPrefValueAndControlledState(prefs::kPrivacySandboxM1TopicsEnabled, base::Value(false), @@ -129,7 +127,6 @@ class ExtensionPreferenceApiTest prefs->GetInteger(prefetch::prefs::kNetworkPredictionOptions)); EXPECT_FALSE( prefs->GetBoolean(password_manager::prefs::kCredentialsEnableService)); - EXPECT_FALSE(prefs->GetBoolean(prefs::kSafeBrowsingEnabled)); EXPECT_FALSE(prefs->GetBoolean(prefs::kSearchSuggestEnabled)); VerifyPrefValueAndControlledState(prefs::kPrivacySandboxM1TopicsEnabled, base::Value(true), @@ -225,7 +222,6 @@ IN_PROC_BROWSER_TEST_P(ExtensionPreferen prefetch::prefs::kNetworkPredictionOptions, static_cast(prefetch::NetworkPredictionOptions::kDisabled)); prefs->SetBoolean(password_manager::prefs::kCredentialsEnableService, false); - prefs->SetBoolean(prefs::kSafeBrowsingEnabled, false); prefs->SetBoolean(prefs::kSearchSuggestEnabled, false); prefs->SetString(prefs::kWebRTCIPHandlingPolicy, blink::kWebRTCIPHandlingDefaultPublicInterfaceOnly); --- a/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc +++ b/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc @@ -18,7 +18,6 @@ #include "chrome/common/extensions/api/safe_browsing_private.h" #include "components/enterprise/connectors/core/common.h" #include "components/prefs/pref_service.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/url_matcher/url_matcher.h" #include "components/url_matcher/url_util.h" #include "content/public/browser/browser_context.h" --- a/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router_unittest.cc +++ b/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router_unittest.cc @@ -23,7 +23,6 @@ #include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_profile.h" #include "chrome/test/base/testing_profile_manager.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/signin/public/identity_manager/identity_test_environment.h" #include "content/public/test/browser_task_environment.h" #include "extensions/browser/test_event_router.h" --- a/chrome/browser/extensions/api/settings_private/prefs_util.cc +++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc @@ -60,10 +60,8 @@ #include "components/privacy_sandbox/privacy_sandbox_prefs.h" #include "components/privacy_sandbox/tracking_protection_prefs.h" #include "components/proxy_config/proxy_config_pref_names.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/saved_tab_groups/public/pref_names.h" #include "components/search_engines/default_search_manager.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/spellcheck/browser/pref_names.h" #include "components/supervised_user/core/common/pref_names.h" #include "components/themes/pref_names.h" @@ -347,8 +345,6 @@ const PrefsUtil::TypedPrefMap& PrefsUtil settings_api::PrefType::kNumber; // Privacy page - (*s_allowlist)[::prefs::kSigninAllowedOnNextStartup] = - settings_api::PrefType::kBoolean; (*s_allowlist)[::prefs::kDnsOverHttpsMode] = settings_api::PrefType::kString; (*s_allowlist)[::prefs::kDnsOverHttpsTemplates] = settings_api::PrefType::kString; @@ -371,16 +367,6 @@ const PrefsUtil::TypedPrefMap& PrefsUtil settings_api::PrefType::kBoolean; // Security page - (*s_allowlist)[::kGeneratedPasswordLeakDetectionPref] = - settings_api::PrefType::kBoolean; - (*s_allowlist)[::prefs::kSafeBrowsingEnabled] = - settings_api::PrefType::kBoolean; - (*s_allowlist)[::prefs::kSafeBrowsingEnhanced] = - settings_api::PrefType::kBoolean; - (*s_allowlist)[::prefs::kSafeBrowsingScoutReportingEnabled] = - settings_api::PrefType::kBoolean; - (*s_allowlist)[::safe_browsing::kGeneratedSafeBrowsingPref] = - settings_api::PrefType::kNumber; (*s_allowlist)[::prefs::kHttpsOnlyModeEnabled] = settings_api::PrefType::kBoolean; (*s_allowlist)[::kGeneratedHttpsFirstModePref] = --- a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc @@ -727,9 +727,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebstore IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateGetReferrerChainApiTest, GetReferrerChainForNonSafeBrowsingUser) { PrefService* pref_service = profile()->GetPrefs(); - EXPECT_TRUE(pref_service->GetBoolean(prefs::kSafeBrowsingEnabled)); - // Disable SafeBrowsing. - pref_service->SetBoolean(prefs::kSafeBrowsingEnabled, false); GURL page_url = GetTestServerURLWithReferrers("empty_referrer_chain.html"); ASSERT_TRUE(OpenTestURL(page_url)); --- a/chrome/browser/extensions/extension_allowlist.cc +++ b/chrome/browser/extensions/extension_allowlist.cc @@ -11,7 +11,6 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/safe_browsing/safe_browsing_metrics_collector_factory.h" #include "components/safe_browsing/core/browser/safe_browsing_metrics_collector.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "extensions/browser/allowlist_state.h" #include "extensions/browser/extension_registrar.h" #include "extensions/browser/extension_registry.h" @@ -77,10 +76,6 @@ ExtensionAllowlist::ExtensionAllowlist(P // Register to Enhanced Safe Browsing setting changes for allowlist // enforcements. pref_change_registrar_.Init(profile_->GetPrefs()); - pref_change_registrar_.Add( - prefs::kSafeBrowsingEnhanced, - base::BindRepeating(&ExtensionAllowlist::OnSafeBrowsingEnhancedChanged, - base::Unretained(this))); } ExtensionAllowlist::~ExtensionAllowlist() = default; @@ -250,15 +245,8 @@ void ExtensionAllowlist::OnExtensionInst } void ExtensionAllowlist::SetAllowlistEnforcementFields() { - if (safe_browsing::IsEnhancedProtectionEnabled(*profile_->GetPrefs())) { - warnings_enabled_ = base::FeatureList::IsEnabled( - extensions_features::kSafeBrowsingCrxAllowlistShowWarnings); - should_auto_disable_extensions_ = base::FeatureList::IsEnabled( - extensions_features::kSafeBrowsingCrxAllowlistAutoDisable); - } else { warnings_enabled_ = false; should_auto_disable_extensions_ = false; - } } // `ApplyEnforcement` can be called when an extension becomes not allowlisted or @@ -409,15 +397,6 @@ void ExtensionAllowlist::NotifyExtension } void ExtensionAllowlist::ReportExtensionReEnabledEvent() { - auto* metrics_collector = - safe_browsing::SafeBrowsingMetricsCollectorFactory::GetForProfile( - profile_); - DCHECK(metrics_collector); - if (metrics_collector) { - metrics_collector->AddSafeBrowsingEventToPref( - safe_browsing::SafeBrowsingMetricsCollector::EventType:: - NON_ALLOWLISTED_EXTENSION_RE_ENABLED); - } } } // namespace extensions --- a/chrome/browser/extensions/extension_service.cc +++ b/chrome/browser/extensions/extension_service.cc @@ -73,7 +73,6 @@ #include "chrome/common/url_constants.h" #include "components/crx_file/id_util.h" #include "components/policy/core/common/policy_pref_names.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/supervised_user/core/browser/supervised_user_preferences.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_process_host.h" --- a/chrome/browser/extensions/installed_loader.cc +++ b/chrome/browser/extensions/installed_loader.cc @@ -34,7 +34,6 @@ #include "chrome/common/extensions/manifest_handlers/settings_overrides_handler.h" #include "chrome/common/pref_names.h" #include "chrome/common/webui_url_constants.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "content/public/browser/browser_thread.h" #include "content/public/common/url_constants.h" #include "extensions/browser/allowlist_state.h" @@ -1002,12 +1001,6 @@ void InstalledLoader::RecordExtensionsMe enabled_not_allowlisted_count); base::UmaHistogramCounts100("Extensions.NotAllowlistedDisabled2", disabled_not_allowlisted_count); - if (safe_browsing::IsEnhancedProtectionEnabled(*profile->GetPrefs())) { - base::UmaHistogramCounts100("Extensions.NotAllowlistedEnabledAndEsbUser2", - enabled_not_allowlisted_count); - base::UmaHistogramCounts100("Extensions.NotAllowlistedDisabledAndEsbUser2", - disabled_not_allowlisted_count); - } } int InstalledLoader::GetCreationFlags(const ExtensionInfo* info) { --- a/chrome/browser/extensions/pref_mapping.cc +++ b/chrome/browser/extensions/pref_mapping.cc @@ -21,7 +21,6 @@ #include "components/privacy_sandbox/privacy_sandbox_prefs.h" #include "components/privacy_sandbox/tracking_protection_prefs.h" #include "components/proxy_config/proxy_config_pref_names.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/spellcheck/browser/pref_names.h" #include "components/translate/core/browser/translate_pref_names.h" #include "extensions/buildflags/buildflags.h" @@ -67,11 +66,6 @@ const PrefMappingEntry kMappings[] = { APIPermissionID::kPrivacy}, {"doNotTrackEnabled", prefs::kEnableDoNotTrack, APIPermissionID::kPrivacy, APIPermissionID::kPrivacy}, - {"safeBrowsingEnabled", prefs::kSafeBrowsingEnabled, - APIPermissionID::kPrivacy, APIPermissionID::kPrivacy}, - {"safeBrowsingExtendedReportingEnabled", - prefs::kSafeBrowsingScoutReportingEnabled, APIPermissionID::kPrivacy, - APIPermissionID::kPrivacy}, {"searchSuggestEnabled", prefs::kSearchSuggestEnabled, APIPermissionID::kPrivacy, APIPermissionID::kPrivacy}, {"spellingServiceEnabled", spellcheck::prefs::kSpellCheckUseSpellingService, --- a/chrome/browser/net/profile_network_context_service.cc +++ b/chrome/browser/net/profile_network_context_service.cc @@ -74,7 +74,6 @@ #include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_service.h" #include "components/privacy_sandbox/privacy_sandbox_prefs.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/first_party_sets_handler.h" @@ -1469,15 +1468,8 @@ void ProfileNetworkContextService::Confi network_context_params->enable_certificate_reporting = true; - SCTReportingService* sct_reporting_service = - SCTReportingServiceFactory::GetForBrowserContext(profile_); - if (sct_reporting_service) { - network_context_params->sct_auditing_mode = - sct_reporting_service->GetReportingMode(); - } else { network_context_params->sct_auditing_mode = network::mojom::SCTAuditingMode::kDisabled; - } network_context_params->ct_policy = GetCTPolicy(); cert_verifier_creation_params->ct_policy = GetCTPolicy(); --- a/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc @@ -45,7 +45,6 @@ #include "components/prefs/pref_service.h" #include "components/safe_browsing/buildflags.h" #include "components/safe_browsing/content/browser/notification_content_detection/notification_content_detection_constants.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/platform_notification_context.h" #include "content/public/browser/storage_partition.h" @@ -817,25 +816,7 @@ void PlatformNotificationServiceImpl::Lo bool PlatformNotificationServiceImpl:: AreSuspiciousNotificationsAllowlistedByUser(const GURL& origin) { - auto* hcsm = HostContentSettingsMapFactory::GetForProfile(profile_); - if (!hcsm || !origin.is_valid()) { return false; - } - content_settings::SettingInfo info; - base::Value stored_value(hcsm->GetWebsiteSetting( - origin, origin, - ContentSettingsType::ARE_SUSPICIOUS_NOTIFICATIONS_ALLOWLISTED_BY_USER, - &info)); - if (stored_value.is_none()) { - return false; - } - if (!stored_value.is_dict() || !stored_value.GetDict().contains( - safe_browsing::kIsAllowlistedByUserKey)) { - return false; - } - return stored_value.GetDict() - .FindBool(safe_browsing::kIsAllowlistedByUserKey) - .value_or(false); } void PlatformNotificationServiceImpl::DidUpdatePersistentMetadata( --- a/chrome/browser/password_manager/generated_password_leak_detection_pref.cc +++ b/chrome/browser/password_manager/generated_password_leak_detection_pref.cc @@ -15,7 +15,6 @@ #include "components/password_manager/core/common/password_manager_pref_names.h" #include "components/prefs/pref_service.h" #include "components/safe_browsing/core/common/features.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/signin/public/identity_manager/identity_manager.h" namespace { @@ -42,16 +41,6 @@ GeneratedPasswordLeakDetectionPref::Gene base::BindRepeating( &GeneratedPasswordLeakDetectionPref::OnSourcePreferencesChanged, base::Unretained(this))); - user_prefs_registrar_.Add( - prefs::kSafeBrowsingEnabled, - base::BindRepeating( - &GeneratedPasswordLeakDetectionPref::OnSourcePreferencesChanged, - base::Unretained(this))); - user_prefs_registrar_.Add( - prefs::kSafeBrowsingEnhanced, - base::BindRepeating( - &GeneratedPasswordLeakDetectionPref::OnSourcePreferencesChanged, - base::Unretained(this))); if (auto* identity_manager = IdentityManagerFactory::GetForProfile(profile)) { identity_manager_observer_.Observe(identity_manager); --- a/chrome/browser/permissions/permission_revocation_request.cc +++ b/chrome/browser/permissions/permission_revocation_request.cc @@ -22,7 +22,6 @@ #include "components/safe_browsing/core/browser/db/database_manager.h" #include "components/safe_browsing/core/browser/safe_browsing_metrics_collector.h" #include "components/safe_browsing/core/common/features.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #if BUILDFLAG(SAFE_BROWSING_AVAILABLE) #include "chrome/browser/safe_browsing/safe_browsing_service.h" --- a/chrome/browser/policy/browser_signin_policy_handler.cc +++ b/chrome/browser/policy/browser_signin_policy_handler.cc @@ -15,7 +15,6 @@ #include "components/policy/core/common/policy_map.h" #include "components/policy/policy_constants.h" #include "components/prefs/pref_value_map.h" -#include "components/signin/public/base/signin_pref_names.h" namespace policy { @@ -30,50 +29,6 @@ BrowserSigninPolicyHandler::~BrowserSign void BrowserSigninPolicyHandler::ApplyPolicySettings(const PolicyMap& policies, PrefValueMap* prefs) { -#if BUILDFLAG(IS_WIN) - // Browser sign in policies shouldn't be enforced on gcpw signin - // mode as gcpw is invoked in windows login UI screen. - // Also note that GCPW launches chrome in incognito mode using a - // special user's logon_token. So the end user won't have access - // to this session after user logs in via GCPW. - if (base::CommandLine::ForCurrentProcess()->HasSwitch( - ::credential_provider::kGcpwSigninSwitch)) - return; -#endif - - const base::Value* value = - policies.GetValue(policy_name(), base::Value::Type::INTEGER); - switch (static_cast(value->GetInt())) { - case BrowserSigninMode::kForced: -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) - prefs->SetValue(prefs::kForceBrowserSignin, base::Value(true)); -#endif - [[fallthrough]]; - case BrowserSigninMode::kEnabled: - prefs->SetValue( -#if BUILDFLAG(IS_ANDROID) - // The new kSigninAllowedOnNextStartup pref is only used on Desktop. - // Keep the old kSigninAllowed pref for Android until the policy is - // fully deprecated in M71 and can be removed. - prefs::kSigninAllowed, -#else - prefs::kSigninAllowedOnNextStartup, -#endif - base::Value(true)); - break; - case BrowserSigninMode::kDisabled: - prefs->SetValue( -#if BUILDFLAG(IS_ANDROID) - // The new kSigninAllowedOnNextStartup pref is only used on Desktop. - // Keep the old kSigninAllowed pref for Android until the policy is - // fully deprecated in M71 and can be removed. - prefs::kSigninAllowed, -#else - prefs::kSigninAllowedOnNextStartup, -#endif - base::Value(false)); - break; - } } } // namespace policy --- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc +++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc @@ -116,8 +116,6 @@ #include "components/proxy_config/proxy_override_rules_policy_handler.h" #include "components/proxy_config/proxy_policy_handler.h" #include "components/safe_browsing/buildflags.h" -#include "components/safe_browsing/core/common/safe_browsing_policy_handler.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/search_engines/enterprise/default_search_policy_handler.h" #include "components/search_engines/search_engines_pref_names.h" #include "components/security_interstitials/core/https_only_mode_policy_handler.h" @@ -126,7 +124,6 @@ #include "components/sharing_message/buildflags.h" #include "components/sharing_message/pref_names.h" #include "components/signin/public/base/signin_buildflags.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/spellcheck/spellcheck_buildflags.h" #include "components/sync/base/pref_names.h" #include "components/sync/service/sync_policy_handler.h" @@ -312,9 +309,6 @@ const PolicyToPreferenceMapEntry kSimple { key::kForcePermissionPolicyUnloadDefaultEnabled, policy_prefs::kForcePermissionPolicyUnloadDefaultEnabled, base::Value::Type::BOOLEAN}, - { key::kDisableSafeBrowsingProceedAnyway, - prefs::kSafeBrowsingProceedAnywayDisabled, - base::Value::Type::BOOLEAN }, { key::kDomainReliabilityAllowed, domain_reliability::prefs::kDomainReliabilityAllowedByPolicy, base::Value::Type::BOOLEAN }, @@ -357,15 +351,6 @@ const PolicyToPreferenceMapEntry kSimple prefs::kOopPrintDriversAllowedByPolicy, base::Value::Type::BOOLEAN }, #endif - { key::kSafeBrowsingAllowlistDomains, - prefs::kSafeBrowsingAllowlistDomains, - base::Value::Type::LIST }, - { key::kSafeBrowsingEnabled, - prefs::kSafeBrowsingEnabled, - base::Value::Type::BOOLEAN }, - { key::kSafeBrowsingProxiedRealTimeChecksAllowed, - prefs::kHashPrefixRealTimeChecksAllowedByPolicy, - base::Value::Type::BOOLEAN }, { key::kSavingBrowserHistoryDisabled, prefs::kSavingBrowserHistoryDisabled, base::Value::Type::BOOLEAN }, @@ -528,9 +513,6 @@ const PolicyToPreferenceMapEntry kSimple { key::kAdsSettingForIntrusiveAdsSites, prefs::kManagedDefaultAdsSetting, base::Value::Type::INTEGER }, - { key::kAdvancedProtectionAllowed, - prefs::kAdvancedProtectionAllowed, - base::Value::Type::BOOLEAN }, { key::kAllowCrossOriginAuthPrompt, prefs::kAllowCrossOriginAuthPrompt, base::Value::Type::BOOLEAN }, @@ -749,15 +731,6 @@ const PolicyToPreferenceMapEntry kSimple { key::kPasswordDismissCompromisedAlertEnabled, password_manager::prefs::kPasswordDismissCompromisedAlertEnabled, base::Value::Type::BOOLEAN }, - { key::kPasswordProtectionChangePasswordURL, - prefs::kPasswordProtectionChangePasswordURL, - base::Value::Type::STRING }, - { key::kPasswordProtectionLoginURLs, - prefs::kPasswordProtectionLoginURLs, - base::Value::Type::LIST }, - { key::kPasswordProtectionWarningTrigger, - prefs::kPasswordProtectionWarningTrigger, - base::Value::Type::INTEGER }, #if BUILDFLAG(ENABLE_PDF) { key::kPdfLocalFileAccessAllowedForDomains, prefs::kPdfLocalFileAccessAllowedForDomains, @@ -911,9 +884,6 @@ const PolicyToPreferenceMapEntry kSimple { key::kAdditionalDnsQueryTypesEnabled, prefs::kAdditionalDnsQueryTypesEnabled, base::Value::Type::BOOLEAN }, - { key::kSafeBrowsingExtendedReportingEnabled, - prefs::kSafeBrowsingScoutReportingEnabled, - base::Value::Type::BOOLEAN }, { key::kForceGoogleSafeSearch, policy_prefs::kForceGoogleSafeSearch, base::Value::Type::BOOLEAN }, @@ -977,9 +947,6 @@ const PolicyToPreferenceMapEntry kSimple { key::kRequireOnlineRevocationChecksForLocalAnchors, prefs::kCertRevocationCheckingRequiredLocalAnchors, base::Value::Type::BOOLEAN }, - { key::kSafeBrowsingSurveysEnabled, - prefs::kSafeBrowsingSurveysEnabled, - base::Value::Type::BOOLEAN }, { key::kPasswordManagerBlocklist, policy_prefs::kPasswordManagerBlocklist, base::Value::Type::LIST }, @@ -1955,9 +1922,6 @@ const PolicyToPreferenceMapEntry kSimple { key::kUnmanagedDeviceSignalsConsentFlowEnabled, device_signals::prefs::kUnmanagedDeviceSignalsConsentFlowEnabled, base::Value::Type::BOOLEAN }, - { key::kProfileSeparationDomainExceptionList, - prefs::kProfileSeparationDomainExceptionList, - base::Value::Type::LIST }, { key::kLiveCaptionEnabled, prefs::kLiveCaptionEnabled, base::Value::Type::BOOLEAN }, @@ -2031,9 +1995,6 @@ const PolicyToPreferenceMapEntry kSimple prefs::kImportDialogAutofillFormData, base::Value::Type::BOOLEAN }, - { key::kRestrictSigninToPattern, - prefs::kGoogleServicesUsernamePattern, - base::Value::Type::STRING }, { key::kHardwareAccelerationModeEnabled, prefs::kHardwareAccelerationModeEnabled, base::Value::Type::BOOLEAN }, @@ -2315,9 +2276,6 @@ const PolicyToPreferenceMapEntry kSimple { key::kGoogleSearchSidePanelEnabled, prefs::kGoogleSearchSidePanelEnabled, base::Value::Type::BOOLEAN }, - { key::kSafeBrowsingDeepScanningEnabled, - prefs::kSafeBrowsingDeepScanningEnabled, - base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_ANDROID) { key::kAllowBackForwardCacheForCacheControlNoStorePageEnabled, policy_prefs::kAllowBackForwardCacheForCacheControlNoStorePageEnabled, @@ -2874,29 +2832,6 @@ std::unique_ptrAddHandler( - std::make_unique( - std::make_unique( - chrome_schema), - std::vector{ - key::kProfileSeparationSettings, - key::kProfileSeparationDataMigrationSettings, - key::kProfileSeparationDomainExceptionList})); - handlers->AddHandler(std::make_unique( - std::make_unique(key::kProfileSeparationSettings, - prefs::kProfileSeparationSettings, - base::Value::Type::INTEGER))); - - - handlers->AddHandler(std::make_unique( - std::make_unique( - key::kEnterpriseProfileCreationKeepBrowsingData, - prefs::kEnterpriseProfileCreationKeepBrowsingData, - base::Value::Type::BOOLEAN), - std::make_unique( - key::kProfileSeparationDataMigrationSettings, - prefs::kProfileSeparationDataMigrationSettings, - base::Value::Type::INTEGER))); handlers->AddHandler(std::make_unique( key::kProfileReauthPrompt, enterprise_signin::prefs::kProfileReauthPrompt, static_cast(enterprise_signin::ProfileReauthPrompt::kDoNotPrompt), @@ -2957,11 +2892,6 @@ std::unique_ptr> signin_legacy_policies; -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_LINUX) - signin_legacy_policies.push_back(std::make_unique( - key::kForceBrowserSignin, prefs::kForceBrowserSignin, - base::Value::Type::BOOLEAN)); handlers->AddHandler(std::make_unique( std::make_unique( @@ -2974,19 +2904,6 @@ std::unique_ptr( - key::kSigninAllowed, -#if BUILDFLAG(IS_ANDROID) - // The new kSigninAllowedOnNextStartup pref is only used on Desktop. - // Keep the old kSigninAllowed pref for Android until the policy is - // fully deprecated in M71 and can be removed. - prefs::kSigninAllowed, -#else // BUILDFLAG(IS_ANDROID) - prefs::kSigninAllowedOnNextStartup, -#endif // BUILDFLAG(IS_ANDROID) - base::Value::Type::BOOLEAN)); handlers->AddHandler(std::make_unique( std::move(signin_legacy_policies), std::make_unique(chrome_schema))); --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc @@ -167,7 +167,6 @@ #include "components/proxy_config/pref_proxy_config_tracker_impl.h" #include "components/regional_capabilities/regional_capabilities_prefs.h" #include "components/safe_browsing/buildflags.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/safety_check/safety_check_prefs.h" #include "components/saved_tab_groups/public/pref_names.h" #include "components/search_engines/search_engine_choice/search_engine_choice_service.h" @@ -180,7 +179,6 @@ #include "components/sessions/core/session_id_generator.h" #include "components/sharing_message/sharing_sync_preference.h" #include "components/signin/core/browser/active_primary_accounts_metrics_recorder.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/base/signin_prefs.h" #include "components/signin/public/identity_manager/identity_manager.h" #include "components/site_engagement/content/site_engagement_service.h" @@ -1593,7 +1591,6 @@ void RegisterLocalState(PrefRegistrySimp PushMessagingServiceImpl::RegisterPrefs(registry); #endif RegisterScreenshotPrefs(registry); - safe_browsing::RegisterLocalStatePrefs(registry); search_engines::SearchEngineChoiceService::RegisterLocalStatePrefs(registry); secure_origin_allowlist::RegisterPrefs(registry); segmentation_platform::SegmentationPlatformService::RegisterLocalStatePrefs( @@ -1930,7 +1927,6 @@ void RegisterProfilePrefs(user_prefs::Pr #if BUILDFLAG(SAFE_BROWSING_AVAILABLE) safe_browsing::file_type::RegisterProfilePrefs(registry); #endif - safe_browsing::RegisterProfilePrefs(registry); safety_check::prefs::RegisterProfilePrefs(registry); SearchPrefetchService::RegisterProfilePrefs(registry); blocked_content::SafeBrowsingTriggeredPopupBlocker::RegisterProfilePrefs( --- a/chrome/browser/prefs/chrome_command_line_pref_store.cc +++ b/chrome/browser/prefs/chrome_command_line_pref_store.cc @@ -24,7 +24,6 @@ #include "components/language/core/browser/pref_names.h" #include "components/proxy_config/proxy_config_dictionary.h" #include "components/proxy_config/proxy_config_pref_names.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/safe_browsing/core/common/safebrowsing_switches.h" #include "components/sync/base/pref_names.h" #include "content/public/common/content_switches.h" @@ -84,8 +83,6 @@ const CommandLinePrefStore::BooleanSwitc {switches::kAllowCrossOriginAuthPrompt, prefs::kAllowCrossOriginAuthPrompt, true}, {switches::kDisablePrintPreview, prefs::kPrintPreviewDisabled, true}, - {safe_browsing::switches::kSbEnableEnhancedProtection, - prefs::kSafeBrowsingEnhanced, true}, #if BUILDFLAG(IS_CHROMEOS) {ash::switches::kEnableTouchpadThreeFingerClick, ash::prefs::kEnableTouchpadThreeFingerClick, true}, --- a/chrome/browser/prefs/chrome_pref_service_factory.cc +++ b/chrome/browser/prefs/chrome_pref_service_factory.cc @@ -56,10 +56,8 @@ #include "components/prefs/pref_store.h" #include "components/prefs/pref_value_store.h" #include "components/prefs/wrap_with_prefix_pref_store.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/search_engines/default_search_manager.h" #include "components/search_engines/search_engines_pref_names.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/base/signin_switches.h" #include "components/supervised_user/core/browser/supervised_user_content_filters_service.h" #include "components/supervised_user/core/browser/supervised_user_pref_store.h" @@ -131,9 +129,6 @@ const auto kTrackedPrefs = std::to_array {5, extensions::pref_names::kExtensions, EnforcementLevel::NO_ENFORCEMENT, PrefTrackingStrategy::SPLIT, ValueType::IMPERSONAL}, #endif - {6, prefs::kGoogleServicesLastSyncingUsername, - EnforcementLevel::ENFORCE_ON_LOAD, PrefTrackingStrategy::ATOMIC, - ValueType::PERSONAL}, {7, prefs::kSearchProviderOverrides, EnforcementLevel::ENFORCE_ON_LOAD, PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL}, #if !BUILDFLAG(IS_ANDROID) @@ -157,19 +152,12 @@ const auto kTrackedPrefs = std::to_array PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL}, // kSyncRemainingRollbackTries is deprecated and will be removed a few // releases after M50. - {18, prefs::kSafeBrowsingIncidentsSent, EnforcementLevel::ENFORCE_ON_LOAD, - PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL}, - {23, prefs::kGoogleServicesAccountId, EnforcementLevel::ENFORCE_ON_LOAD, - PrefTrackingStrategy::ATOMIC, ValueType::PERSONAL}, {29, prefs::kMediaStorageIdSalt, EnforcementLevel::ENFORCE_ON_LOAD, PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL}, #if BUILDFLAG(IS_WIN) {32, prefs::kMediaCdmOriginData, EnforcementLevel::ENFORCE_ON_LOAD, PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL}, #endif // BUILDFLAG(IS_WIN) - {33, prefs::kGoogleServicesLastSignedInUsername, - EnforcementLevel::ENFORCE_ON_LOAD, PrefTrackingStrategy::ATOMIC, - ValueType::PERSONAL}, {34, enterprise_signin::prefs::kPolicyRecoveryToken, EnforcementLevel::ENFORCE_ON_LOAD, PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL}, --- a/chrome/browser/prefs/pref_functional_browsertest.cc +++ b/chrome/browser/prefs/pref_functional_browsertest.cc @@ -26,7 +26,6 @@ #include "components/content_settings/core/common/content_settings_types.h" #include "components/content_settings/core/common/pref_names.h" #include "components/embedder_support/pref_names.h" -#include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/sync_preferences/pref_service_syncable.h" #include "content/public/browser/web_contents.h" #include "content/public/test/browser_test.h" @@ -219,9 +218,6 @@ IN_PROC_BROWSER_TEST_F(PrefsFunctionalTe prefetch::SetPreloadPagesState(prefs, prefetch::PreloadPagesState::kNoPreloading); - EXPECT_TRUE(prefs->GetBoolean(prefs::kSafeBrowsingEnabled)); - prefs->SetBoolean(prefs::kSafeBrowsingEnabled, false); - EXPECT_TRUE(prefs->GetBoolean(embedder_support::kAlternateErrorPagesEnabled)); prefs->SetBoolean(embedder_support::kAlternateErrorPagesEnabled, false); @@ -235,7 +231,6 @@ IN_PROC_BROWSER_TEST_F(PrefsFunctionalTe EXPECT_EQ(prefetch::PreloadPagesState::kNoPreloading, prefetch::GetPreloadPagesState(*prefs)); - EXPECT_FALSE(prefs->GetBoolean(prefs::kSafeBrowsingEnabled)); EXPECT_FALSE( prefs->GetBoolean(embedder_support::kAlternateErrorPagesEnabled)); EXPECT_FALSE(prefs->GetBoolean(prefs::kSearchSuggestEnabled)); --- a/chrome/browser/profiles/gaia_info_update_service.cc +++ b/chrome/browser/profiles/gaia_info_update_service.cc @@ -22,7 +22,6 @@ #include "components/prefs/pref_service.h" #include "components/signin/public/base/avatar_icon_util.h" #include "components/signin/public/base/consent_level.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/base/signin_prefs.h" #include "components/signin/public/identity_manager/account_info.h" #include "components/signin/public/identity_manager/accounts_in_cookie_jar_info.h" --- a/chrome/browser/profiles/gaia_info_update_service_unittest.cc +++ b/chrome/browser/profiles/gaia_info_update_service_unittest.cc @@ -36,7 +36,6 @@ #include "components/prefs/pref_service.h" #include "components/profile_metrics/state.h" #include "components/signin/public/base/consent_level.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/base/signin_prefs.h" #include "components/signin/public/identity_manager/account_capabilities_test_mutator.h" #include "components/signin/public/identity_manager/account_info.h" --- a/chrome/browser/profiles/profile_attributes_entry.cc +++ b/chrome/browser/profiles/profile_attributes_entry.cc @@ -28,7 +28,6 @@ #include "components/prefs/pref_service.h" #include "components/prefs/scoped_user_pref_update.h" #include "components/profile_metrics/state.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/base/signin_switches.h" #include "components/signin/public/identity_manager/account_info.h" #include "components/signin/public/identity_manager/signin_constants.h" @@ -524,7 +523,7 @@ bool ProfileAttributesEntry::IsUsingDefa } bool ProfileAttributesEntry::IsSignedInWithCredentialProvider() const { - return GetBool(prefs::kSignedInWithCredentialProvider); + return false; } bool ProfileAttributesEntry::IsDasherlessManagement() const { @@ -769,7 +768,6 @@ void ProfileAttributesEntry::SetLastDown } void ProfileAttributesEntry::SetSignedInWithCredentialProvider(bool value) { - SetBool(prefs::kSignedInWithCredentialProvider, value); } void ProfileAttributesEntry::SetDasherlessManagement(bool value) { --- a/chrome/browser/profiles/profile_attributes_storage.cc +++ b/chrome/browser/profiles/profile_attributes_storage.cc @@ -44,7 +44,6 @@ #include "components/prefs/scoped_user_pref_update.h" #include "components/profile_metrics/state.h" #include "components/signin/public/base/persistent_repeating_timer.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/base/signin_switches.h" #include "components/signin/public/identity_manager/account_managed_status_finder.h" #include "content/public/browser/browser_task_traits.h" @@ -395,9 +394,7 @@ void ProfileAttributesStorage::AddProfil params.profile_name, /*include_check_for_legacy_profile_name*/ false)) // Assume newly created profiles use a default avatar. - .Set(ProfileAttributesEntry::kIsUsingDefaultAvatarKey, true) - .Set(prefs::kSignedInWithCredentialProvider, - params.is_signed_in_with_credential_provider); + .Set(ProfileAttributesEntry::kIsUsingDefaultAvatarKey, true); if (params.account_id.HasAccountIdKey()) { info.Set(ProfileAttributesEntry::kAccountIdKey, --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc @@ -157,7 +157,6 @@ #include "components/profile_metrics/browser_profile_type.h" #include "components/safe_search_api/safe_search_util.h" #include "components/security_interstitials/content/stateful_ssl_host_state_delegate.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/base/signin_switches.h" #include "components/signin/public/identity_manager/identity_manager.h" #include "components/site_isolation/site_isolation_policy.h" @@ -1089,7 +1088,6 @@ void ProfileImpl::OnLocaleReady(CreateMo CHECK(!ProfilePasswordStoreFactory::HasStore(this)); CHECK(!AccountPasswordStoreFactory::HasStore(this)); CHECK(!ReadingListModelFactory::HasModel(this)); - browser_sync::MaybeMigrateSyncingUserToSignedIn(GetPath(), GetPrefs()); #if BUILDFLAG(IS_CHROMEOS) // If this is a kiosk profile, reset some of its prefs which should not --- a/chrome/browser/profiles/profile_manager.cc +++ b/chrome/browser/profiles/profile_manager.cc @@ -92,7 +92,6 @@ #include "components/signin/public/base/consent_level.h" #include "components/signin/public/base/signin_buildflags.h" #include "components/signin/public/base/signin_metrics.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/identity_manager/identity_manager.h" #include "components/signin/public/identity_manager/primary_account_mutator.h" #include "components/signin/public/identity_manager/tribool.h" @@ -1914,8 +1913,7 @@ void ProfileManager::AddProfileToStorage entry->SetAuthInfo(account_info.gaia, username, is_consented_primary_account); - entry->SetSignedInWithCredentialProvider(profile->GetPrefs()->GetBoolean( - prefs::kSignedInWithCredentialProvider)); + entry->SetSignedInWithCredentialProvider(false); #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) // Sign out if force-sign-in policy is enabled and profile is not signed @@ -1964,14 +1962,13 @@ void ProfileManager::AddProfileToStorage init_params.is_ephemeral = IsForceEphemeralProfilesEnabled(profile); init_params.is_signed_in_with_credential_provider = - profile->GetPrefs()->GetBoolean(prefs::kSignedInWithCredentialProvider); + false; storage.AddProfile(std::move(init_params)); } void ProfileManager::SetNonPersonalProfilePrefs(Profile* profile) { PrefService* prefs = profile->GetPrefs(); - prefs->SetBoolean(prefs::kSigninAllowed, false); prefs->SetBoolean(bookmarks::prefs::kEditBookmarksEnabled, false); prefs->SetBoolean(bookmarks::prefs::kShowBookmarkBar, false); prefs->ClearPref(DefaultSearchManager::kDefaultSearchProviderDataPrefName); --- a/chrome/browser/profiles/profile_window.cc +++ b/chrome/browser/profiles/profile_window.cc @@ -40,7 +40,6 @@ #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" #include "components/prefs/pref_service.h" -#include "components/signin/public/base/signin_pref_names.h" #include "components/signin/public/identity_manager/account_info.h" #include "components/signin/public/identity_manager/identity_manager.h" #include "components/webui/flags/pref_service_flags_storage.h" --- a/chrome/browser/profiles/profiles_state.cc +++ b/chrome/browser/profiles/profiles_state.cc @@ -48,7 +48,6 @@ #include #include "chrome/browser/profiles/gaia_info_update_service.h" #include "chrome/browser/profiles/gaia_info_update_service_factory.h" -#include "components/signin/public/base/signin_pref_names.h" #endif namespace profiles { --- a/chrome/browser/resources/settings/privacy_page/security/security_page.html +++ b/chrome/browser/resources/settings/privacy_page/security/security_page.html @@ -73,126 +73,6 @@ -
-

$i18n{safeBrowsingSectionLabel}

- - -
-
-
-

- $i18n{columnHeadingWhenOn} -

-
    -
  • - -
    - $i18n{safeBrowsingEnhancedWhenOnBulOne} -
    -
  • -
  • - -
    - $i18n{safeBrowsingEnhancedWhenOnBulTwo} -
    -
  • -
  • - -
    - $i18n{safeBrowsingEnhancedWhenOnBulThree} -
    -
  • -
  • - -
    - $i18n{safeBrowsingEnhancedWhenOnBulFour} -
    -
  • -
-
-
-

- $i18n{columnHeadingConsider} -

-
    -
  • - -
    - $i18n{safeBrowsingEnhancedThingsToConsiderBulOne} -
    -
  • -
  • - -
    - $i18n{safeBrowsingEnhancedThingsToConsiderBulTwo} -
    -
  • -
  • - -
    - $i18n{safeBrowsingEnhancedThingsToConsiderBulThree} -
    -
  • -
-
-
-
-
- $i18nRaw{safeBrowsingEnhancedLearnMoreLabel} -
-
-
-
- -
- -
-
- - -
-