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

Unified Diff: media/base/pipeline.cc

Issue 1544313002: Convert Pass()→std::move() in //media (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
« no previous file with comments | « media/base/media_log.cc ('k') | media/base/pipeline_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline.cc
diff --git a/media/base/pipeline.cc b/media/base/pipeline.cc
index 942726134456f6ccc4b81bce1d714fc1b6724a61..ce49c5d393ed1f71cb503b3b54ec522f656faa88 100644
--- a/media/base/pipeline.cc
+++ b/media/base/pipeline.cc
@@ -5,6 +5,7 @@
#include "media/base/pipeline.h"
#include <algorithm>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -80,7 +81,7 @@ void Pipeline::Start(Demuxer* demuxer,
running_ = true;
demuxer_ = demuxer;
- renderer_ = renderer.Pass();
+ renderer_ = std::move(renderer);
ended_cb_ = ended_cb;
error_cb_ = error_cb;
seek_cb_ = seek_cb;
@@ -148,8 +149,9 @@ void Pipeline::Resume(scoped_ptr<Renderer> renderer,
base::TimeDelta timestamp,
const PipelineStatusCB& seek_cb) {
task_runner_->PostTask(
- FROM_HERE, base::Bind(&Pipeline::ResumeTask, weak_factory_.GetWeakPtr(),
- base::Passed(renderer.Pass()), timestamp, seek_cb));
+ FROM_HERE,
+ base::Bind(&Pipeline::ResumeTask, weak_factory_.GetWeakPtr(),
+ base::Passed(std::move(renderer)), timestamp, seek_cb));
}
float Pipeline::GetVolume() const {
@@ -707,7 +709,7 @@ void Pipeline::ResumeTask(scoped_ptr<Renderer> renderer,
DCHECK(!pending_callbacks_.get());
SetState(kResuming);
- renderer_ = renderer.Pass();
+ renderer_ = std::move(renderer);
// Set up for a seek. (Matches setup in SeekTask().)
// TODO(sandersd): Share implementation with SeekTask().
« no previous file with comments | « media/base/media_log.cc ('k') | media/base/pipeline_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698