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

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

Issue 2571603002: Makes wait-for-debugger=content_browser work for mash (Closed)
Patch Set: merge Created 4 years 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/service_manager/runner/common/switches.cc ('k') | no next file » | 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/service_manager/runner/host/child_process_host.h" 5 #include "services/service_manager/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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 DCHECK(!child_process_.IsValid()); 74 DCHECK(!child_process_.IsValid());
75 75
76 const base::CommandLine& parent_command_line = 76 const base::CommandLine& parent_command_line =
77 *base::CommandLine::ForCurrentProcess(); 77 *base::CommandLine::ForCurrentProcess();
78 78
79 std::unique_ptr<base::CommandLine> child_command_line( 79 std::unique_ptr<base::CommandLine> child_command_line(
80 new base::CommandLine(service_path_)); 80 new base::CommandLine(service_path_));
81 81
82 child_command_line->AppendArguments(parent_command_line, false); 82 child_command_line->AppendArguments(parent_command_line, false);
83 83
84 child_command_line->AppendSwitchASCII(::switches::kProcessServiceName,
85 target.name());
84 #ifndef NDEBUG 86 #ifndef NDEBUG
85 child_command_line->AppendSwitchASCII("n", target.name());
86 child_command_line->AppendSwitchASCII("u", target.user_id()); 87 child_command_line->AppendSwitchASCII("u", target.user_id());
87 #endif 88 #endif
88 89
89 if (start_sandboxed_) 90 if (start_sandboxed_)
90 child_command_line->AppendSwitch(::switches::kEnableSandbox); 91 child_command_line->AppendSwitch(::switches::kEnableSandbox);
91 92
92 mojo_ipc_channel_.reset(new mojo::edk::PlatformChannelPair); 93 mojo_ipc_channel_.reset(new mojo::edk::PlatformChannelPair);
93 mojo_ipc_channel_->PrepareToPassClientHandleToChildProcess( 94 mojo_ipc_channel_->PrepareToPassClientHandleToChildProcess(
94 child_command_line.get(), &handle_passing_info_); 95 child_command_line.get(), &handle_passing_info_);
95 96
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 child_process_.Handle(), 224 child_process_.Handle(),
224 mojo::edk::ScopedPlatformHandle(mojo::edk::PlatformHandle( 225 mojo::edk::ScopedPlatformHandle(mojo::edk::PlatformHandle(
225 mojo_ipc_channel_->PassServerHandle().release().handle)), 226 mojo_ipc_channel_->PassServerHandle().release().handle)),
226 child_token_); 227 child_token_);
227 } 228 }
228 } 229 }
229 start_child_process_event_.Signal(); 230 start_child_process_event_.Signal();
230 } 231 }
231 232
232 } // namespace service_manager 233 } // namespace service_manager
OLDNEW
« no previous file with comments | « services/service_manager/runner/common/switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698