diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-27 01:24:06 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-27 01:24:06 +0000 |
commit | 7feb8500ebed1895f08d9716afc092a10a2f7b07 (patch) | |
tree | ee94765b323327e3fd8dfc661335ea0ee065e009 /ppapi/native_client | |
parent | 79c266203684643750a573e431cdb0fc0af5d850 (diff) | |
download | chromium_src-7feb8500ebed1895f08d9716afc092a10a2f7b07.zip chromium_src-7feb8500ebed1895f08d9716afc092a10a2f7b07.tar.gz chromium_src-7feb8500ebed1895f08d9716afc092a10a2f7b07.tar.bz2 |
Coverity: Fix several pass-by-values.
CID_COUNT=8
CID=7757,8647,11476,16931,16932,100206,100577,102872
BUG=none
TEST=none
R=tbreisacher@chromium.org
TBR=brettw@chromium.org,kalman@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10824033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/native_client')
-rw-r--r-- | ppapi/native_client/src/trusted/plugin/plugin.h | 6 | ||||
-rw-r--r-- | ppapi/native_client/src/trusted/plugin/service_runtime.cc | 2 | ||||
-rw-r--r-- | ppapi/native_client/src/trusted/plugin/service_runtime.h | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.h b/ppapi/native_client/src/trusted/plugin/plugin.h index ce6df11..71ff290 100644 --- a/ppapi/native_client/src/trusted/plugin/plugin.h +++ b/ppapi/native_client/src/trusted/plugin/plugin.h @@ -202,11 +202,13 @@ class Plugin : public pp::InstancePrivate { // plugin_base_url is the URL used for resolving relative URLs used in // src="...". nacl::string plugin_base_url() const { return plugin_base_url_; } - void set_plugin_base_url(nacl::string url) { plugin_base_url_ = url; } + void set_plugin_base_url(const nacl::string& url) { plugin_base_url_ = url; } // manifest_base_url is the URL used for resolving relative URLs mentioned // in manifest files. If the manifest is a data URI, this is an empty string. nacl::string manifest_base_url() const { return manifest_base_url_; } - void set_manifest_base_url(nacl::string url) { manifest_base_url_ = url; } + void set_manifest_base_url(const nacl::string& url) { + manifest_base_url_ = url; + } // The URL of the manifest file as set by the "src" attribute. // It is not the fully resolved URL if it was set as relative. diff --git a/ppapi/native_client/src/trusted/plugin/service_runtime.cc b/ppapi/native_client/src/trusted/plugin/service_runtime.cc index 8f4fa8e..f58f0c5 100644 --- a/ppapi/native_client/src/trusted/plugin/service_runtime.cc +++ b/ppapi/native_client/src/trusted/plugin/service_runtime.cc @@ -699,7 +699,7 @@ SrpcClient* ServiceRuntime::SetupAppChannel() { } } -bool ServiceRuntime::Log(int severity, nacl::string msg) { +bool ServiceRuntime::Log(int severity, const nacl::string& msg) { NaClSrpcResultCodes rpc_result = NaClSrpcInvokeBySignature(&command_channel_, "log:is:", diff --git a/ppapi/native_client/src/trusted/plugin/service_runtime.h b/ppapi/native_client/src/trusted/plugin/service_runtime.h index 54829ef..38ade82 100644 --- a/ppapi/native_client/src/trusted/plugin/service_runtime.h +++ b/ppapi/native_client/src/trusted/plugin/service_runtime.h @@ -225,7 +225,7 @@ class ServiceRuntime { // Starts the application channel to the nexe. SrpcClient* SetupAppChannel(); - bool Log(int severity, nacl::string msg); + bool Log(int severity, const nacl::string& msg); Plugin* plugin() const { return plugin_; } void Shutdown(); |