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

Unified Diff: media/renderers/audio_renderer_impl_unittest.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/mojo/clients/mojo_decoder_factory.cc ('k') | media/renderers/default_renderer_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/audio_renderer_impl_unittest.cc
diff --git a/media/renderers/audio_renderer_impl_unittest.cc b/media/renderers/audio_renderer_impl_unittest.cc
index 1b0e5a5499487099cf403f16b272a27126fc530d..70859874c723d28665f61e2204d1c4b779a1d371 100644
--- a/media/renderers/audio_renderer_impl_unittest.cc
+++ b/media/renderers/audio_renderer_impl_unittest.cc
@@ -6,11 +6,13 @@
#include <memory>
#include <utility>
+#include <vector>
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/format_macros.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
@@ -66,8 +68,8 @@ ACTION_P(EnterPendingDecoderInitStateAction, test) {
class AudioRendererImplTest : public ::testing::Test, public RendererClient {
public:
- ScopedVector<AudioDecoder> CreateAudioDecoderForTest() {
- MockAudioDecoder* decoder = new MockAudioDecoder();
+ std::vector<std::unique_ptr<AudioDecoder>> CreateAudioDecoderForTest() {
+ auto decoder = base::MakeUnique<MockAudioDecoder>();
if (!enter_pending_decoder_init_) {
EXPECT_CALL(*decoder, Initialize(_, _, _, _))
.WillOnce(DoAll(SaveArg<3>(&output_cb_),
@@ -80,8 +82,8 @@ class AudioRendererImplTest : public ::testing::Test, public RendererClient {
.WillRepeatedly(Invoke(this, &AudioRendererImplTest::DecodeDecoder));
EXPECT_CALL(*decoder, Reset(_))
.WillRepeatedly(Invoke(this, &AudioRendererImplTest::ResetDecoder));
- ScopedVector<AudioDecoder> decoders;
- decoders.push_back(decoder);
+ std::vector<std::unique_ptr<AudioDecoder>> decoders;
+ decoders.push_back(std::move(decoder));
return decoders;
}
« no previous file with comments | « media/mojo/clients/mojo_decoder_factory.cc ('k') | media/renderers/default_renderer_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698