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
|
2024-01-26 03:12:43 +01:00
|
|
|
index 36335ba63ee83..e14005d6a4e86 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"
|
2024-01-26 03:12:43 +01:00
|
|
|
@@ -24,6 +25,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"
|
2024-01-26 03:12:43 +01:00
|
|
|
@@ -64,7 +69,13 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
|
2018-02-02 23:43:33 +01:00
|
|
|
#endif
|
2024-01-26 03:12:43 +01:00
|
|
|
DependsOn(OneTimePermissionsTrackerFactory::GetInstance());
|
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
|
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)
|
2024-01-26 03:12:43 +01:00
|
|
|
@@ -118,6 +129,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(
|
2024-01-26 03:12:43 +01:00
|
|
|
@@ -130,6 +144,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
|
2024-02-22 19:36:15 +01:00
|
|
|
index 34871864cf8d7..8404bcc4e50dd 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
|
2024-01-26 03:12:43 +01:00
|
|
|
@@ -143,7 +143,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
|