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-05-23 03:52:35 +02:00
|
|
|
index a344dc5c74ce3..548e6218b0e82 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-04-23 22:06:00 +02:00
|
|
|
@@ -27,6 +28,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
|
|
|
|
2024-04-30 03:09:17 +02:00
|
|
|
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2018-02-02 23:43:33 +01:00
|
|
|
+#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-05-23 03:52:35 +02:00
|
|
|
@@ -60,7 +65,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)
|
2024-04-30 03:09:17 +02:00
|
|
|
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
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());
|
2024-04-30 03:09:17 +02:00
|
|
|
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2018-02-02 23:43:33 +01:00
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
#endif
|
2021-11-10 22:57:31 +01:00
|
|
|
// Used by way of ShouldRestoreOldSessionCookies().
|
|
|
|
#if BUILDFLAG(ENABLE_SESSION_SERVICE)
|
2024-05-23 03:52:35 +02:00
|
|
|
@@ -113,6 +124,9 @@ scoped_refptr<RefcountedKeyedService>
|
|
|
|
std::move(allowlist_provider));
|
2018-02-02 23:43:33 +01:00
|
|
|
|
|
|
|
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
2024-04-30 03:09:17 +02:00
|
|
|
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
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-05-23 03:52:35 +02:00
|
|
|
@@ -125,6 +139,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));
|
2024-04-30 03:09:17 +02:00
|
|
|
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2018-02-02 23:43:33 +01:00
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
#endif // BUILDFLAG(ENABLE_EXTENSIONS)
|
2023-02-27 19:52:38 +01:00
|
|
|
supervised_user::SupervisedUserSettingsService* supervised_service =
|
2024-04-23 22:06:00 +02:00
|
|
|
SupervisedUserSettingsServiceFactory::GetForKey(profile->GetProfileKey());
|
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-04-23 22:06:00 +02:00
|
|
|
index f988c812b4ad9..3d5637f3cbdf3 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-03-19 22:11:42 +01:00
|
|
|
@@ -148,7 +148,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
|