2018-02-02 23:43:33 +01:00
|
|
|
diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc
|
2020-10-08 21:54:42 +02:00
|
|
|
index f3b51e20cb9c..b479022f1d3b 100644
|
2018-02-02 23:43:33 +01:00
|
|
|
--- chrome/browser/content_settings/host_content_settings_map_factory.cc
|
|
|
|
+++ chrome/browser/content_settings/host_content_settings_map_factory.cc
|
2020-03-30 22:13:42 +02:00
|
|
|
@@ -8,6 +8,7 @@
|
2018-02-02 23:43:33 +01:00
|
|
|
|
|
|
|
#include "base/feature_list.h"
|
2020-03-30 22:13:42 +02:00
|
|
|
#include "build/buildflag.h"
|
2020-09-25 03:40:47 +02:00
|
|
|
+#include "cef/libcef/features/runtime.h"
|
2018-02-02 23:43:33 +01:00
|
|
|
#include "chrome/browser/profiles/off_the_record_profile_impl.h"
|
|
|
|
#include "chrome/browser/profiles/profile.h"
|
2018-05-20 15:51:42 +02:00
|
|
|
#include "chrome/browser/search_engines/template_url_service_factory.h"
|
2020-06-09 19:48:00 +02:00
|
|
|
@@ -20,6 +21,10 @@
|
2018-04-19 17:44:42 +02:00
|
|
|
#include "extensions/buildflags/buildflags.h"
|
2020-06-09 19:48:00 +02:00
|
|
|
#include "ui/webui/webui_allowlist_provider.h"
|
2018-02-02 23:43:33 +01:00
|
|
|
|
|
|
|
+#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"
|
2020-06-09 19:48:00 +02:00
|
|
|
@@ -48,8 +53,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
|
2018-02-02 23:43:33 +01:00
|
|
|
DependsOn(SupervisedUserSettingsServiceFactory::GetInstance());
|
|
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
2020-09-25 03:40:47 +02:00
|
|
|
+ if (!cef::IsAlloyRuntimeEnabled() || extensions::ExtensionsEnabled()) {
|
2018-02-02 23:43:33 +01:00
|
|
|
+#endif
|
|
|
|
DependsOn(
|
|
|
|
extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2020-10-08 21:54:42 +02:00
|
|
|
@@ -97,10 +108,16 @@ scoped_refptr<RefcountedKeyedService>
|
2020-06-09 19:48:00 +02:00
|
|
|
std::move(allowlist_provider));
|
2018-02-02 23:43:33 +01:00
|
|
|
|
|
|
|
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
2020-09-25 03:40:47 +02:00
|
|
|
+ if (!cef::IsAlloyRuntimeEnabled() || extensions::ExtensionsEnabled()) {
|
2018-02-02 23:43:33 +01:00
|
|
|
+#endif
|
|
|
|
// These must be registered before before the HostSettings are passed over to
|
|
|
|
// the IOThread. Simplest to do this on construction.
|
2018-06-08 18:53:10 +02:00
|
|
|
extensions::ExtensionService::RegisterContentSettings(settings_map.get(),
|
|
|
|
profile);
|
2018-02-02 23:43:33 +01:00
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
#endif // BUILDFLAG(ENABLE_EXTENSIONS)
|
|
|
|
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
|
|
|
SupervisedUserSettingsService* supervised_service =
|
2020-09-25 03:40:47 +02:00
|
|
|
diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc
|
2020-10-08 21:54:42 +02:00
|
|
|
index 20ae512af806..e03946e7ce80 100644
|
2020-09-25 03:40:47 +02:00
|
|
|
--- components/content_settings/renderer/content_settings_agent_impl.cc
|
|
|
|
+++ components/content_settings/renderer/content_settings_agent_impl.cc
|
2020-10-08 21:54:42 +02:00
|
|
|
@@ -176,7 +176,7 @@ ContentSetting GetContentSettingFromRulesImpl(
|
2020-09-25 03:40:47 +02:00
|
|
|
return rule.GetContentSetting();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
- NOTREACHED();
|
|
|
|
+ // NOTREACHED();
|
|
|
|
return CONTENT_SETTING_DEFAULT;
|
|
|
|
}
|
|
|
|
|