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

Unified Diff: content/browser/webui/web_ui_impl.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
« no previous file with comments | « content/browser/webui/web_ui_impl.h ('k') | content/public/browser/web_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webui/web_ui_impl.cc
diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui_impl.cc
index 41fc037852c786645705881beed7ad9ca6d0e0fa..e781634679a06d7d1282fbc14b0e63bf0ed29b0a 100644
--- a/content/browser/webui/web_ui_impl.cc
+++ b/content/browser/webui/web_ui_impl.cc
@@ -154,23 +154,23 @@ bool WebUIImpl::CanCallJavascript() {
target_frame->GetLastCommittedURL().spec() == url::kAboutBlankURL);
}
-void WebUIImpl::CallJavascriptFunction(const std::string& function_name) {
+void WebUIImpl::CallJavascriptFunctionUnsafe(const std::string& function_name) {
DCHECK(base::IsStringASCII(function_name));
base::string16 javascript = base::ASCIIToUTF16(function_name + "();");
ExecuteJavascript(javascript);
}
-void WebUIImpl::CallJavascriptFunction(const std::string& function_name,
- const base::Value& arg) {
+void WebUIImpl::CallJavascriptFunctionUnsafe(const std::string& function_name,
+ const base::Value& arg) {
DCHECK(base::IsStringASCII(function_name));
std::vector<const base::Value*> args;
args.push_back(&arg);
ExecuteJavascript(GetJavascriptCall(function_name, args));
}
-void WebUIImpl::CallJavascriptFunction(
- const std::string& function_name,
- const base::Value& arg1, const base::Value& arg2) {
+void WebUIImpl::CallJavascriptFunctionUnsafe(const std::string& function_name,
+ const base::Value& arg1,
+ const base::Value& arg2) {
DCHECK(base::IsStringASCII(function_name));
std::vector<const base::Value*> args;
args.push_back(&arg1);
@@ -178,9 +178,10 @@ void WebUIImpl::CallJavascriptFunction(
ExecuteJavascript(GetJavascriptCall(function_name, args));
}
-void WebUIImpl::CallJavascriptFunction(
- const std::string& function_name,
- const base::Value& arg1, const base::Value& arg2, const base::Value& arg3) {
+void WebUIImpl::CallJavascriptFunctionUnsafe(const std::string& function_name,
+ const base::Value& arg1,
+ const base::Value& arg2,
+ const base::Value& arg3) {
DCHECK(base::IsStringASCII(function_name));
std::vector<const base::Value*> args;
args.push_back(&arg1);
@@ -189,12 +190,11 @@ void WebUIImpl::CallJavascriptFunction(
ExecuteJavascript(GetJavascriptCall(function_name, args));
}
-void WebUIImpl::CallJavascriptFunction(
- const std::string& function_name,
- const base::Value& arg1,
- const base::Value& arg2,
- const base::Value& arg3,
- const base::Value& arg4) {
+void WebUIImpl::CallJavascriptFunctionUnsafe(const std::string& function_name,
+ const base::Value& arg1,
+ const base::Value& arg2,
+ const base::Value& arg3,
+ const base::Value& arg4) {
DCHECK(base::IsStringASCII(function_name));
std::vector<const base::Value*> args;
args.push_back(&arg1);
@@ -204,7 +204,7 @@ void WebUIImpl::CallJavascriptFunction(
ExecuteJavascript(GetJavascriptCall(function_name, args));
}
-void WebUIImpl::CallJavascriptFunction(
+void WebUIImpl::CallJavascriptFunctionUnsafe(
const std::string& function_name,
const std::vector<const base::Value*>& args) {
DCHECK(base::IsStringASCII(function_name));
« no previous file with comments | « content/browser/webui/web_ui_impl.h ('k') | content/public/browser/web_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698