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

Unified Diff: remoting/host/video_frame_recorder.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/touch_injector_win_unittest.cc ('k') | remoting/host/video_frame_recorder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/video_frame_recorder.cc
diff --git a/remoting/host/video_frame_recorder.cc b/remoting/host/video_frame_recorder.cc
index aa48986fdfecbc6f0380b1a55b74f16bdd4e4089..3cec5b7c7c3867e41d7b4de503cdb06937c1f075 100644
--- a/remoting/host/video_frame_recorder.cc
+++ b/remoting/host/video_frame_recorder.cc
@@ -4,6 +4,8 @@
#include "remoting/host/video_frame_recorder.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/location.h"
#include "base/macros.h"
@@ -60,7 +62,7 @@ VideoFrameRecorder::RecordingVideoEncoder::RecordingVideoEncoder(
scoped_ptr<VideoEncoder> encoder,
scoped_refptr<base::TaskRunner> recorder_task_runner,
base::WeakPtr<VideoFrameRecorder> recorder)
- : encoder_(encoder.Pass()),
+ : encoder_(std::move(encoder)),
recorder_task_runner_(recorder_task_runner),
recorder_(recorder),
enable_recording_(false),
@@ -134,12 +136,12 @@ scoped_ptr<VideoEncoder> VideoFrameRecorder::WrapVideoEncoder(
caller_task_runner_ = base::ThreadTaskRunnerHandle::Get();
scoped_ptr<RecordingVideoEncoder> recording_encoder(
- new RecordingVideoEncoder(encoder.Pass(),
+ new RecordingVideoEncoder(std::move(encoder),
caller_task_runner_,
weak_factory_.GetWeakPtr()));
recording_encoder_ = recording_encoder->AsWeakPtr();
- return recording_encoder.Pass();
+ return std::move(recording_encoder);
}
void VideoFrameRecorder::DetachVideoEncoderWrapper() {
@@ -201,7 +203,7 @@ scoped_ptr<webrtc::DesktopFrame> VideoFrameRecorder::NextFrame() {
DCHECK_GE(content_bytes_, 0);
}
- return frame.Pass();
+ return frame;
}
void VideoFrameRecorder::SetEncoderTaskRunner(
« no previous file with comments | « remoting/host/touch_injector_win_unittest.cc ('k') | remoting/host/video_frame_recorder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698