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

Unified Diff: media/cast/test/loopback_transport.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/cast/test/fake_media_source.cc ('k') | media/cast/test/receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/loopback_transport.cc
diff --git a/media/cast/test/loopback_transport.cc b/media/cast/test/loopback_transport.cc
index 570d0a004b1d823dcec9d6066e6c3c345babef05..d82dcbdf2db4ed415a0c26fe388df32c7e30381b 100644
--- a/media/cast/test/loopback_transport.cc
+++ b/media/cast/test/loopback_transport.cc
@@ -4,6 +4,8 @@
#include "media/cast/test/loopback_transport.h"
+#include <utility>
+
#include "base/macros.h"
#include "base/single_thread_task_runner.h"
#include "base/time/tick_clock.h"
@@ -25,7 +27,7 @@ class LoopBackPacketPipe : public test::PacketPipe {
// PacketPipe implementations.
void Send(scoped_ptr<Packet> packet) final {
- packet_receiver_.Run(packet.Pass());
+ packet_receiver_.Run(std::move(packet));
}
private:
@@ -49,7 +51,7 @@ bool LoopBackTransport::SendPacket(PacketRef packet,
const base::Closure& cb) {
DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
scoped_ptr<Packet> packet_copy(new Packet(packet->data));
- packet_pipe_->Send(packet_copy.Pass());
+ packet_pipe_->Send(std::move(packet_copy));
bytes_sent_ += packet->data.size();
return true;
}
@@ -67,10 +69,10 @@ void LoopBackTransport::Initialize(
new LoopBackPacketPipe(packet_receiver));
if (pipe) {
// Append the loopback pipe to the end.
- pipe->AppendToPipe(loopback_pipe.Pass());
- packet_pipe_ = pipe.Pass();
+ pipe->AppendToPipe(std::move(loopback_pipe));
+ packet_pipe_ = std::move(pipe);
} else {
- packet_pipe_ = loopback_pipe.Pass();
+ packet_pipe_ = std::move(loopback_pipe);
}
packet_pipe_->InitOnIOThread(task_runner, clock);
}
« no previous file with comments | « media/cast/test/fake_media_source.cc ('k') | media/cast/test/receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698