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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/service_runtime.cc

Issue 10824033: Coverity: Fix several pass-by-values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win build fix. Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #define NACL_LOG_MODULE_NAME "Plugin::ServiceRuntime" 7 #define NACL_LOG_MODULE_NAME "Plugin::ServiceRuntime"
8 8
9 #include "native_client/src/trusted/plugin/service_runtime.h" 9 #include "native_client/src/trusted/plugin/service_runtime.h"
10 10
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 PLUGIN_PRINTF(("ServiceRuntime::SetupAppChannel (conect_desc=%p)\n", 674 PLUGIN_PRINTF(("ServiceRuntime::SetupAppChannel (conect_desc=%p)\n",
675 static_cast<void*>(connect_desc))); 675 static_cast<void*>(connect_desc)));
676 SrpcClient* srpc_client = SrpcClient::New(connect_desc); 676 SrpcClient* srpc_client = SrpcClient::New(connect_desc);
677 PLUGIN_PRINTF(("ServiceRuntime::SetupAppChannel (srpc_client=%p)\n", 677 PLUGIN_PRINTF(("ServiceRuntime::SetupAppChannel (srpc_client=%p)\n",
678 static_cast<void*>(srpc_client))); 678 static_cast<void*>(srpc_client)));
679 delete connect_desc; 679 delete connect_desc;
680 return srpc_client; 680 return srpc_client;
681 } 681 }
682 } 682 }
683 683
684 bool ServiceRuntime::Log(int severity, nacl::string msg) { 684 bool ServiceRuntime::Log(int severity, const nacl::string& msg) {
685 NaClSrpcResultCodes rpc_result = 685 NaClSrpcResultCodes rpc_result =
686 NaClSrpcInvokeBySignature(&command_channel_, 686 NaClSrpcInvokeBySignature(&command_channel_,
687 "log:is:", 687 "log:is:",
688 severity, 688 severity,
689 strdup(msg.c_str())); 689 strdup(msg.c_str()));
690 return (NACL_SRPC_RESULT_OK == rpc_result); 690 return (NACL_SRPC_RESULT_OK == rpc_result);
691 } 691 }
692 692
693 void ServiceRuntime::Shutdown() { 693 void ServiceRuntime::Shutdown() {
694 rev_interface_->ShutDown(); 694 rev_interface_->ShutDown();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 744
745 nacl::string ServiceRuntime::GetCrashLogOutput() { 745 nacl::string ServiceRuntime::GetCrashLogOutput() {
746 if (NULL != subprocess_.get()) { 746 if (NULL != subprocess_.get()) {
747 return subprocess_->GetCrashLogOutput(); 747 return subprocess_->GetCrashLogOutput();
748 } else { 748 } else {
749 return ""; 749 return "";
750 } 750 }
751 } 751 }
752 752
753 } // namespace plugin 753 } // namespace plugin
OLDNEW
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/service_runtime.h ('k') | sandbox/win/src/process_thread_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698