helium/core: fix ublock origin being re-enabled when updated (#404)

This commit is contained in:
jj
2025-11-06 17:10:39 +01:00
committed by GitHub
parent eaf2714853
commit 48577b920b
2 changed files with 17 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
--- a/extensions/browser/extension_registrar.cc
+++ b/extensions/browser/extension_registrar.cc
@@ -532,9 +532,12 @@ void ExtensionRegistrar::AddComponentExt
if (old_version.IsValid()) {
UnregisterServiceWorkerWithRootScope(extension);
}
+
+ base::flat_set<int> disable_reasons = GetDisableReasonsOnInstalled(extension);
+
// TODO(crbug.com/40508457): If needed, add support for Declarative Net
// Request to component extensions and pass the ruleset install prefs here.
- AddNewOrUpdatedExtension(extension, {}, kInstallFlagNone,
+ AddNewOrUpdatedExtension(extension, std::move(disable_reasons), kInstallFlagNone,
syncer::StringOrdinal(), std::string(),
/*ruleset_install_prefs=*/{});
return;

View File

@@ -160,6 +160,7 @@ helium/core/disable-outdated-build-detector.patch
helium/core/remove-dead-toolbar-actions.patch
helium/core/add-component-l10n-support.patch
helium/core/add-component-managed-schema-support.patch
helium/core/fix-component-extension-reenablement.patch
helium/core/ublock-setup-sources.patch
helium/core/ublock-install-as-component.patch
helium/core/ublock-reconfigure-defaults.patch