diff --git chrome/browser/themes/theme_service_factory.cc chrome/browser/themes/theme_service_factory.cc index caec77bbe3ba..1640307eef65 100644 --- chrome/browser/themes/theme_service_factory.cc +++ chrome/browser/themes/theme_service_factory.cc @@ -6,6 +6,7 @@ #include "base/no_destructor.h" #include "build/build_config.h" +#include "cef/libcef/features/features.h" #include "chrome/browser/extensions/extension_system_factory.h" #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/profiles/profile.h" @@ -41,6 +42,10 @@ const ThemeHelper& GetThemeHelper() { } // namespace +#if BUILDFLAG(ENABLE_CEF) +#include "cef/libcef/common/extensions/extensions_util.h" +#endif + // static ThemeService* ThemeServiceFactory::GetForProfile(Profile* profile) { return static_cast( @@ -70,7 +75,13 @@ ThemeServiceFactory::ThemeServiceFactory() BrowserContextDependencyManager::GetInstance()) { DependsOn(extensions::ExtensionRegistryFactory::GetInstance()); DependsOn(extensions::ExtensionPrefsFactory::GetInstance()); +#if BUILDFLAG(ENABLE_CEF) + if (extensions::ExtensionsEnabled()) { +#endif DependsOn(extensions::ExtensionSystemFactory::GetInstance()); +#if BUILDFLAG(ENABLE_CEF) + } +#endif } ThemeServiceFactory::~ThemeServiceFactory() {}