From: uazo Date: Tue, 8 Nov 2022 12:41:22 +0000 Subject: Disable Component Updates License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- chrome/browser/component_updater/registration.cc | 1 + components/component_updater/component_installer.cc | 1 + components/component_updater/component_updater_service.cc | 8 +------- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/chrome/browser/component_updater/registration.cc b/chrome/browser/component_updater/registration.cc --- a/chrome/browser/component_updater/registration.cc +++ b/chrome/browser/component_updater/registration.cc @@ -99,6 +99,7 @@ namespace component_updater { void RegisterComponentsForUpdate() { + if ((true)) return; auto* const cus = g_browser_process->component_updater(); #if BUILDFLAG(IS_WIN) diff --git a/components/component_updater/component_installer.cc b/components/component_updater/component_installer.cc --- a/components/component_updater/component_installer.cc +++ b/components/component_updater/component_installer.cc @@ -103,6 +103,7 @@ void ComponentInstaller::Register( base::OnceClosure callback, const base::Version& registered_version, const base::Version& max_previous_product_version) { + if ((true)) return; DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (!installer_policy_) { diff --git a/components/component_updater/component_updater_service.cc b/components/component_updater/component_updater_service.cc --- a/components/component_updater/component_updater_service.cc +++ b/components/component_updater/component_updater_service.cc @@ -546,14 +546,8 @@ std::unique_ptr ComponentUpdateServiceFactory( // Register prefs required by the component update service. void RegisterComponentUpdateServicePrefs(PrefRegistrySimple* registry) { - // If the preference is not set the component updates are enabled by default - // unless in Chrome for Testing where we never want components to be updated - // automatically. - constexpr bool kComponentUpdatesEnabledByDefault = - !BUILDFLAG(CHROME_FOR_TESTING); - registry->RegisterBooleanPref(prefs::kComponentUpdatesEnabled, - kComponentUpdatesEnabledByDefault); + false); } } // namespace component_updater --