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

Unified Diff: media/base/audio_converter_unittest.cc

Issue 2865113007: Remove ScopedVector from media/base/ (Closed)
Patch Set: added header file in text_renderer_unittest.cc 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/base/audio_block_fifo.cc ('k') | media/base/audio_renderer_mixer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_converter_unittest.cc
diff --git a/media/base/audio_converter_unittest.cc b/media/base/audio_converter_unittest.cc
index 2624b58cb4c9418d54ffcb9576bd21ac5554959f..c4e5ff13e414a2e9ccb984de3be86fa248d6a09d 100644
--- a/media/base/audio_converter_unittest.cc
+++ b/media/base/audio_converter_unittest.cc
@@ -13,7 +13,7 @@
#include <memory>
#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
#include "media/base/audio_timestamp_helper.h"
#include "media/base/fake_audio_render_callback.h"
@@ -72,8 +72,9 @@ class AudioConverterTest
static_cast<double>(output_parameters_.frames_per_buffer()));
for (int i = 0; i < count; ++i) {
- fake_callbacks_.push_back(new FakeAudioRenderCallback(step, kSampleRate));
- converter_->AddInput(fake_callbacks_[i]);
+ fake_callbacks_.push_back(
+ base::MakeUnique<FakeAudioRenderCallback>(step, kSampleRate));
+ converter_->AddInput(fake_callbacks_[i].get());
}
}
@@ -162,7 +163,7 @@ class AudioConverterTest
// Remove every other input.
for (size_t i = 1; i < fake_callbacks_.size(); i += 2)
- converter_->RemoveInput(fake_callbacks_[i]);
+ converter_->RemoveInput(fake_callbacks_[i].get());
SetVolume(1);
float scale = inputs > 1 ? inputs / 2.0f : inputs;
@@ -187,7 +188,7 @@ class AudioConverterTest
std::unique_ptr<AudioBus> expected_audio_bus_;
// Vector of all input callbacks used to drive AudioConverter::Convert().
- ScopedVector<FakeAudioRenderCallback> fake_callbacks_;
+ std::vector<std::unique_ptr<FakeAudioRenderCallback>> fake_callbacks_;
// Parallel input callback which generates the expected output.
std::unique_ptr<FakeAudioRenderCallback> expected_callback_;
« no previous file with comments | « media/base/audio_block_fifo.cc ('k') | media/base/audio_renderer_mixer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698