Index: media/base/audio_hash_unittest.cc |
diff --git a/media/base/audio_hash_unittest.cc b/media/base/audio_hash_unittest.cc |
index b020fe93e58245746c359e0addcd572afe89565e..ecc37bcbd059087cbe52e168706e0a856f1c1a53 100644 |
--- a/media/base/audio_hash_unittest.cc |
+++ b/media/base/audio_hash_unittest.cc |
@@ -2,6 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include <memory> |
+ |
#include "base/logging.h" |
#include "base/macros.h" |
#include "media/base/audio_bus.h" |
@@ -28,7 +30,7 @@ class AudioHashTest : public testing::Test { |
void GenerateUniqueChannels(AudioBus* audio_bus) { |
// Use an AudioBus wrapper to avoid an extra memcpy when filling channels. |
- scoped_ptr<AudioBus> wrapped_bus = AudioBus::CreateWrapper(1); |
+ std::unique_ptr<AudioBus> wrapped_bus = AudioBus::CreateWrapper(1); |
wrapped_bus->set_frames(audio_bus->frames()); |
// Since FakeAudioRenderCallback generates only a single channel of unique |
@@ -42,8 +44,8 @@ class AudioHashTest : public testing::Test { |
~AudioHashTest() override {} |
protected: |
- scoped_ptr<AudioBus> bus_one_; |
- scoped_ptr<AudioBus> bus_two_; |
+ std::unique_ptr<AudioBus> bus_one_; |
+ std::unique_ptr<AudioBus> bus_two_; |
FakeAudioRenderCallback fake_callback_; |
DISALLOW_COPY_AND_ASSIGN(AudioHashTest); |
@@ -81,7 +83,7 @@ TEST_F(AudioHashTest, ChannelOrder) { |
// Reverse channel order for the same sample data. |
const int channels = bus_one_->channels(); |
- scoped_ptr<AudioBus> swapped_ch_bus = AudioBus::CreateWrapper(channels); |
+ std::unique_ptr<AudioBus> swapped_ch_bus = AudioBus::CreateWrapper(channels); |
swapped_ch_bus->set_frames(bus_one_->frames()); |
for (int i = channels - 1; i >= 0; --i) |
swapped_ch_bus->SetChannelData(channels - (i + 1), bus_one_->channel(i)); |
@@ -132,7 +134,7 @@ TEST_F(AudioHashTest, HashIgnoresUpdateOrder) { |
// Create a new bus representing the second half of |bus_one_|. |
const int half_frames = bus_one_->frames() / 2; |
const int channels = bus_one_->channels(); |
- scoped_ptr<AudioBus> half_bus = AudioBus::CreateWrapper(channels); |
+ std::unique_ptr<AudioBus> half_bus = AudioBus::CreateWrapper(channels); |
half_bus->set_frames(half_frames); |
for (int i = 0; i < channels; ++i) |
half_bus->SetChannelData(i, bus_one_->channel(i) + half_frames); |