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

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

Issue 874603002: NaCl: Simplify the plumbing for PPAPI's DevInterfacesEnabled flag (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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
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 "ppapi/native_client/src/trusted/plugin/service_runtime.h" 9 #include "ppapi/native_client/src/trusted/plugin/service_runtime.h"
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 NaClLog(LOG_ERROR, "ServiceRuntime::Start (subprocess create failed)\n"); 137 NaClLog(LOG_ERROR, "ServiceRuntime::Start (subprocess create failed)\n");
138 ErrorInfo error_info; 138 ErrorInfo error_info;
139 error_info.SetReport( 139 error_info.SetReport(
140 PP_NACL_ERROR_SEL_LDR_CREATE_LAUNCHER, 140 PP_NACL_ERROR_SEL_LDR_CREATE_LAUNCHER,
141 "ServiceRuntime: failed to create sel_ldr launcher"); 141 "ServiceRuntime: failed to create sel_ldr launcher");
142 ReportLoadError(error_info); 142 ReportLoadError(error_info);
143 pp::Module::Get()->core()->CallOnMainThread(0, callback, PP_ERROR_FAILED); 143 pp::Module::Get()->core()->CallOnMainThread(0, callback, PP_ERROR_FAILED);
144 return; 144 return;
145 } 145 }
146 146
147 bool enable_dev_interfaces =
148 GetNaClInterface()->DevInterfacesEnabled(pp_instance_);
149
150 GetNaClInterface()->LaunchSelLdr( 147 GetNaClInterface()->LaunchSelLdr(
151 pp_instance_, 148 pp_instance_,
152 PP_FromBool(main_service_runtime_), 149 PP_FromBool(main_service_runtime_),
153 params.url.c_str(), 150 params.url.c_str(),
154 &params.file_info, 151 &params.file_info,
155 PP_FromBool(uses_nonsfi_mode_), 152 PP_FromBool(uses_nonsfi_mode_),
156 PP_FromBool(enable_dev_interfaces),
157 params.process_type, 153 params.process_type,
158 &bootstrap_channel_, 154 &bootstrap_channel_,
159 callback.pp_completion_callback()); 155 callback.pp_completion_callback());
160 subprocess_.reset(tmp_subprocess.release()); 156 subprocess_.reset(tmp_subprocess.release());
161 } 157 }
162 158
163 bool ServiceRuntime::WaitForSelLdrStart() { 159 bool ServiceRuntime::WaitForSelLdrStart() {
164 // Time to wait on condvar (for browser to create a new sel_ldr process on 160 // Time to wait on condvar (for browser to create a new sel_ldr process on
165 // our behalf). Use 6 seconds to be *fairly* conservative. 161 // our behalf). Use 6 seconds to be *fairly* conservative.
166 // 162 //
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 NaClLog(4, "ServiceRuntime::~ServiceRuntime (this=%p)\n", 296 NaClLog(4, "ServiceRuntime::~ServiceRuntime (this=%p)\n",
301 static_cast<void*>(this)); 297 static_cast<void*>(this));
302 // We do this just in case Shutdown() was not called. 298 // We do this just in case Shutdown() was not called.
303 subprocess_.reset(NULL); 299 subprocess_.reset(NULL);
304 300
305 NaClCondVarDtor(&cond_); 301 NaClCondVarDtor(&cond_);
306 NaClMutexDtor(&mu_); 302 NaClMutexDtor(&mu_);
307 } 303 }
308 304
309 } // namespace plugin 305 } // namespace plugin
OLDNEW
« no previous file with comments | « ppapi/c/private/ppb_nacl_private.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698