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

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

Issue 133073005: Trusted plugin: Break up InitCommunication(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove nacl_desc if check, use CHECK() instead. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ppapi/native_client/src/trusted/plugin/service_runtime.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* -*- c++ -*- */ 1 /* -*- c++ -*- */
2 /* 2 /*
3 * Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 * Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 // A class containing information regarding a socket connection to a 8 // A class containing information regarding a socket connection to a
9 // service runtime instance. 9 // service runtime instance.
10 10
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 void set_exit_status(int exit_status); 269 void set_exit_status(int exit_status);
270 270
271 nacl::string GetCrashLogOutput(); 271 nacl::string GetCrashLogOutput();
272 272
273 // To establish quota callbacks the pnacl coordinator needs to communicate 273 // To establish quota callbacks the pnacl coordinator needs to communicate
274 // with the reverse interface. 274 // with the reverse interface.
275 PluginReverseInterface* rev_interface() const { return rev_interface_; } 275 PluginReverseInterface* rev_interface() const { return rev_interface_; }
276 276
277 private: 277 private:
278 NACL_DISALLOW_COPY_AND_ASSIGN(ServiceRuntime); 278 NACL_DISALLOW_COPY_AND_ASSIGN(ServiceRuntime);
279 bool InitCommunication(nacl::DescWrapper* shm, ErrorInfo* error_info); 279 bool LoadModule(nacl::DescWrapper* shm, ErrorInfo* error_info);
280 bool InitReverseService(ErrorInfo* error_info);
281 bool StartModule(ErrorInfo* error_info);
280 282
281 NaClSrpcChannel command_channel_; 283 NaClSrpcChannel command_channel_;
282 Plugin* plugin_; 284 Plugin* plugin_;
283 bool main_service_runtime_; 285 bool main_service_runtime_;
284 nacl::ReverseService* reverse_service_; 286 nacl::ReverseService* reverse_service_;
285 nacl::scoped_ptr<nacl::SelLdrLauncherBase> subprocess_; 287 nacl::scoped_ptr<nacl::SelLdrLauncherBase> subprocess_;
286 288
287 nacl::WeakRefAnchor* anchor_; 289 nacl::WeakRefAnchor* anchor_;
288 290
289 PluginReverseInterface* rev_interface_; 291 PluginReverseInterface* rev_interface_;
290 292
291 // Mutex to protect exit_status_. 293 // Mutex to protect exit_status_.
292 // Also, in conjunction with cond_ it is used to signal when 294 // Also, in conjunction with cond_ it is used to signal when
293 // StartSelLdr is complete with either success or error. 295 // StartSelLdr is complete with either success or error.
294 NaClMutex mu_; 296 NaClMutex mu_;
295 NaClCondVar cond_; 297 NaClCondVar cond_;
296 int exit_status_; 298 int exit_status_;
297 bool start_sel_ldr_done_; 299 bool start_sel_ldr_done_;
298 }; 300 };
299 301
300 } // namespace plugin 302 } // namespace plugin
301 303
302 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ 304 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_
OLDNEW
« no previous file with comments | « no previous file | ppapi/native_client/src/trusted/plugin/service_runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698