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

Unified Diff: remoting/test/test_video_renderer_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/signaling/xmpp_stream_parser_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/test/test_video_renderer_unittest.cc
diff --git a/remoting/test/test_video_renderer_unittest.cc b/remoting/test/test_video_renderer_unittest.cc
index 30ab30c3401a3cdf9c65e7b7199e25772dd50353..0d6f53e5e5f02a2e167930dc9467df02119bb16b 100644
--- a/remoting/test/test_video_renderer_unittest.cc
+++ b/remoting/test/test_video_renderer_unittest.cc
@@ -7,11 +7,12 @@
#include <stdint.h>
#include <cmath>
+#include <memory>
#include <utility>
+#include <vector>
#include "base/macros.h"
#include "base/memory/ptr_util.h"
-#include "base/memory/scoped_vector.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -399,7 +400,7 @@ TEST_F(TestVideoRendererTest, VerifyMultipleVideoProcessing) {
// more than one task on the video decode thread, while not too large to wait
// for too long for the unit test to complete.
const int task_num = 20;
- ScopedVector<VideoPacket> video_packets;
+ std::vector<std::unique_ptr<VideoPacket>> video_packets;
for (int i = 0; i < task_num; ++i) {
std::unique_ptr<webrtc::DesktopFrame> original_frame =
CreateDesktopFrameWithGradient(kDefaultScreenWidthPx,
@@ -407,11 +408,8 @@ TEST_F(TestVideoRendererTest, VerifyMultipleVideoProcessing) {
video_packets.push_back(encoder_->Encode(*original_frame.get()));
}
- for (int i = 0; i < task_num; ++i) {
- // Transfer ownership of video packet.
- VideoPacket* packet = video_packets[i];
- video_packets[i] = nullptr;
- test_video_renderer_->ProcessVideoPacket(base::WrapUnique(packet),
+ for (auto& packet : video_packets) {
+ test_video_renderer_->ProcessVideoPacket(std::move(packet),
base::Bind(&base::DoNothing));
}
}
« no previous file with comments | « remoting/signaling/xmpp_stream_parser_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698