Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5200)

Unified Diff: chrome/browser/ui/webui/site_settings_helper.cc

Issue 2509163004: [MD settings] content category policy (Closed)
Patch Set: main toggle and sub-setting toogle show controlled by icon; review changes Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/site_settings_helper.cc
diff --git a/chrome/browser/ui/webui/site_settings_helper.cc b/chrome/browser/ui/webui/site_settings_helper.cc
index 5daa96acbd8328df4d223a2a42e22479db1ec73e..f3118fd9fe3c2199288184bed527c02c2f6fa3a8 100644
--- a/chrome/browser/ui/webui/site_settings_helper.cc
+++ b/chrome/browser/ui/webui/site_settings_helper.cc
@@ -244,6 +244,20 @@ void GetExceptionsFromHostContentSettingsMap(const HostContentSettingsMap* map,
}
}
+void GetContentCategorySetting(
+ const HostContentSettingsMap* map,
+ ContentSettingsType content_type,
+ base::DictionaryValue* object) {
+ std::string provider;
+ std::string setting = content_settings::ContentSettingToString(
+ map->GetDefaultContentSetting(content_type, &provider));
+ DCHECK(!setting.empty());
+
+ object->SetString(site_settings::kSetting, setting);
+ if (provider != "default")
+ object->SetString(site_settings::kSource, provider);
+}
+
void GetPolicyAllowedUrls(
ContentSettingsType type,
std::vector<std::unique_ptr<base::DictionaryValue>>* exceptions,

Powered by Google App Engine
This is Rietveld 408576698