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

Unified Diff: media/mojo/services/mojo_demuxer_stream_impl.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/mojo/services/mojo_demuxer_stream_adapter.cc ('k') | media/mojo/services/mojo_media_application.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_demuxer_stream_impl.cc
diff --git a/media/mojo/services/mojo_demuxer_stream_impl.cc b/media/mojo/services/mojo_demuxer_stream_impl.cc
index 7c162f8f67803e9fa4263393b9e032d7da7f5577..40f2059ba5750ccfa640db2dd75ce38a32186bf2 100644
--- a/media/mojo/services/mojo_demuxer_stream_impl.cc
+++ b/media/mojo/services/mojo_demuxer_stream_impl.cc
@@ -5,6 +5,7 @@
#include "media/mojo/services/mojo_demuxer_stream_impl.h"
#include <stdint.h>
+#include <utility>
#include "base/bind.h"
#include "media/base/audio_decoder_config.h"
@@ -18,7 +19,9 @@ namespace media {
MojoDemuxerStreamImpl::MojoDemuxerStreamImpl(
media::DemuxerStream* stream,
mojo::InterfaceRequest<interfaces::DemuxerStream> request)
- : binding_(this, request.Pass()), stream_(stream), weak_factory_(this) {}
+ : binding_(this, std::move(request)),
+ stream_(stream),
+ weak_factory_(this) {}
MojoDemuxerStreamImpl::~MojoDemuxerStreamImpl() {
}
@@ -45,7 +48,7 @@ void MojoDemuxerStreamImpl::Initialize(const InitializeCallback& callback) {
}
mojo::DataPipe data_pipe(options);
- stream_pipe_ = data_pipe.producer_handle.Pass();
+ stream_pipe_ = std::move(data_pipe.producer_handle);
// Prepare the initial config.
interfaces::AudioDecoderConfigPtr audio_config;
@@ -62,8 +65,8 @@ void MojoDemuxerStreamImpl::Initialize(const InitializeCallback& callback) {
}
callback.Run(static_cast<interfaces::DemuxerStream::Type>(stream_->type()),
- data_pipe.consumer_handle.Pass(), audio_config.Pass(),
- video_config.Pass());
+ std::move(data_pipe.consumer_handle), std::move(audio_config),
+ std::move(video_config));
}
void MojoDemuxerStreamImpl::Read(const ReadCallback& callback) {
@@ -94,15 +97,15 @@ void MojoDemuxerStreamImpl::OnBufferReady(
}
callback.Run(interfaces::DemuxerStream::STATUS_CONFIG_CHANGED,
- interfaces::DecoderBufferPtr(), audio_config.Pass(),
- video_config.Pass());
+ interfaces::DecoderBufferPtr(), std::move(audio_config),
+ std::move(video_config));
return;
}
if (status == media::DemuxerStream::kAborted) {
callback.Run(interfaces::DemuxerStream::STATUS_ABORTED,
- interfaces::DecoderBufferPtr(), audio_config.Pass(),
- video_config.Pass());
+ interfaces::DecoderBufferPtr(), std::move(audio_config),
+ std::move(video_config));
return;
}
@@ -121,8 +124,8 @@ void MojoDemuxerStreamImpl::OnBufferReady(
// the producer handle and then read more to keep the pipe full. Waiting for
// space can be accomplished using an AsyncWaiter.
callback.Run(static_cast<interfaces::DemuxerStream::Status>(status),
- interfaces::DecoderBuffer::From(buffer), audio_config.Pass(),
- video_config.Pass());
+ interfaces::DecoderBuffer::From(buffer), std::move(audio_config),
+ std::move(video_config));
}
} // namespace media
« no previous file with comments | « media/mojo/services/mojo_demuxer_stream_adapter.cc ('k') | media/mojo/services/mojo_media_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698