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
|
2022-01-25 21:26:51 +01:00
|
|
|
index 242f244a6d3b5..d037f2dfd9987 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
|
2021-10-19 00:17:16 +02:00
|
|
|
@@ -9,6 +9,7 @@
|
2018-02-02 23:43:33 +01:00
|
|
|
#include "base/feature_list.h"
|
2021-10-19 00:17:16 +02:00
|
|
|
#include "build/build_config.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"
|
2020-12-02 23:31:49 +01:00
|
|
|
#include "chrome/browser/content_settings/one_time_geolocation_permission_provider.h"
|
2021-03-04 23:36:57 +01:00
|
|
|
#include "chrome/browser/permissions/last_tab_standing_tracker_factory.h"
|
2018-02-02 23:43:33 +01:00
|
|
|
#include "chrome/browser/profiles/off_the_record_profile_impl.h"
|
2021-10-19 00:17:16 +02:00
|
|
|
@@ -23,6 +24,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)
|
2021-10-19 00:17:16 +02:00
|
|
|
#include "base/trace_event/trace_event.h"
|
2022-01-25 21:26:51 +01:00
|
|
|
#include "extensions/browser/api/content_settings/content_settings_custom_extension_provider.h"
|
2021-11-10 22:57:31 +01:00
|
|
|
@@ -55,7 +60,13 @@ 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
|
2021-10-19 00:17:16 +02:00
|
|
|
DependsOn(extensions::ContentSettingsService::GetFactoryInstance());
|
2018-02-02 23:43:33 +01:00
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
#endif
|
2021-11-10 22:57:31 +01:00
|
|
|
// Used by way of ShouldRestoreOldSessionCookies().
|
|
|
|
#if BUILDFLAG(ENABLE_SESSION_SERVICE)
|
|
|
|
@@ -119,6 +130,9 @@ scoped_refptr<RefcountedKeyedService>
|
2020-12-02 23:31:49 +01:00
|
|
|
}
|
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.
|
2021-10-19 00:17:16 +02:00
|
|
|
settings_map->RegisterProvider(
|
2021-11-10 22:57:31 +01:00
|
|
|
@@ -131,6 +145,9 @@ scoped_refptr<RefcountedKeyedService>
|
2021-10-19 00:17:16 +02:00
|
|
|
// the case where profile->IsOffTheRecord() is true? And what is the
|
|
|
|
// interaction with profile->IsGuestSession()?
|
|
|
|
false));
|
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
|
2022-08-23 03:37:40 +02:00
|
|
|
index 701d6a5155f57..862a491c7db88 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
|
2022-04-27 21:24:24 +02:00
|
|
|
@@ -144,7 +144,7 @@ ContentSetting GetContentSettingFromRules(
|
2020-09-25 03:40:47 +02:00
|
|
|
return rule.GetContentSetting();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
- NOTREACHED();
|
|
|
|
+ // NOTREACHED();
|
|
|
|
return CONTENT_SETTING_DEFAULT;
|
|
|
|
}
|
2022-04-27 21:24:24 +02:00
|
|
|
} // namespace
|