mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Initialize required KeyedServiceFactories when extensions are disabled (issue #2359)
This commit is contained in:
54
patch/patches/chrome_browser_content_settings.patch
Normal file
54
patch/patches/chrome_browser_content_settings.patch
Normal file
@@ -0,0 +1,54 @@
|
||||
diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
index 7bb265a57ba4..6917d09be48a 100644
|
||||
--- chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
+++ chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "base/feature_list.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/profiles/off_the_record_profile_impl.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/common/chrome_features.h"
|
||||
@@ -16,6 +17,10 @@
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "extensions/features/features.h"
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+#include "cef/libcef/common/extensions/extensions_util.h"
|
||||
+#endif
|
||||
+
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/extensions/extension_service.h"
|
||||
#include "extensions/browser/extension_system.h"
|
||||
@@ -41,8 +46,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
|
||||
DependsOn(SupervisedUserSettingsServiceFactory::GetInstance());
|
||||
#endif
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ if (extensions::ExtensionsEnabled()) {
|
||||
+#endif
|
||||
DependsOn(
|
||||
extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ }
|
||||
+#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -88,9 +99,15 @@ scoped_refptr<RefcountedKeyedService>
|
||||
store_last_modified));
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ if (extensions::ExtensionsEnabled()) {
|
||||
+#endif
|
||||
// These must be registered before before the HostSettings are passed over to
|
||||
// the IOThread. Simplest to do this on construction.
|
||||
ExtensionService::RegisterContentSettings(settings_map.get(), profile);
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ }
|
||||
+#endif
|
||||
#endif // BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
SupervisedUserSettingsService* supervised_service =
|
Reference in New Issue
Block a user