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

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, 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/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 be78905744bdf628d4d7a4547c87b1826a9356e3..9357475e68ad62e1b73cad13ec8613bd35ac3e9b 100644
--- a/chrome/browser/ui/webui/snippets_internals_message_handler.cc
+++ b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
@@ -68,7 +68,7 @@ void SnippetsInternalsMessageHandler::NTPSnippetsServiceLoaded() {
SendSnippets();
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"chrome.SnippetsInternals.receiveJson",
base::StringValue(
ntp_snippets_service_->snippets_fetcher()->last_json()));
@@ -146,7 +146,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()));
@@ -178,8 +178,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();
@@ -196,7 +196,7 @@ void SnippetsInternalsMessageHandler::SendDiscardedSnippets() {
base::DictionaryValue result;
result.Set("list", std::move(snippets_list));
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"chrome.SnippetsInternals.receiveDiscardedSnippets", result);
}
@@ -214,8 +214,8 @@ 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::SendBoolean(const std::string& name,
@@ -228,6 +228,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);
}
« no previous file with comments | « chrome/browser/ui/webui/signin_internals_ui.cc ('k') | chrome/browser/ui/webui/supervised_user_internals_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698