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

Unified Diff: remoting/protocol/client_video_dispatcher_unittest.cc

Issue 2627433003: Remove ScopedVector from remoting/. (Closed)
Patch Set: rev Created 3 years, 11 months 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/protocol/audio_pump_unittest.cc ('k') | remoting/protocol/video_frame_pump.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/client_video_dispatcher_unittest.cc
diff --git a/remoting/protocol/client_video_dispatcher_unittest.cc b/remoting/protocol/client_video_dispatcher_unittest.cc
index e26ca45d4bba9566b32911f525b6275d9525d704..d4722f4de0d47dd633867114b2cffa653bcf6293 100644
--- a/remoting/protocol/client_video_dispatcher_unittest.cc
+++ b/remoting/protocol/client_video_dispatcher_unittest.cc
@@ -4,8 +4,10 @@
#include "remoting/protocol/client_video_dispatcher.h"
+#include <memory>
+#include <vector>
+
#include "base/bind.h"
-#include "base/memory/scoped_vector.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "remoting/base/buffered_socket_writer.h"
@@ -58,10 +60,10 @@ class ClientVideoDispatcherTest : public testing::Test,
MessageReader reader_;
BufferedSocketWriter writer_;
- ScopedVector<VideoPacket> video_packets_;
+ std::vector<std::unique_ptr<VideoPacket>> video_packets_;
std::vector<base::Closure> packet_done_callbacks_;
- ScopedVector<VideoAck> ack_messages_;
+ std::vector<std::unique_ptr<VideoAck>> ack_messages_;
};
ClientVideoDispatcherTest::ClientVideoDispatcherTest()
@@ -88,7 +90,7 @@ ClientVideoDispatcherTest::ClientVideoDispatcherTest()
void ClientVideoDispatcherTest::ProcessVideoPacket(
std::unique_ptr<VideoPacket> video_packet,
const base::Closure& done) {
- video_packets_.push_back(video_packet.release());
+ video_packets_.push_back(std::move(video_packet));
packet_done_callbacks_.push_back(done);
}
@@ -112,7 +114,7 @@ void ClientVideoDispatcherTest::OnMessageReceived(
std::unique_ptr<CompoundBuffer> buffer) {
std::unique_ptr<VideoAck> ack = ParseMessage<VideoAck>(buffer.get());
EXPECT_TRUE(ack);
- ack_messages_.push_back(ack.release());
+ ack_messages_.push_back(std::move(ack));
}
void ClientVideoDispatcherTest::OnReadError(int error) {
« no previous file with comments | « remoting/protocol/audio_pump_unittest.cc ('k') | remoting/protocol/video_frame_pump.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698