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

Unified Diff: remoting/protocol/ice_connection_to_client.cc

Issue 1534193004: Use std::move() instead of scoped_ptr<>::Pass(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/ice_connection_to_client.cc
diff --git a/remoting/protocol/ice_connection_to_client.cc b/remoting/protocol/ice_connection_to_client.cc
index fda8d695853fda0c86c4f0878e3d2c6ee009244b..7210fc5606c685bca272e15d2dad07005e2ad443 100644
--- a/remoting/protocol/ice_connection_to_client.cc
+++ b/remoting/protocol/ice_connection_to_client.cc
@@ -29,9 +29,9 @@ scoped_ptr<VideoEncoder> CreateVideoEncoder(
const protocol::ChannelConfig& video_config = config.video_config();
if (video_config.codec == protocol::ChannelConfig::CODEC_VP8) {
- return VideoEncoderVpx::CreateForVP8().Pass();
+ return VideoEncoderVpx::CreateForVP8();
} else if (video_config.codec == protocol::ChannelConfig::CODEC_VP9) {
- return VideoEncoderVpx::CreateForVP9().Pass();
+ return VideoEncoderVpx::CreateForVP9();
} else if (video_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) {
return make_scoped_ptr(new VideoEncoderVerbatim());
}
@@ -46,7 +46,7 @@ IceConnectionToClient::IceConnectionToClient(
scoped_ptr<protocol::Session> session,
scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner)
: event_handler_(nullptr),
- session_(session.Pass()),
+ session_(std::move(session)),
video_encode_task_runner_(video_encode_task_runner),
control_dispatcher_(new HostControlDispatcher()),
event_dispatcher_(new HostEventDispatcher()),
@@ -92,10 +92,10 @@ scoped_ptr<VideoStream> IceConnectionToClient::StartVideoStream(
DCHECK(video_encoder);
scoped_ptr<VideoFramePump> pump(
- new VideoFramePump(video_encode_task_runner_, desktop_capturer.Pass(),
- video_encoder.Pass(), video_dispatcher_.get()));
+ new VideoFramePump(video_encode_task_runner_, std::move(desktop_capturer),
+ std::move(video_encoder), video_dispatcher_.get()));
video_dispatcher_->set_video_feedback_stub(pump->video_feedback_stub());
- return pump.Pass();
+ return std::move(pump);
Jamie 2015/12/22 12:23:36 Unnecessary?
Sergey Ulanov 2015/12/22 18:07:35 Upcasting to VideoStream. BTW the compiler (at le
}
AudioStub* IceConnectionToClient::audio_stub() {

Powered by Google App Engine
This is Rietveld 408576698