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

Unified Diff: chrome/browser/ui/webui/popular_sites_internals_message_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, 7 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/popular_sites_internals_message_handler.cc
diff --git a/chrome/browser/ui/webui/popular_sites_internals_message_handler.cc b/chrome/browser/ui/webui/popular_sites_internals_message_handler.cc
index e566aa82043a83860f2962e4dfa33f9b5eb72331..3c4fc3fe2765b41c7d93acfe429698fd14a67916 100644
--- a/chrome/browser/ui/webui/popular_sites_internals_message_handler.cc
+++ b/chrome/browser/ui/webui/popular_sites_internals_message_handler.cc
@@ -131,14 +131,14 @@ void PopularSitesInternalsMessageHandler::SendOverrides() {
prefs->GetString(ntp_tiles::prefs::kPopularSitesOverrideCountry);
std::string version =
prefs->GetString(ntp_tiles::prefs::kPopularSitesOverrideVersion);
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"chrome.popular_sites_internals.receiveOverrides",
base::StringValue(country), base::StringValue(version));
}
void PopularSitesInternalsMessageHandler::SendDownloadResult(bool success) {
base::StringValue result(success ? "Success" : "Fail");
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"chrome.popular_sites_internals.receiveDownloadResult", result);
}
@@ -155,13 +155,13 @@ void PopularSitesInternalsMessageHandler::SendSites() {
result.Set("sites", std::move(sites_list));
result.SetString("country", popular_sites_->GetCountry());
result.SetString("version", popular_sites_->GetVersion());
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"chrome.popular_sites_internals.receiveSites", result);
}
void PopularSitesInternalsMessageHandler::SendJson(const std::string& json) {
- web_ui()->CallJavascriptFunction("chrome.popular_sites_internals.receiveJson",
- base::StringValue(json));
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "chrome.popular_sites_internals.receiveJson", base::StringValue(json));
}
void PopularSitesInternalsMessageHandler::OnPopularSitesAvailable(

Powered by Google App Engine
This is Rietveld 408576698