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

Unified Diff: media/test/pipeline_integration_test_base.cc

Issue 2871503002: Remove ScopedVector from audio/video renderer related code in media/ (Closed)
Patch Set: Address xhwang's comments and delete some useless includes Created 3 years, 7 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 | « media/test/pipeline_integration_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/test/pipeline_integration_test_base.cc
diff --git a/media/test/pipeline_integration_test_base.cc b/media/test/pipeline_integration_test_base.cc
index c0b746d9758c6c814ff3d88c831706544a72685b..1629a0b91a72be4a6999fe7de52d6fd8a7ac1fc0 100644
--- a/media/test/pipeline_integration_test_base.cc
+++ b/media/test/pipeline_integration_test_base.cc
@@ -9,7 +9,6 @@
#include "base/bind.h"
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_vector.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "media/base/media_log.h"
@@ -41,10 +40,10 @@ using ::testing::SaveArg;
namespace media {
-static ScopedVector<VideoDecoder> CreateVideoDecodersForTest(
+static std::vector<std::unique_ptr<VideoDecoder>> CreateVideoDecodersForTest(
MediaLog* media_log,
CreateVideoDecodersCB prepend_video_decoders_cb) {
- ScopedVector<VideoDecoder> video_decoders;
+ std::vector<std::unique_ptr<VideoDecoder>> video_decoders;
if (!prepend_video_decoders_cb.is_null()) {
video_decoders = prepend_video_decoders_cb.Run();
@@ -52,22 +51,22 @@ static ScopedVector<VideoDecoder> CreateVideoDecodersForTest(
}
#if !defined(MEDIA_DISABLE_LIBVPX)
- video_decoders.push_back(new VpxVideoDecoder());
+ video_decoders.push_back(base::MakeUnique<VpxVideoDecoder>());
#endif // !defined(MEDIA_DISABLE_LIBVPX)
// Android does not have an ffmpeg video decoder.
#if !defined(MEDIA_DISABLE_FFMPEG) && !defined(OS_ANDROID) && \
!defined(DISABLE_FFMPEG_VIDEO_DECODERS)
- video_decoders.push_back(new FFmpegVideoDecoder(media_log));
+ video_decoders.push_back(base::MakeUnique<FFmpegVideoDecoder>(media_log));
#endif
return video_decoders;
}
-static ScopedVector<AudioDecoder> CreateAudioDecodersForTest(
+static std::vector<std::unique_ptr<AudioDecoder>> CreateAudioDecodersForTest(
MediaLog* media_log,
const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
CreateAudioDecodersCB prepend_audio_decoders_cb) {
- ScopedVector<AudioDecoder> audio_decoders;
+ std::vector<std::unique_ptr<AudioDecoder>> audio_decoders;
if (!prepend_audio_decoders_cb.is_null()) {
audio_decoders = prepend_audio_decoders_cb.Run();
@@ -76,7 +75,7 @@ static ScopedVector<AudioDecoder> CreateAudioDecodersForTest(
#if !defined(MEDIA_DISABLE_FFMPEG)
audio_decoders.push_back(
- new FFmpegAudioDecoder(media_task_runner, media_log));
+ base::MakeUnique<FFmpegAudioDecoder>(media_task_runner, media_log));
#endif
return audio_decoders;
}
« no previous file with comments | « media/test/pipeline_integration_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698