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

Unified Diff: remoting/host/client_session.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/chromoting_host_unittest.cc ('k') | remoting/host/client_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session.cc
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index 32d7adcaa4783d4d4f3dd3d78b3d27f15407b6af..5ca5e41145a0645d9269c3ad8ebfd50c2e2e5c32 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -5,6 +5,7 @@
#include "remoting/host/client_session.h"
#include <algorithm>
+#include <utility>
#include "base/command_line.h"
#include "base/single_thread_task_runner.h"
@@ -75,7 +76,7 @@ ClientSession::ClientSession(
scoped_refptr<protocol::PairingRegistry> pairing_registry,
const std::vector<HostExtension*>& extensions)
: event_handler_(event_handler),
- connection_(connection.Pass()),
+ connection_(std::move(connection)),
client_jid_(connection_->session()->jid()),
desktop_environment_factory_(desktop_environment_factory),
input_tracker_(&host_input_filter_),
@@ -343,7 +344,7 @@ void ClientSession::OnConnectionChannelsConnected(
CreateAudioEncoder(connection_->session()->config());
audio_pump_.reset(new AudioPump(
audio_task_runner_, desktop_environment_->CreateAudioCapturer(),
- audio_encoder.Pass(), connection_->audio_stub()));
+ std::move(audio_encoder), connection_->audio_stub()));
}
// Notify the event handler that all our channels are now connected.
@@ -464,9 +465,9 @@ void ClientSession::ResetVideoPipeline() {
// TODO(sergeyu): Move DesktopCapturerProxy creation to DesktopEnvironment.
// When using IpcDesktopCapturer the capture thread is not useful.
scoped_ptr<webrtc::DesktopCapturer> capturer_proxy(new DesktopCapturerProxy(
- video_capture_task_runner_, video_capturer.Pass()));
+ video_capture_task_runner_, std::move(video_capturer)));
- video_stream_ = connection_->StartVideoStream(capturer_proxy.Pass());
+ video_stream_ = connection_->StartVideoStream(std::move(capturer_proxy));
video_stream_->SetSizeCallback(
base::Bind(&ClientSession::OnScreenSizeChanged, base::Unretained(this)));
« no previous file with comments | « remoting/host/chromoting_host_unittest.cc ('k') | remoting/host/client_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698