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

Unified Diff: chrome/browser/ui/webui/settings/site_settings_handler.cc

Issue 2509163004: [MD settings] content category policy (Closed)
Patch Set: enum 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/settings/site_settings_handler.cc
diff --git a/chrome/browser/ui/webui/settings/site_settings_handler.cc b/chrome/browser/ui/webui/settings/site_settings_handler.cc
index 71d5f144c607e1f73669a0ca3df838326d92b6ae..4605ff9853572db0391920a82d0a2305ea298f06 100644
--- a/chrome/browser/ui/webui/settings/site_settings_handler.cc
+++ b/chrome/browser/ui/webui/settings/site_settings_handler.cc
@@ -397,9 +397,9 @@ void SiteSettingsHandler::HandleGetDefaultValueForContentType(
HostContentSettingsMap* map =
HostContentSettingsMapFactory::GetForProfile(profile_);
- std::string setting = content_settings::ContentSettingToString(
- map->GetDefaultContentSetting(content_type, nullptr));
- ResolveJavascriptCallback(*callback_id, base::StringValue(setting));
+ std::unique_ptr<base::DictionaryValue> category(new base::DictionaryValue);
Dan Beam 2016/11/17 22:33:38 nit: can we just do stack construction instead? i
dschuyler 2016/11/18 02:11:56 Done.
+ site_settings::GetContentCategorySetting(map, content_type, category.get());
+ ResolveJavascriptCallback(*callback_id, *category.get());
tommycli 2016/11/18 00:09:26 I think you will have to update the unit test here
dschuyler 2016/11/18 02:11:56 Thanks Tommy. Done.
}
void SiteSettingsHandler::HandleGetExceptionList(const base::ListValue* args) {

Powered by Google App Engine
This is Rietveld 408576698