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

Unified Diff: chrome/browser/ui/webui/help/help_handler.cc

Issue 1995113002: Rename WebUI::CallJavascriptFunction to WebUI::CallJavascriptFunctionUnsafe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « chrome/browser/ui/webui/gcm_internals_ui.cc ('k') | chrome/browser/ui/webui/history_login_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/help/help_handler.cc
diff --git a/chrome/browser/ui/webui/help/help_handler.cc b/chrome/browser/ui/webui/help/help_handler.cc
index 83312c9abbc175499c0bea071cd85486ecb7a2bf..d95b9250113bd5b6b5619c28ed882ba41ef3336a 100644
--- a/chrome/browser/ui/webui/help/help_handler.cc
+++ b/chrome/browser/ui/webui/help/help_handler.cc
@@ -488,28 +488,28 @@ void HelpHandler::OnPageLoaded(const base::ListValue* args) {
base::Bind(&HelpHandler::OnOSFirmware,
weak_factory_.GetWeakPtr()));
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"help.HelpPage.updateEnableReleaseChannel",
base::FundamentalValue(CanChangeChannel(Profile::FromWebUI(web_ui()))));
base::Time build_time = base::SysInfo::GetLsbReleaseTime();
base::string16 build_date = base::TimeFormatFriendlyDate(build_time);
- web_ui()->CallJavascriptFunction("help.HelpPage.setBuildDate",
- base::StringValue(build_date));
+ web_ui()->CallJavascriptFunctionUnsafe("help.HelpPage.setBuildDate",
+ base::StringValue(build_date));
#endif // defined(OS_CHROMEOS)
RefreshUpdateStatus();
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"help.HelpPage.setObsoleteSystem",
base::FundamentalValue(ObsoleteSystem::IsObsoleteNowOrSoon()));
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"help.HelpPage.setObsoleteSystemEndOfTheLine",
base::FundamentalValue(ObsoleteSystem::IsObsoleteNowOrSoon() &&
ObsoleteSystem::IsEndOfTheLine()));
#if defined(OS_CHROMEOS)
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"help.HelpPage.updateIsEnterpriseManaged",
base::FundamentalValue(IsEnterpriseManaged()));
// First argument to GetChannel() is a flag that indicates whether
@@ -642,13 +642,13 @@ void HelpHandler::SetUpdateStatus(VersionUpdater::Status status,
break;
}
- web_ui()->CallJavascriptFunction("help.HelpPage.setUpdateStatus",
- base::StringValue(status_str),
- base::StringValue(message));
+ web_ui()->CallJavascriptFunctionUnsafe("help.HelpPage.setUpdateStatus",
+ base::StringValue(status_str),
+ base::StringValue(message));
if (status == VersionUpdater::UPDATING) {
- web_ui()->CallJavascriptFunction("help.HelpPage.setProgress",
- base::FundamentalValue(progress));
+ web_ui()->CallJavascriptFunctionUnsafe("help.HelpPage.setProgress",
+ base::FundamentalValue(progress));
}
#if defined(OS_CHROMEOS)
@@ -656,16 +656,16 @@ void HelpHandler::SetUpdateStatus(VersionUpdater::Status status,
status == VersionUpdater::FAILED_CONNECTION_TYPE_DISALLOWED) {
base::string16 types_msg = GetAllowedConnectionTypesMessage();
if (!types_msg.empty()) {
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"help.HelpPage.setAndShowAllowedConnectionTypesMsg",
base::StringValue(types_msg));
} else {
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"help.HelpPage.showAllowedConnectionTypesMsg",
base::FundamentalValue(false));
}
} else {
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"help.HelpPage.showAllowedConnectionTypesMsg",
base::FundamentalValue(false));
}
@@ -687,35 +687,35 @@ void HelpHandler::SetPromotionState(VersionUpdater::PromotionState state) {
break;
}
- web_ui()->CallJavascriptFunction("help.HelpPage.setPromotionState",
- base::StringValue(state_str));
+ web_ui()->CallJavascriptFunctionUnsafe("help.HelpPage.setPromotionState",
+ base::StringValue(state_str));
}
#endif // defined(OS_MACOSX)
#if defined(OS_CHROMEOS)
void HelpHandler::OnOSVersion(const std::string& version) {
- web_ui()->CallJavascriptFunction("help.HelpPage.setOSVersion",
- base::StringValue(version));
+ web_ui()->CallJavascriptFunctionUnsafe("help.HelpPage.setOSVersion",
+ base::StringValue(version));
}
void HelpHandler::OnARCVersion(const std::string& firmware) {
- web_ui()->CallJavascriptFunction("help.HelpPage.setARCVersion",
- base::StringValue(firmware));
+ web_ui()->CallJavascriptFunctionUnsafe("help.HelpPage.setARCVersion",
+ base::StringValue(firmware));
}
void HelpHandler::OnOSFirmware(const std::string& firmware) {
- web_ui()->CallJavascriptFunction("help.HelpPage.setOSFirmware",
- base::StringValue(firmware));
+ web_ui()->CallJavascriptFunctionUnsafe("help.HelpPage.setOSFirmware",
+ base::StringValue(firmware));
}
void HelpHandler::OnCurrentChannel(const std::string& channel) {
- web_ui()->CallJavascriptFunction(
- "help.HelpPage.updateCurrentChannel", base::StringValue(channel));
+ web_ui()->CallJavascriptFunctionUnsafe("help.HelpPage.updateCurrentChannel",
+ base::StringValue(channel));
}
void HelpHandler::OnTargetChannel(const std::string& channel) {
- web_ui()->CallJavascriptFunction(
- "help.HelpPage.updateTargetChannel", base::StringValue(channel));
+ web_ui()->CallJavascriptFunctionUnsafe("help.HelpPage.updateTargetChannel",
+ base::StringValue(channel));
}
void HelpHandler::OnRegulatoryLabelDirFound(const base::FilePath& path) {
@@ -735,13 +735,13 @@ void HelpHandler::OnRegulatoryLabelDirFound(const base::FilePath& path) {
void HelpHandler::OnRegulatoryLabelImageFound(const base::FilePath& path) {
std::string url = std::string("chrome://") + chrome::kChromeOSAssetHost +
"/" + path.MaybeAsASCII();
- web_ui()->CallJavascriptFunction("help.HelpPage.setRegulatoryLabelPath",
- base::StringValue(url));
+ web_ui()->CallJavascriptFunctionUnsafe("help.HelpPage.setRegulatoryLabelPath",
+ base::StringValue(url));
}
void HelpHandler::OnRegulatoryLabelTextRead(const std::string& text) {
// Remove unnecessary whitespace.
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"help.HelpPage.setRegulatoryLabelText",
base::StringValue(base::CollapseWhitespaceASCII(text, true)));
}
« no previous file with comments | « chrome/browser/ui/webui/gcm_internals_ui.cc ('k') | chrome/browser/ui/webui/history_login_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698