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

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

Issue 2552883009: [MD settings] include source of policy for content settings (Closed)
Patch Set: account for unset source Created 4 years 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 c1a6654f5e8a43586aae4f77a653086266cb448f..ef0a5fedc8f58568ca53a79cd1e53c0ad4b9ee87 100644
--- a/chrome/browser/ui/webui/site_settings_helper.cc
+++ b/chrome/browser/ui/webui/site_settings_helper.cc
@@ -273,6 +273,20 @@ void GetExceptionsFromHostContentSettingsMap(
}
}
+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,
« no previous file with comments | « chrome/browser/ui/webui/site_settings_helper.h ('k') | chrome/test/data/webui/settings/site_settings_category_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698