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

Unified Diff: media/base/channel_mixer_unittest.cc

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: . Created 4 years, 8 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
Index: media/base/channel_mixer_unittest.cc
diff --git a/media/base/channel_mixer_unittest.cc b/media/base/channel_mixer_unittest.cc
index db5c0d8d1b136a9f5eff349ef2b27adaf8501ae8..dda898651097c282ebd3856488f7befbd030d9a5 100644
--- a/media/base/channel_mixer_unittest.cc
+++ b/media/base/channel_mixer_unittest.cc
@@ -6,6 +6,7 @@
#define _USE_MATH_DEFINES
#include <cmath>
+#include <memory>
#include "base/macros.h"
#include "base/strings/stringprintf.h"
@@ -41,10 +42,10 @@ TEST(ChannelMixerTest, ConstructAllPossibleLayouts) {
SCOPED_TRACE(base::StringPrintf(
"Input Layout: %d, Output Layout: %d", input_layout, output_layout));
ChannelMixer mixer(input_layout, output_layout);
- scoped_ptr<AudioBus> input_bus = AudioBus::Create(
- ChannelLayoutToChannelCount(input_layout), kFrames);
- scoped_ptr<AudioBus> output_bus = AudioBus::Create(
- ChannelLayoutToChannelCount(output_layout), kFrames);
+ std::unique_ptr<AudioBus> input_bus =
+ AudioBus::Create(ChannelLayoutToChannelCount(input_layout), kFrames);
+ std::unique_ptr<AudioBus> output_bus =
+ AudioBus::Create(ChannelLayoutToChannelCount(output_layout), kFrames);
for (int ch = 0; ch < input_bus->channels(); ++ch)
std::fill(input_bus->channel(ch), input_bus->channel(ch) + kFrames, 1);
@@ -104,7 +105,8 @@ class ChannelMixerTest : public testing::TestWithParam<ChannelMixerTestData> {};
TEST_P(ChannelMixerTest, Mixing) {
ChannelLayout input_layout = GetParam().input_layout;
int input_channels = GetParam().input_channels;
- scoped_ptr<AudioBus> input_bus = AudioBus::Create(input_channels, kFrames);
+ std::unique_ptr<AudioBus> input_bus =
+ AudioBus::Create(input_channels, kFrames);
AudioParameters input_audio(AudioParameters::AUDIO_PCM_LINEAR, input_layout,
AudioParameters::kAudioCDSampleRate, 16, kFrames);
if (input_layout == CHANNEL_LAYOUT_DISCRETE)
@@ -112,7 +114,8 @@ TEST_P(ChannelMixerTest, Mixing) {
ChannelLayout output_layout = GetParam().output_layout;
int output_channels = GetParam().output_channels;
- scoped_ptr<AudioBus> output_bus = AudioBus::Create(output_channels, kFrames);
+ std::unique_ptr<AudioBus> output_bus =
+ AudioBus::Create(output_channels, kFrames);
AudioParameters output_audio(AudioParameters::AUDIO_PCM_LINEAR, output_layout,
AudioParameters::kAudioCDSampleRate, 16,
kFrames);

Powered by Google App Engine
This is Rietveld 408576698