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/bind.h" | 10 #include "base/bind.h" |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 372 |
373 // Create the server end of the IPC channel. | 373 // Create the server end of the IPC channel. |
374 std::string channel_name = IPC::Channel::GenerateUniqueRandomChannelID(); | 374 std::string channel_name = IPC::Channel::GenerateUniqueRandomChannelID(); |
375 ScopedHandle pipe; | 375 ScopedHandle pipe; |
376 if (!CreateIpcChannel(channel_name, channel_security_, &pipe)) { | 376 if (!CreateIpcChannel(channel_name, channel_security_, &pipe)) { |
377 ReportFatalError(); | 377 ReportFatalError(); |
378 return; | 378 return; |
379 } | 379 } |
380 | 380 |
381 // Wrap the pipe into an IPC channel. | 381 // Wrap the pipe into an IPC channel. |
382 scoped_ptr<IPC::ChannelProxy> channel(new IPC::ChannelProxy( | 382 scoped_ptr<IPC::ChannelProxy> channel( |
383 IPC::ChannelHandle(pipe), | 383 IPC::ChannelProxy::Create(IPC::ChannelHandle(pipe), |
384 IPC::Channel::MODE_SERVER, | 384 IPC::Channel::MODE_SERVER, |
385 this, | 385 this, |
386 io_task_runner_)); | 386 io_task_runner_)); |
387 | 387 |
388 // Pass the name of the IPC channel to use. | 388 // Pass the name of the IPC channel to use. |
389 command_line.AppendSwitchNative(kDaemonPipeSwitchName, | 389 command_line.AppendSwitchNative(kDaemonPipeSwitchName, |
390 base::UTF8ToWide(channel_name)); | 390 base::UTF8ToWide(channel_name)); |
391 | 391 |
392 // Try to launch the process. | 392 // Try to launch the process. |
393 ScopedHandle worker_process; | 393 ScopedHandle worker_process; |
394 ScopedHandle worker_thread; | 394 ScopedHandle worker_thread; |
395 if (!LaunchProcessWithToken(command_line.GetProgram(), | 395 if (!LaunchProcessWithToken(command_line.GetProgram(), |
396 command_line.GetCommandLineString(), | 396 command_line.GetCommandLineString(), |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 | 558 |
559 void WtsSessionProcessDelegate::CloseChannel() { | 559 void WtsSessionProcessDelegate::CloseChannel() { |
560 core_->CloseChannel(); | 560 core_->CloseChannel(); |
561 } | 561 } |
562 | 562 |
563 void WtsSessionProcessDelegate::KillProcess() { | 563 void WtsSessionProcessDelegate::KillProcess() { |
564 core_->KillProcess(); | 564 core_->KillProcess(); |
565 } | 565 } |
566 | 566 |
567 } // namespace remoting | 567 } // namespace remoting |
OLD | NEW |