| Index: remoting/host/win/wts_session_process_delegate.cc
|
| diff --git a/remoting/host/win/wts_session_process_delegate.cc b/remoting/host/win/wts_session_process_delegate.cc
|
| index 5895f1fd198d045a85f1f93b06912e7dec377462..4b5e4e58fdce681c3ffb498282b1336283b50299 100644
|
| --- a/remoting/host/win/wts_session_process_delegate.cc
|
| +++ b/remoting/host/win/wts_session_process_delegate.cc
|
| @@ -154,8 +154,7 @@ WtsSessionProcessDelegate::Core::Core(
|
| get_named_pipe_client_pid_(nullptr),
|
| launch_elevated_(launch_elevated),
|
| launch_pending_(false),
|
| - target_command_(target_command.Pass()) {
|
| -}
|
| + target_command_(std::move(target_command)) {}
|
|
|
| bool WtsSessionProcessDelegate::Core::Initialize(uint32 session_id) {
|
| DCHECK(caller_task_runner_->BelongsToCurrentThread());
|
| @@ -200,7 +199,7 @@ bool WtsSessionProcessDelegate::Core::Initialize(uint32 session_id) {
|
| // ScopedHandle is not compatible with base::Passed, so we wrap it to
|
| // a scoped pointer.
|
| scoped_ptr<ScopedHandle> job_wrapper(new ScopedHandle());
|
| - *job_wrapper = job.Pass();
|
| + *job_wrapper = std::move(job);
|
|
|
| // To receive job object notifications the job object is registered with
|
| // the completion port represented by |io_task_runner|. The registration has
|
| @@ -330,7 +329,7 @@ void WtsSessionProcessDelegate::Core::OnChannelConnected(int32 peer_pid) {
|
| return;
|
| }
|
|
|
| - ReportProcessLaunched(worker_process.Pass());
|
| + ReportProcessLaunched(std::move(worker_process));
|
| }
|
|
|
| if (event_handler_)
|
| @@ -421,14 +420,14 @@ void WtsSessionProcessDelegate::Core::DoLaunchProcess() {
|
| return;
|
| }
|
|
|
| - channel_ = channel.Pass();
|
| - pipe_ = pipe.Pass();
|
| + channel_ = std::move(channel);
|
| + pipe_ = std::move(pipe);
|
|
|
| // Report success if the worker process is lauched directly. Otherwise, PID of
|
| // the client connected to the pipe will be used later. See
|
| // OnChannelConnected().
|
| if (!launch_elevated_)
|
| - ReportProcessLaunched(worker_process.Pass());
|
| + ReportProcessLaunched(std::move(worker_process));
|
| }
|
|
|
| void WtsSessionProcessDelegate::Core::DrainJobNotifications() {
|
| @@ -506,19 +505,15 @@ void WtsSessionProcessDelegate::Core::ReportProcessLaunched(
|
| DCHECK(caller_task_runner_->BelongsToCurrentThread());
|
| DCHECK(!worker_process_.IsValid());
|
|
|
| - worker_process_ = worker_process.Pass();
|
| + worker_process_ = std::move(worker_process);
|
|
|
| // Report a handle that can be used to wait for the worker process completion,
|
| // query information about the process and duplicate handles.
|
| DWORD desired_access =
|
| SYNCHRONIZE | PROCESS_DUP_HANDLE | PROCESS_QUERY_INFORMATION;
|
| HANDLE temp_handle;
|
| - if (!DuplicateHandle(GetCurrentProcess(),
|
| - worker_process_.Get(),
|
| - GetCurrentProcess(),
|
| - &temp_handle,
|
| - desired_access,
|
| - FALSE,
|
| + if (!DuplicateHandle(GetCurrentProcess(), worker_process_.Get(),
|
| + GetCurrentProcess(), &temp_handle, desired_access, FALSE,
|
| 0)) {
|
| PLOG(ERROR) << "Failed to duplicate a handle";
|
| ReportFatalError();
|
| @@ -526,7 +521,7 @@ void WtsSessionProcessDelegate::Core::ReportProcessLaunched(
|
| }
|
| ScopedHandle limited_handle(temp_handle);
|
|
|
| - event_handler_->OnProcessLaunched(limited_handle.Pass());
|
| + event_handler_->OnProcessLaunched(std::move(limited_handle));
|
| }
|
|
|
| WtsSessionProcessDelegate::WtsSessionProcessDelegate(
|
| @@ -534,9 +529,7 @@ WtsSessionProcessDelegate::WtsSessionProcessDelegate(
|
| scoped_ptr<base::CommandLine> target_command,
|
| bool launch_elevated,
|
| const std::string& channel_security) {
|
| - core_ = new Core(io_task_runner,
|
| - target_command.Pass(),
|
| - launch_elevated,
|
| + core_ = new Core(io_task_runner, std::move(target_command), launch_elevated,
|
| channel_security);
|
| }
|
|
|
|
|