Add GN arg to disable Alloy bootstrap (see #3681, see #3685)

Set enable_alloy_bootstrap=false to build with Alloy bootstrap code
removed. Extension API is documented as deprecated in comments but
not compiled out with this arg.
This commit is contained in:
Marshall Greenblatt
2024-04-29 21:09:17 -04:00
parent d666ec5770
commit b5d84c254d
96 changed files with 1243 additions and 516 deletions

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc
index 0b39e73c2a394..23b0bdcb7b7db 100644
index 0b39e73c2a394..1c42fe06479ab 100644
--- chrome/browser/themes/theme_service.cc
+++ chrome/browser/themes/theme_service.cc
@@ -30,6 +30,7 @@
@@ -25,7 +25,7 @@ index 0b39e73c2a394..23b0bdcb7b7db 100644
// OnExtensionServiceReady. Otherwise, the ThemeObserver won't be
// constructed in time to observe the corresponding events.
#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_CEF)
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
+ const bool extensions_disabled = cef::IsAlloyRuntimeEnabled() &&
+ !extensions::ExtensionsEnabled();
+#else
@@ -42,7 +42,7 @@ index 0b39e73c2a394..23b0bdcb7b7db 100644
theme_syncable_service_ =
std::make_unique<ThemeSyncableService>(profile_, this);
diff --git chrome/browser/themes/theme_service_factory.cc chrome/browser/themes/theme_service_factory.cc
index 879bbeef4037b..e6cc36f388197 100644
index 879bbeef4037b..c52b9144cf966 100644
--- chrome/browser/themes/theme_service_factory.cc
+++ chrome/browser/themes/theme_service_factory.cc
@@ -9,6 +9,7 @@
@@ -68,7 +68,7 @@ index 879bbeef4037b..e6cc36f388197 100644
.Build()) {
DependsOn(extensions::ExtensionRegistryFactory::GetInstance());
DependsOn(extensions::ExtensionPrefsFactory::GetInstance());
+#if BUILDFLAG(ENABLE_CEF)
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
+ const bool extensions_disabled = cef::IsAlloyRuntimeEnabled() &&
+ !extensions::ExtensionsEnabled();
+#else