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

Unified Diff: chrome/browser/ui/webui/snippets_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/snippets_internals_message_handler.cc
diff --git a/chrome/browser/ui/webui/snippets_internals_message_handler.cc b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
index 1f1001a294ada5aeeea99aaa9ba4c1b1ab006b1f..e2ae823b4d5f6c00249ed611cb272d79b1fe1a16 100644
--- a/chrome/browser/ui/webui/snippets_internals_message_handler.cc
+++ b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
@@ -72,7 +72,7 @@ void SnippetsInternalsMessageHandler::NTPSnippetsServiceLoaded() {
SendSnippets();
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"chrome.SnippetsInternals.receiveJson",
base::StringValue(
ntp_snippets_service_->snippets_fetcher()->last_json()));
@@ -166,7 +166,7 @@ void SnippetsInternalsMessageHandler::SendInitialData() {
SendBoolean("flag-snippets", base::FeatureList::IsEnabled(
chrome::android::kNTPSnippetsFeature));
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"chrome.SnippetsInternals.setHostRestricted",
base::FundamentalValue(
ntp_snippets_service_->snippets_fetcher()->UsesHostRestrictions()));
@@ -198,8 +198,8 @@ void SnippetsInternalsMessageHandler::SendSnippets() {
base::DictionaryValue result;
result.Set("list", std::move(snippets_list));
- web_ui()->CallJavascriptFunction("chrome.SnippetsInternals.receiveSnippets",
- result);
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "chrome.SnippetsInternals.receiveSnippets", result);
const std::string& status =
ntp_snippets_service_->snippets_fetcher()->last_status();
@@ -216,7 +216,7 @@ void SnippetsInternalsMessageHandler::SendDiscardedSnippets() {
base::DictionaryValue result;
result.Set("list", std::move(snippets_list));
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"chrome.SnippetsInternals.receiveDiscardedSnippets", result);
}
@@ -234,12 +234,12 @@ void SnippetsInternalsMessageHandler::SendHosts() {
base::DictionaryValue result;
result.Set("list", std::move(hosts_list));
- web_ui()->CallJavascriptFunction("chrome.SnippetsInternals.receiveHosts",
- result);
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "chrome.SnippetsInternals.receiveHosts", result);
}
void SnippetsInternalsMessageHandler::SendJson(const std::string& json) {
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"chrome.SnippetsInternals.receiveJsonToDownload",
base::StringValue(json));
}
@@ -254,6 +254,6 @@ void SnippetsInternalsMessageHandler::SendString(const std::string& name,
base::StringValue string_name(name);
base::StringValue string_value(value);
- web_ui()->CallJavascriptFunction("chrome.SnippetsInternals.receiveProperty",
- string_name, string_value);
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "chrome.SnippetsInternals.receiveProperty", string_name, string_value);
}

Powered by Google App Engine
This is Rietveld 408576698