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

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: include <utility> 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
« no previous file with comments | « remoting/host/desktop_capturer_proxy.cc ('k') | remoting/host/desktop_process_main.cc » ('j') | 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/desktop_process.h" 8 #include "remoting/host/desktop_process.h"
9 9
10 #include <utility>
11
10 #include "base/bind.h" 12 #include "base/bind.h"
11 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
12 #include "base/debug/alias.h" 14 #include "base/debug/alias.h"
13 #include "base/logging.h" 15 #include "base/logging.h"
14 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
15 #include "base/message_loop/message_loop.h" 17 #include "base/message_loop/message_loop.h"
16 #include "base/strings/string_util.h" 18 #include "base/strings/string_util.h"
17 #include "build/build_config.h" 19 #include "build/build_config.h"
18 #include "ipc/ipc_channel_proxy.h" 20 #include "ipc/ipc_channel_proxy.h"
19 #include "remoting/base/auto_thread.h" 21 #include "remoting/base/auto_thread.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 input_task_runner_ = nullptr; 91 input_task_runner_ = nullptr;
90 desktop_environment_factory_.reset(); 92 desktop_environment_factory_.reset();
91 } 93 }
92 94
93 bool DesktopProcess::Start( 95 bool DesktopProcess::Start(
94 scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory) { 96 scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory) {
95 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 97 DCHECK(caller_task_runner_->BelongsToCurrentThread());
96 DCHECK(!desktop_environment_factory_); 98 DCHECK(!desktop_environment_factory_);
97 DCHECK(desktop_environment_factory); 99 DCHECK(desktop_environment_factory);
98 100
99 desktop_environment_factory_ = desktop_environment_factory.Pass(); 101 desktop_environment_factory_ = std::move(desktop_environment_factory);
100 102
101 // Launch the audio capturing thread. 103 // Launch the audio capturing thread.
102 scoped_refptr<AutoThreadTaskRunner> audio_task_runner; 104 scoped_refptr<AutoThreadTaskRunner> audio_task_runner;
103 #if defined(OS_WIN) 105 #if defined(OS_WIN)
104 // On Windows the AudioCapturer requires COM, so we run a single-threaded 106 // On Windows the AudioCapturer requires COM, so we run a single-threaded
105 // apartment, which requires a UI thread. 107 // apartment, which requires a UI thread.
106 audio_task_runner = 108 audio_task_runner =
107 AutoThread::CreateWithLoopAndComInitTypes("ChromotingAudioThread", 109 AutoThread::CreateWithLoopAndComInitTypes("ChromotingAudioThread",
108 caller_task_runner_, 110 caller_task_runner_,
109 base::MessageLoop::TYPE_UI, 111 base::MessageLoop::TYPE_UI,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 base::snprintf(message, sizeof(message), 160 base::snprintf(message, sizeof(message),
159 "Requested by %s at %s, line %d.", 161 "Requested by %s at %s, line %d.",
160 function_name.c_str(), file_name.c_str(), line_number); 162 function_name.c_str(), file_name.c_str(), line_number);
161 base::debug::Alias(message); 163 base::debug::Alias(message);
162 164
163 // The daemon requested us to crash the process. 165 // The daemon requested us to crash the process.
164 CHECK(false) << message; 166 CHECK(false) << message;
165 } 167 }
166 168
167 } // namespace remoting 169 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_capturer_proxy.cc ('k') | remoting/host/desktop_process_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698