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

Unified Diff: chrome/browser/ui/webui/options/chromeos/power_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
Index: chrome/browser/ui/webui/options/chromeos/power_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/power_handler.cc b/chrome/browser/ui/webui/options/chromeos/power_handler.cc
index 5883309d6c469751fc7f9c19bc8a7f097ae7e683..97c0f963ab94056fdec22a5c7679e2aeaabda6e2 100644
--- a/chrome/browser/ui/webui/options/chromeos/power_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/power_handler.cc
@@ -80,7 +80,7 @@ void PowerHandler::RegisterMessages() {
}
void PowerHandler::OnPowerStatusChanged() {
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"options.PowerOverlay.setBatteryStatusText",
base::StringValue(GetStatusValue()));
UpdatePowerSources();
@@ -158,9 +158,8 @@ void PowerHandler::UpdatePowerSources() {
sources_list.Append(dict.release());
}
- web_ui()->CallJavascriptFunction(
- "options.PowerOverlay.setPowerSources",
- sources_list,
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "options.PowerOverlay.setPowerSources", sources_list,
base::StringValue(status->GetCurrentPowerSourceID()),
base::FundamentalValue(status->IsUsbChargerConnected()),
base::FundamentalValue(status->IsBatteryTimeBeingCalculated()));
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/pointer_handler.cc ('k') | chrome/browser/ui/webui/options/chromeos/proxy_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698