| 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 <memory> | 10 #include <memory> |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 } | 392 } |
| 393 | 393 |
| 394 std::string mojo_pipe_token = mojo::edk::GenerateRandomToken(); | 394 std::string mojo_pipe_token = mojo::edk::GenerateRandomToken(); |
| 395 broker_client_invitation_ = | 395 broker_client_invitation_ = |
| 396 base::MakeUnique<mojo::edk::OutgoingBrokerClientInvitation>(); | 396 base::MakeUnique<mojo::edk::OutgoingBrokerClientInvitation>(); |
| 397 std::unique_ptr<IPC::ChannelProxy> channel = IPC::ChannelProxy::Create( | 397 std::unique_ptr<IPC::ChannelProxy> channel = IPC::ChannelProxy::Create( |
| 398 broker_client_invitation_->AttachMessagePipe(mojo_pipe_token).release(), | 398 broker_client_invitation_->AttachMessagePipe(mojo_pipe_token).release(), |
| 399 IPC::Channel::MODE_SERVER, this, io_task_runner_); | 399 IPC::Channel::MODE_SERVER, this, io_task_runner_); |
| 400 command_line.AppendSwitchASCII(kMojoPipeToken, mojo_pipe_token); | 400 command_line.AppendSwitchASCII(kMojoPipeToken, mojo_pipe_token); |
| 401 | 401 |
| 402 event_handler_->AppendSwitches(&command_line); |
| 403 |
| 402 std::unique_ptr<mojo::edk::PlatformChannelPair> normal_mojo_channel; | 404 std::unique_ptr<mojo::edk::PlatformChannelPair> normal_mojo_channel; |
| 403 std::unique_ptr<mojo::edk::NamedPlatformChannelPair> elevated_mojo_channel; | 405 std::unique_ptr<mojo::edk::NamedPlatformChannelPair> elevated_mojo_channel; |
| 404 base::HandlesToInheritVector handles_to_inherit; | 406 base::HandlesToInheritVector handles_to_inherit; |
| 405 if (launch_elevated_) { | 407 if (launch_elevated_) { |
| 406 // Pass the name of the IPC channel to use. | 408 // Pass the name of the IPC channel to use. |
| 407 mojo::edk::NamedPlatformChannelPair::Options options; | 409 mojo::edk::NamedPlatformChannelPair::Options options; |
| 408 options.security_descriptor = base::UTF8ToUTF16(channel_security_); | 410 options.security_descriptor = base::UTF8ToUTF16(channel_security_); |
| 409 elevated_mojo_channel = | 411 elevated_mojo_channel = |
| 410 base::MakeUnique<mojo::edk::NamedPlatformChannelPair>(options); | 412 base::MakeUnique<mojo::edk::NamedPlatformChannelPair>(options); |
| 411 elevated_mojo_channel->PrepareToPassClientHandleToChildProcess( | 413 elevated_mojo_channel->PrepareToPassClientHandleToChildProcess( |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 | 612 |
| 611 void WtsSessionProcessDelegate::CloseChannel() { | 613 void WtsSessionProcessDelegate::CloseChannel() { |
| 612 core_->CloseChannel(); | 614 core_->CloseChannel(); |
| 613 } | 615 } |
| 614 | 616 |
| 615 void WtsSessionProcessDelegate::KillProcess() { | 617 void WtsSessionProcessDelegate::KillProcess() { |
| 616 core_->KillProcess(); | 618 core_->KillProcess(); |
| 617 } | 619 } |
| 618 | 620 |
| 619 } // namespace remoting | 621 } // namespace remoting |
| OLD | NEW |