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

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, 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/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 2b3455d033f8858969299b81a65804f68b7be20e..69e8c39b0f75f4e9139933a6e49630d5675b637c 100644
--- a/chrome/browser/ui/webui/popular_sites_internals_message_handler.cc
+++ b/chrome/browser/ui/webui/popular_sites_internals_message_handler.cc
@@ -132,14 +132,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);
}
@@ -156,13 +156,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(
« no previous file with comments | « chrome/browser/ui/webui/policy_ui_handler.cc ('k') | chrome/browser/ui/webui/predictors/predictors_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698