OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |