OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file implements the Windows service controlling Me2Me host processes | 5 // This file implements the Windows service controlling Me2Me host processes |
6 // running within user sessions. | 6 // running within user sessions. |
7 | 7 |
8 #include "remoting/host/win/wts_session_process_delegate.h" | 8 #include "remoting/host/win/wts_session_process_delegate.h" |
9 | 9 |
10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 // copying known switches from the caller's command line. | 250 // copying known switches from the caller's command line. |
251 command_line.SetProgram(daemon_binary); | 251 command_line.SetProgram(daemon_binary); |
252 command_line.AppendSwitchPath(kElevateSwitchName, binary_path_); | 252 command_line.AppendSwitchPath(kElevateSwitchName, binary_path_); |
253 | 253 |
254 CHECK(ResetEvent(process_exit_event_)); | 254 CHECK(ResetEvent(process_exit_event_)); |
255 } else { | 255 } else { |
256 command_line.SetProgram(binary_path_); | 256 command_line.SetProgram(binary_path_); |
257 } | 257 } |
258 | 258 |
259 // Create the server end of the IPC channel. | 259 // Create the server end of the IPC channel. |
260 std::string channel_name = GenerateIpcChannelName(this); | 260 std::string channel_name = IPC::Channel::GenerateUniqueRandomChannelID(); |
261 ScopedHandle pipe; | 261 ScopedHandle pipe; |
262 if (!CreateIpcChannel(channel_name, channel_security_, &pipe)) | 262 if (!CreateIpcChannel(channel_name, channel_security_, &pipe)) |
263 return false; | 263 return false; |
264 | 264 |
265 // Wrap the pipe into an IPC channel. | 265 // Wrap the pipe into an IPC channel. |
266 scoped_ptr<IPC::ChannelProxy> channel(new IPC::ChannelProxy( | 266 scoped_ptr<IPC::ChannelProxy> channel(new IPC::ChannelProxy( |
267 IPC::ChannelHandle(pipe), | 267 IPC::ChannelHandle(pipe), |
268 IPC::Channel::MODE_SERVER, | 268 IPC::Channel::MODE_SERVER, |
269 delegate, | 269 delegate, |
270 io_task_runner_)); | 270 io_task_runner_)); |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 bool WtsSessionProcessDelegate::LaunchProcess( | 520 bool WtsSessionProcessDelegate::LaunchProcess( |
521 IPC::Listener* delegate, | 521 IPC::Listener* delegate, |
522 base::win::ScopedHandle* process_exit_event_out) { | 522 base::win::ScopedHandle* process_exit_event_out) { |
523 if (!core_) | 523 if (!core_) |
524 return false; | 524 return false; |
525 | 525 |
526 return core_->LaunchProcess(delegate, process_exit_event_out); | 526 return core_->LaunchProcess(delegate, process_exit_event_out); |
527 } | 527 } |
528 | 528 |
529 } // namespace remoting | 529 } // namespace remoting |
OLD | NEW |