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

Unified Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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/options/content_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index f51ac2358603a45820e04db5e8f84ef03cd3b770..491cb0b196770e809de1d4ad1d6fa0c3ae2a53fb 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -876,7 +876,7 @@ void ContentSettingsHandler::UpdateGeolocationExceptionsView() {
}
}
- base::StringValue type_string(site_settings::ContentSettingsTypeToGroupName(
+ base::Value type_string(site_settings::ContentSettingsTypeToGroupName(
CONTENT_SETTINGS_TYPE_GEOLOCATION));
web_ui()->CallJavascriptFunctionUnsafe("ContentSettings.setExceptions",
type_string, exceptions);
@@ -916,7 +916,7 @@ void ContentSettingsHandler::UpdateNotificationExceptionsView() {
i->source));
}
- base::StringValue type_string(site_settings::ContentSettingsTypeToGroupName(
+ base::Value type_string(site_settings::ContentSettingsTypeToGroupName(
CONTENT_SETTINGS_TYPE_NOTIFICATIONS));
web_ui()->CallJavascriptFunctionUnsafe("ContentSettings.setExceptions",
type_string, exceptions);
@@ -990,7 +990,7 @@ void ContentSettingsHandler::UpdateChooserExceptionsViewFromModel(
base::ListValue exceptions;
site_settings::GetChooserExceptionsFromProfile(
Profile::FromWebUI(web_ui()), false, chooser_type, &exceptions);
- base::StringValue type_string(chooser_type.name);
+ base::Value type_string(chooser_type.name);
web_ui()->CallJavascriptFunctionUnsafe("ContentSettings.setExceptions",
type_string, exceptions);
@@ -1005,7 +1005,7 @@ void ContentSettingsHandler::UpdateOTRChooserExceptionsViewFromModel(
base::ListValue exceptions;
site_settings::GetChooserExceptionsFromProfile(
Profile::FromWebUI(web_ui()), true, chooser_type, &exceptions);
- base::StringValue type_string(chooser_type.name);
+ base::Value type_string(chooser_type.name);
web_ui()->CallJavascriptFunctionUnsafe("ContentSettings.setOTRExceptions",
type_string, exceptions);
}
@@ -1070,7 +1070,7 @@ void ContentSettingsHandler::UpdateZoomLevelsExceptionsView() {
zoom_levels_exceptions.Append(std::move(exception));
}
- base::StringValue type_string(kZoomContentType);
+ base::Value type_string(kZoomContentType);
web_ui()->CallJavascriptFunctionUnsafe("ContentSettings.setExceptions",
type_string, zoom_levels_exceptions);
}
@@ -1085,8 +1085,7 @@ void ContentSettingsHandler::UpdateExceptionsViewFromHostContentSettingsMap(
site_settings::GetExceptionsFromHostContentSettingsMap(
settings_map, type, extension_registry, web_ui(), /*incognito=*/false,
/*filter=*/nullptr, &exceptions);
- base::StringValue type_string(
- site_settings::ContentSettingsTypeToGroupName(type));
+ base::Value type_string(site_settings::ContentSettingsTypeToGroupName(type));
web_ui()->CallJavascriptFunctionUnsafe("ContentSettings.setExceptions",
type_string, exceptions);
@@ -1115,8 +1114,7 @@ void ContentSettingsHandler::UpdateExceptionsViewFromOTRHostContentSettingsMap(
site_settings::GetExceptionsFromHostContentSettingsMap(
otr_settings_map, type, extension_registry, web_ui(), /*incognito=*/true,
/*filter=*/nullptr, &exceptions);
- base::StringValue type_string(
- site_settings::ContentSettingsTypeToGroupName(type));
+ base::Value type_string(site_settings::ContentSettingsTypeToGroupName(type));
web_ui()->CallJavascriptFunctionUnsafe("ContentSettings.setOTRExceptions",
type_string, exceptions);
}
@@ -1350,9 +1348,9 @@ void ContentSettingsHandler::CheckExceptionPatternValidity(
ContentSettingsPattern::FromString(pattern_string);
web_ui()->CallJavascriptFunctionUnsafe(
- "ContentSettings.patternValidityCheckComplete",
- base::StringValue(type_string), base::StringValue(mode_string),
- base::StringValue(pattern_string), base::Value(pattern.IsValid()));
+ "ContentSettings.patternValidityCheckComplete", base::Value(type_string),
+ base::Value(mode_string), base::Value(pattern_string),
+ base::Value(pattern.IsValid()));
}
Profile* ContentSettingsHandler::GetProfile() {
@@ -1413,11 +1411,10 @@ void ContentSettingsHandler::ShowFlashMediaLink(
if (show_link != show) {
web_ui()->CallJavascriptFunctionUnsafe(
"ContentSettings.showMediaPepperFlashLink",
- base::StringValue(link_type == DEFAULT_SETTING ? "default"
- : "exceptions"),
- base::StringValue(content_type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC
- ? "mic"
- : "camera"),
+ base::Value(link_type == DEFAULT_SETTING ? "default" : "exceptions"),
+ base::Value(content_type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC
+ ? "mic"
+ : "camera"),
base::Value(show));
show_link = show;
}
@@ -1475,7 +1472,7 @@ void ContentSettingsHandler::UpdateMediaDeviceDropdownVisibility(
web_ui()->CallJavascriptFunctionUnsafe(
"ContentSettings.setDevicesMenuVisibility",
- base::StringValue(site_settings::ContentSettingsTypeToGroupName(type)),
+ base::Value(site_settings::ContentSettingsTypeToGroupName(type)),
base::Value(!settings.policy_disable));
}
« no previous file with comments | « chrome/browser/ui/webui/options/clear_browser_data_handler.cc ('k') | chrome/browser/ui/webui/options/core_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698