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
|
2023-08-09 23:17:17 +02:00
|
|
|
index 6f842a7535a56..faaee032e82bd 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"
|
2023-04-26 21:55:59 +02:00
|
|
|
#include "chrome/browser/content_settings/one_time_permission_provider.h"
|
|
|
|
#include "chrome/browser/permissions/one_time_permissions_tracker_factory.h"
|
2018-02-02 23:43:33 +01:00
|
|
|
#include "chrome/browser/profiles/off_the_record_profile_impl.h"
|
2023-02-27 19:52:38 +01: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"
|
2023-05-30 10:55:32 +02:00
|
|
|
@@ -68,7 +73,13 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
|
2023-04-26 21:55:59 +02:00
|
|
|
DependsOn(OneTimePermissionsTrackerFactory::GetInstance());
|
2018-02-02 23:43:33 +01:00
|
|
|
#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)
|
2023-05-30 10:55:32 +02:00
|
|
|
@@ -132,6 +143,9 @@ scoped_refptr<RefcountedKeyedService>
|
2023-04-26 21:55:59 +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.
|
2021-10-19 00:17:16 +02:00
|
|
|
settings_map->RegisterProvider(
|
2023-05-30 10:55:32 +02:00
|
|
|
@@ -144,6 +158,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)
|
2023-02-27 19:52:38 +01:00
|
|
|
supervised_user::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
|
2023-12-06 21:16:15 +01:00
|
|
|
index c62382c00a48b..a560eafc3ec80 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
|
2023-12-06 21:16:15 +01:00
|
|
|
@@ -145,7 +145,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
|