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

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

Issue 2282603002: [HBD] Update MD SiteSettingsHandler to support 3 modes. (Closed)
Patch Set: Created 4 years, 4 months 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 03595e1453cfa7e860e7f10d05e321d9194113f7..2697030d844498f9d19ca90a2ed85c7434b03c1a 100644
--- a/chrome/browser/ui/webui/settings/site_settings_handler.cc
+++ b/chrome/browser/ui/webui/settings/site_settings_handler.cc
@@ -332,16 +332,10 @@ void SiteSettingsHandler::HandleGetDefaultValueForContentType(
site_settings::ContentSettingsTypeFromGroupName(type)));
HostContentSettingsMap* map =
HostContentSettingsMapFactory::GetForProfile(profile_);
- ContentSetting setting = map->GetDefaultContentSetting(content_type, nullptr);
- // FullScreen is Allow vs. Ask.
- bool enabled;
- if (content_type == CONTENT_SETTINGS_TYPE_FULLSCREEN)
- enabled = setting != CONTENT_SETTING_ASK;
- else
- enabled = setting != CONTENT_SETTING_BLOCK;
-
- ResolveJavascriptCallback(*callback_id, base::FundamentalValue(enabled));
+ std::string setting = content_settings::ContentSettingToString(
+ map->GetDefaultContentSetting(content_type, nullptr));
+ ResolveJavascriptCallback(*callback_id, base::StringValue(setting));
}
void SiteSettingsHandler::HandleGetExceptionList(const base::ListValue* args) {

Powered by Google App Engine
This is Rietveld 408576698