| 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 <utility> | 10 #include <utility> |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 ReportFatalError(); | 380 ReportFatalError(); |
| 381 return; | 381 return; |
| 382 } | 382 } |
| 383 | 383 |
| 384 // Wrap the pipe into an IPC channel. | 384 // Wrap the pipe into an IPC channel. |
| 385 std::unique_ptr<IPC::ChannelProxy> channel( | 385 std::unique_ptr<IPC::ChannelProxy> channel( |
| 386 new IPC::ChannelProxy(this, io_task_runner_)); | 386 new IPC::ChannelProxy(this, io_task_runner_)); |
| 387 IPC::AttachmentBroker::GetGlobal()->RegisterCommunicationChannel( | 387 IPC::AttachmentBroker::GetGlobal()->RegisterCommunicationChannel( |
| 388 channel.get(), io_task_runner_); | 388 channel.get(), io_task_runner_); |
| 389 channel->Init(IPC::ChannelHandle(pipe.Get()), IPC::Channel::MODE_SERVER, | 389 channel->Init(IPC::ChannelHandle(pipe.Get()), IPC::Channel::MODE_SERVER, |
| 390 true); | 390 /*create_pipe_now=*/true); |
| 391 | 391 |
| 392 // Pass the name of the IPC channel to use. | 392 // Pass the name of the IPC channel to use. |
| 393 command_line.AppendSwitchNative(kDaemonPipeSwitchName, | 393 command_line.AppendSwitchNative(kDaemonPipeSwitchName, |
| 394 base::UTF8ToWide(channel_name)); | 394 base::UTF8ToWide(channel_name)); |
| 395 | 395 |
| 396 // Try to launch the process. | 396 // Try to launch the process. |
| 397 ScopedHandle worker_process; | 397 ScopedHandle worker_process; |
| 398 ScopedHandle worker_thread; | 398 ScopedHandle worker_thread; |
| 399 if (!LaunchProcessWithToken(command_line.GetProgram(), | 399 if (!LaunchProcessWithToken(command_line.GetProgram(), |
| 400 command_line.GetCommandLineString(), | 400 command_line.GetCommandLineString(), |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 | 553 |
| 554 void WtsSessionProcessDelegate::CloseChannel() { | 554 void WtsSessionProcessDelegate::CloseChannel() { |
| 555 core_->CloseChannel(); | 555 core_->CloseChannel(); |
| 556 } | 556 } |
| 557 | 557 |
| 558 void WtsSessionProcessDelegate::KillProcess() { | 558 void WtsSessionProcessDelegate::KillProcess() { |
| 559 core_->KillProcess(); | 559 core_->KillProcess(); |
| 560 } | 560 } |
| 561 | 561 |
| 562 } // namespace remoting | 562 } // namespace remoting |
| OLD | NEW |