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

Unified Diff: chrome/browser/ui/webui/ntp/favicon_webui_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/ntp/app_launcher_handler.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/favicon_webui_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc b/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc
index 1464b0750549dac6b83b03fb57efcb337fb4f7c4..ee577b376f701c5f65d8cf30d7d62eeedd437f42 100644
--- a/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc
+++ b/chrome/browser/ui/webui/ntp/favicon_webui_handler.cc
@@ -110,8 +110,8 @@ void FaviconWebUIHandler::HandleGetFaviconDominantColor(
base::StringValue dom_id_value(dom_id);
std::unique_ptr<base::StringValue> color(
SkColorToCss(prepopulated_page.color));
- web_ui()->CallJavascriptFunction("ntp.setFaviconDominantColor",
- dom_id_value, *color);
+ web_ui()->CallJavascriptFunctionUnsafe("ntp.setFaviconDominantColor",
+ dom_id_value, *color);
return;
}
}
@@ -139,8 +139,8 @@ void FaviconWebUIHandler::OnFaviconDataAvailable(
color_value.reset(new base::StringValue("#919191"));
base::StringValue dom_id(dom_id_map_[id]);
- web_ui()->CallJavascriptFunction("ntp.setFaviconDominantColor",
- dom_id, *color_value);
+ web_ui()->CallJavascriptFunctionUnsafe("ntp.setFaviconDominantColor", dom_id,
+ *color_value);
dom_id_map_.erase(id);
}
@@ -170,6 +170,6 @@ void FaviconWebUIHandler::NotifyAppIconReady(const std::string& extension_id) {
std::unique_ptr<base::StringValue> color_value(
GetDominantColorCssString(bits_mem));
base::StringValue id(extension_id);
- web_ui()->CallJavascriptFunction(
- "ntp.setFaviconDominantColor", id, *color_value);
+ web_ui()->CallJavascriptFunctionUnsafe("ntp.setFaviconDominantColor", id,
+ *color_value);
}
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698