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

Side by Side Diff: services/shell/runner/host/child_process_host.cc

Issue 2031693002: Migrate WaitableEvent to enum-based constructor in services/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: Created 4 years, 6 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
« no previous file with comments | « services/shell/runner/host/child_process_base.cc ('k') | services/shell/standalone/tracer.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/shell/runner/host/child_process_host.h" 5 #include "services/shell/runner/host/child_process_host.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 ChildProcessHost::ChildProcessHost(base::TaskRunner* launch_process_runner, 43 ChildProcessHost::ChildProcessHost(base::TaskRunner* launch_process_runner,
44 NativeRunnerDelegate* delegate, 44 NativeRunnerDelegate* delegate,
45 bool start_sandboxed, 45 bool start_sandboxed,
46 const Identity& target, 46 const Identity& target,
47 const base::FilePath& app_path) 47 const base::FilePath& app_path)
48 : launch_process_runner_(launch_process_runner), 48 : launch_process_runner_(launch_process_runner),
49 delegate_(delegate), 49 delegate_(delegate),
50 start_sandboxed_(start_sandboxed), 50 start_sandboxed_(start_sandboxed),
51 target_(target), 51 target_(target),
52 app_path_(app_path), 52 app_path_(app_path),
53 start_child_process_event_(false, false), 53 start_child_process_event_(
54 weak_factory_(this) { 54 base::WaitableEvent::ResetPolicy::AUTOMATIC,
55 } 55 base::WaitableEvent::InitialState::NOT_SIGNALED),
56 weak_factory_(this) {}
56 57
57 ChildProcessHost::~ChildProcessHost() { 58 ChildProcessHost::~ChildProcessHost() {
58 if (!app_path_.empty()) { 59 if (!app_path_.empty()) {
59 CHECK(!mojo_ipc_channel_) 60 CHECK(!mojo_ipc_channel_)
60 << "Destroying ChildProcessHost before calling Join"; 61 << "Destroying ChildProcessHost before calling Join";
61 } 62 }
62 } 63 }
63 64
64 mojom::ShellClientPtr ChildProcessHost::Start( 65 mojom::ShellClientPtr ChildProcessHost::Start(
65 const Identity& target, 66 const Identity& target,
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 mojo::edk::ChildProcessLaunched( 202 mojo::edk::ChildProcessLaunched(
202 child_process_.Handle(), 203 child_process_.Handle(),
203 mojo::edk::ScopedPlatformHandle(mojo::edk::PlatformHandle( 204 mojo::edk::ScopedPlatformHandle(mojo::edk::PlatformHandle(
204 mojo_ipc_channel_->PassServerHandle().release().handle))); 205 mojo_ipc_channel_->PassServerHandle().release().handle)));
205 } 206 }
206 } 207 }
207 start_child_process_event_.Signal(); 208 start_child_process_event_.Signal();
208 } 209 }
209 210
210 } // namespace shell 211 } // namespace shell
OLDNEW
« no previous file with comments | « services/shell/runner/host/child_process_base.cc ('k') | services/shell/standalone/tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698