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

Side by Side Diff: remoting/host/desktop_process.cc

Issue 1549493004: Use std::move() instead of .Pass() in remoting/host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass
Patch Set: Created 5 years 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
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/desktop_process.h" 8 #include "remoting/host/desktop_process.h"
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 input_task_runner_ = nullptr; 88 input_task_runner_ = nullptr;
89 desktop_environment_factory_.reset(); 89 desktop_environment_factory_.reset();
90 } 90 }
91 91
92 bool DesktopProcess::Start( 92 bool DesktopProcess::Start(
93 scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory) { 93 scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory) {
94 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 94 DCHECK(caller_task_runner_->BelongsToCurrentThread());
95 DCHECK(!desktop_environment_factory_); 95 DCHECK(!desktop_environment_factory_);
96 DCHECK(desktop_environment_factory); 96 DCHECK(desktop_environment_factory);
97 97
98 desktop_environment_factory_ = desktop_environment_factory.Pass(); 98 desktop_environment_factory_ = std::move(desktop_environment_factory);
99 99
100 // Launch the audio capturing thread. 100 // Launch the audio capturing thread.
101 scoped_refptr<AutoThreadTaskRunner> audio_task_runner; 101 scoped_refptr<AutoThreadTaskRunner> audio_task_runner;
102 #if defined(OS_WIN) 102 #if defined(OS_WIN)
103 // On Windows the AudioCapturer requires COM, so we run a single-threaded 103 // On Windows the AudioCapturer requires COM, so we run a single-threaded
104 // apartment, which requires a UI thread. 104 // apartment, which requires a UI thread.
105 audio_task_runner = 105 audio_task_runner =
106 AutoThread::CreateWithLoopAndComInitTypes("ChromotingAudioThread", 106 AutoThread::CreateWithLoopAndComInitTypes("ChromotingAudioThread",
107 caller_task_runner_, 107 caller_task_runner_,
108 base::MessageLoop::TYPE_UI, 108 base::MessageLoop::TYPE_UI,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 base::snprintf(message, sizeof(message), 157 base::snprintf(message, sizeof(message),
158 "Requested by %s at %s, line %d.", 158 "Requested by %s at %s, line %d.",
159 function_name.c_str(), file_name.c_str(), line_number); 159 function_name.c_str(), file_name.c_str(), line_number);
160 base::debug::Alias(message); 160 base::debug::Alias(message);
161 161
162 // The daemon requested us to crash the process. 162 // The daemon requested us to crash the process.
163 CHECK(false) << message; 163 CHECK(false) << message;
164 } 164 }
165 165
166 } // namespace remoting 166 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698