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

Unified Diff: components/dom_distiller/webui/dom_distiller_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: components/dom_distiller/webui/dom_distiller_handler.cc
diff --git a/components/dom_distiller/webui/dom_distiller_handler.cc b/components/dom_distiller/webui/dom_distiller_handler.cc
index 4fdf081a0a2b0e07651ac8eee7c3df4c7b260d3a..e0c090686df72890f462a0094cd657265b4e2003 100644
--- a/components/dom_distiller/webui/dom_distiller_handler.cc
+++ b/components/dom_distiller/webui/dom_distiller_handler.cc
@@ -70,7 +70,7 @@ void DomDistillerHandler::HandleAddArticle(const base::ListValue* args) {
base::Bind(base::Bind(&DomDistillerHandler::OnArticleAdded,
base::Unretained(this))));
} else {
- web_ui()->CallJavascriptFunction("domDistiller.onArticleAddFailed");
+ web_ui()->CallJavascriptFunctionUnsafe("domDistiller.onArticleAddFailed");
}
}
@@ -83,7 +83,7 @@ void DomDistillerHandler::HandleViewUrl(const base::ListValue* args) {
ui::PAGE_TRANSITION_GENERATED,
std::string());
} else {
- web_ui()->CallJavascriptFunction("domDistiller.onViewUrlFailed");
+ web_ui()->CallJavascriptFunctionUnsafe("domDistiller.onViewUrlFailed");
}
}
@@ -117,7 +117,8 @@ void DomDistillerHandler::HandleRequestEntries(const base::ListValue* args) {
entries.Append(entry.release());
}
// TODO(nyquist): Write a test that ensures we sanitize the data we send.
- web_ui()->CallJavascriptFunction("domDistiller.onReceivedEntries", entries);
+ web_ui()->CallJavascriptFunctionUnsafe("domDistiller.onReceivedEntries",
+ entries);
}
void DomDistillerHandler::OnArticleAdded(bool article_available) {
@@ -125,7 +126,7 @@ void DomDistillerHandler::OnArticleAdded(bool article_available) {
if (article_available) {
HandleRequestEntries(NULL);
} else {
- web_ui()->CallJavascriptFunction("domDistiller.onArticleAddFailed");
+ web_ui()->CallJavascriptFunctionUnsafe("domDistiller.onArticleAddFailed");
}
}
« no previous file with comments | « chrome/test/data/webui/async_gen.cc ('k') | components/proximity_auth/webui/proximity_auth_webui_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698