Files
brave-core/patches/chrome-browser-ui-webui-settings-site_settings_helper.cc.patch
T

53 lines
2.5 KiB
Diff

diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/browser/ui/webui/settings/site_settings_helper.cc
index 46d1f1161d829a2cd0e3184933fb404424e4e5bc..17f87c413ac8700815178c0aae1b0f50eedf3172 100644
--- a/chrome/browser/ui/webui/settings/site_settings_helper.cc
+++ b/chrome/browser/ui/webui/settings/site_settings_helper.cc
@@ -259,6 +259,7 @@ constexpr auto kContentSettingsTypeGroupNames = std::to_array<
{ContentSettingsType::PERMISSION_ACTIONS_HISTORY, nullptr},
{ContentSettingsType::SUSPICIOUS_NOTIFICATION_SHOW_ORIGINAL, nullptr},
{ContentSettingsType::DEPRECATED_SUB_APP_INSTALLATION_PROMPTS, nullptr},
+ BRAVE_CONTENT_SETTINGS_TYPE_GROUP_NAMES_LIST
});
static_assert(
@@ -533,6 +534,7 @@ bool HasRegisteredGroupName(ContentSettingsType type) {
}
ContentSettingsType ContentSettingsTypeFromGroupName(std::string_view name) {
+ BRAVE_SITE_SETTINGS_HELPER_CONTENT_SETTINGS_TYPE_FROM_GROUP_NAME
for (const auto& entry : kContentSettingsTypeGroupNames) {
// Content setting types that aren't represented in the settings UI
// will have `nullptr` as their `name`. However, converting `nullptr`
@@ -547,6 +549,7 @@ ContentSettingsType ContentSettingsTypeFromGroupName(std::string_view name) {
}
std::string_view ContentSettingsTypeToGroupName(ContentSettingsType type) {
+ BRAVE_SITE_SETTINGS_HELPER_CONTENT_SETTINGS_TYPE_TO_GROUP_NAME
for (const auto& entry : kContentSettingsTypeGroupNames) {
if (type == entry.type) {
// Content setting types that aren't represented in the settings UI
@@ -721,6 +724,7 @@ std::string SiteSettingSourceToString(const SiteSettingSource source) {
SiteSettingSource ProviderTypeToSiteSettingsSource(
const ProviderType provider_type) {
switch (provider_type) {
+ BRAVE_PROVIDER_TYPE_TO_SITE_SETTINGS_SOURCE
case ProviderType::kWebuiAllowlistProvider:
case ProviderType::kComponentExtensionProvider:
return SiteSettingSource::kAllowlist;
@@ -750,6 +754,7 @@ SiteSettingSource ProviderTypeToSiteSettingsSource(
std::string_view ProviderToDefaultSettingSourceString(
const ProviderType provider) {
switch (provider) {
+ BRAVE_PROVIDER_TO_DEFAULT_SETTINGS_STRING
case ProviderType::kPolicyProvider:
return "policy";
case ProviderType::kSupervisedProvider:
@@ -875,6 +880,7 @@ base::DictValue GetExceptionForPage(
exception.Set(kSource, SiteSettingSourceToString(source));
exception.Set(kIncognito, incognito);
exception.Set(kIsEmbargoed, is_embargoed);
+ BRAVE_GET_EXCEPTION_FOR_PAGE
return exception;
}