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-11-15 18:50:53 +01:00
|
|
|
index c8a0156b69cc3..6a6fac072143d 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"
|
2022-09-26 21:30:45 +02:00
|
|
|
@@ -22,6 +23,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"
|
2022-11-15 18:50:53 +01:00
|
|
|
@@ -61,7 +66,13 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
|
|
|
|
DependsOn(TemplateURLServiceFactory::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)
|
2022-11-15 18:50:53 +01:00
|
|
|
@@ -135,6 +146,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(
|
2022-11-15 18:50:53 +01:00
|
|
|
@@ -147,6 +161,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-10-17 19:27:40 +02:00
|
|
|
index 41947c7d3ff0c..dbfbca256e0d1 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
|