2018-02-02 17:43:33 -05:00
|
|
|
diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc
|
2021-06-03 21:34:56 -04:00
|
|
|
index 173582c7c4904..bbf57904b6de9 100644
|
2018-02-02 17:43:33 -05:00
|
|
|
--- chrome/browser/content_settings/host_content_settings_map_factory.cc
|
|
|
|
+++ chrome/browser/content_settings/host_content_settings_map_factory.cc
|
2020-03-30 16:13:42 -04:00
|
|
|
@@ -8,6 +8,7 @@
|
2018-02-02 17:43:33 -05:00
|
|
|
|
|
|
|
#include "base/feature_list.h"
|
2020-03-30 16:13:42 -04:00
|
|
|
#include "build/buildflag.h"
|
2020-09-24 21:40:47 -04:00
|
|
|
+#include "cef/libcef/features/runtime.h"
|
2020-12-02 17:31:49 -05:00
|
|
|
#include "chrome/browser/content_settings/one_time_geolocation_permission_provider.h"
|
2021-03-04 17:36:57 -05:00
|
|
|
#include "chrome/browser/permissions/last_tab_standing_tracker_factory.h"
|
2018-02-02 17:43:33 -05:00
|
|
|
#include "chrome/browser/profiles/off_the_record_profile_impl.h"
|
2021-03-04 17:36:57 -05:00
|
|
|
@@ -22,6 +23,10 @@
|
2018-04-19 11:44:42 -04:00
|
|
|
#include "extensions/buildflags/buildflags.h"
|
2020-06-09 13:48:00 -04:00
|
|
|
#include "ui/webui/webui_allowlist_provider.h"
|
2018-02-02 17:43:33 -05: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"
|
2021-03-04 17:36:57 -05:00
|
|
|
@@ -51,8 +56,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
|
2018-02-02 17:43:33 -05:00
|
|
|
DependsOn(SupervisedUserSettingsServiceFactory::GetInstance());
|
|
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
2020-09-24 21:40:47 -04:00
|
|
|
+ if (!cef::IsAlloyRuntimeEnabled() || extensions::ExtensionsEnabled()) {
|
2018-02-02 17:43:33 -05:00
|
|
|
+#endif
|
|
|
|
DependsOn(
|
|
|
|
extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2021-03-04 17:36:57 -05:00
|
|
|
@@ -110,10 +121,16 @@ scoped_refptr<RefcountedKeyedService>
|
2020-12-02 17:31:49 -05:00
|
|
|
}
|
2018-02-02 17:43:33 -05:00
|
|
|
|
|
|
|
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
2020-09-24 21:40:47 -04:00
|
|
|
+ if (!cef::IsAlloyRuntimeEnabled() || extensions::ExtensionsEnabled()) {
|
2018-02-02 17:43:33 -05: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 12:53:10 -04:00
|
|
|
extensions::ExtensionService::RegisterContentSettings(settings_map.get(),
|
|
|
|
profile);
|
2018-02-02 17:43:33 -05:00
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
#endif // BUILDFLAG(ENABLE_EXTENSIONS)
|
|
|
|
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
|
|
|
SupervisedUserSettingsService* supervised_service =
|
2020-09-24 21:40:47 -04:00
|
|
|
diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc
|
2021-07-23 12:40:13 -04:00
|
|
|
index 610f6d942998c..f822df04ff07d 100644
|
2020-09-24 21:40:47 -04:00
|
|
|
--- components/content_settings/renderer/content_settings_agent_impl.cc
|
|
|
|
+++ components/content_settings/renderer/content_settings_agent_impl.cc
|
2021-07-23 12:40:13 -04:00
|
|
|
@@ -170,7 +170,7 @@ ContentSetting GetContentSettingFromRulesImpl(
|
2020-09-24 21:40:47 -04:00
|
|
|
return rule.GetContentSetting();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
- NOTREACHED();
|
|
|
|
+ // NOTREACHED();
|
|
|
|
return CONTENT_SETTING_DEFAULT;
|
|
|
|
}
|
|
|
|
|