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

Side by Side Diff: remoting/host/win/wts_session_process_delegate.cc

Issue 2936603003: [Chromoting] Implement host safe-mode
Patch Set: Created 3 years, 6 months 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 | « remoting/host/win/worker_process_launcher.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 (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
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
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
OLDNEW
« no previous file with comments | « remoting/host/win/worker_process_launcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698