Commit 83eb21c7 authored by Mike Dougherty's avatar Mike Dougherty Committed by Commit Bot

[iOS] Pass CallJavaScriptFunction |name| argument by const reference.

Bug: 936300
Change-Id: I54abbbc073841347b9afa0daa854d04a1fc2aa7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1539066
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Auto-Submit: Mike Dougherty <michaeldo@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#644516}
parent 342c2077
......@@ -61,7 +61,7 @@ bool FakeWebFrame::CallJavaScriptFunction(
}
bool FakeWebFrame::CallJavaScriptFunction(
std::string name,
const std::string& name,
const std::vector<base::Value>& parameters,
base::OnceCallback<void(const base::Value*)> callback,
base::TimeDelta timeout) {
......
......@@ -32,7 +32,7 @@ class FakeWebFrame : public WebFrame {
// |can_call_function_|. Will execute callback with value passed in to
// AddJsResultForFunctionCall(). If no such value exists, will pass null.
bool CallJavaScriptFunction(
std::string name,
const std::string& name,
const std::vector<base::Value>& parameters,
base::OnceCallback<void(const base::Value*)> callback,
base::TimeDelta timeout) override;
......
......@@ -56,7 +56,7 @@ class WebFrame : public base::SupportsUserData {
// may still fail even if this function returns true. Always returns false if
// |CanCallJavaScriptFunction| is false.
virtual bool CallJavaScriptFunction(
std::string name,
const std::string& name,
const std::vector<base::Value>& parameters,
base::OnceCallback<void(const base::Value*)> callback,
base::TimeDelta timeout) = 0;
......
......@@ -50,7 +50,7 @@ class WebFrameImpl : public WebFrame, public web::WebStateObserver {
const std::string& name,
const std::vector<base::Value>& parameters) override;
bool CallJavaScriptFunction(
std::string name,
const std::string& name,
const std::vector<base::Value>& parameters,
base::OnceCallback<void(const base::Value*)> callback,
base::TimeDelta timeout) override;
......
......@@ -144,7 +144,7 @@ bool WebFrameImpl::CallJavaScriptFunction(
}
bool WebFrameImpl::CallJavaScriptFunction(
std::string name,
const std::string& name,
const std::vector<base::Value>& parameters,
base::OnceCallback<void(const base::Value*)> callback,
base::TimeDelta timeout) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment