54 lines
2.3 KiB
Diff
54 lines
2.3 KiB
Diff
From: uazo <uazo@users.noreply.github.com>
|
|
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
|
|
@@ -107,6 +107,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
|
|
@@ -124,6 +124,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
|
|
@@ -542,14 +542,8 @@ std::unique_ptr<ComponentUpdateService> 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
|
|
--
|