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

Unified Diff: media/base/audio_bus_perftest.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: android 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
« no previous file with comments | « media/base/audio_bus.cc ('k') | media/base/audio_bus_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_bus_perftest.cc
diff --git a/media/base/audio_bus_perftest.cc b/media/base/audio_bus_perftest.cc
index 8f35b9007469d4e5925a84b711be9ed9eb5466cb..62d710e6a99bfce4471c774ad483c77d31653929 100644
--- a/media/base/audio_bus_perftest.cc
+++ b/media/base/audio_bus_perftest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include <stdint.h>
+#include <memory>
#include "base/time/time.h"
#include "media/base/audio_bus.h"
@@ -17,7 +18,7 @@ static const int kBenchmarkIterations = 20;
template <typename T>
void RunInterleaveBench(AudioBus* bus, const std::string& trace_name) {
const int frame_size = bus->frames() * bus->channels();
- scoped_ptr<T[]> interleaved(new T[frame_size]);
+ std::unique_ptr<T[]> interleaved(new T[frame_size]);
const int byte_size = sizeof(T);
base::TimeTicks start = base::TimeTicks::Now();
@@ -43,7 +44,7 @@ void RunInterleaveBench(AudioBus* bus, const std::string& trace_name) {
// Benchmark the FromInterleaved() and ToInterleaved() methods.
TEST(AudioBusPerfTest, Interleave) {
- scoped_ptr<AudioBus> bus = AudioBus::Create(2, 48000 * 120);
+ std::unique_ptr<AudioBus> bus = AudioBus::Create(2, 48000 * 120);
FakeAudioRenderCallback callback(0.2);
callback.Render(bus.get(), 0, 0);
« no previous file with comments | « media/base/audio_bus.cc ('k') | media/base/audio_bus_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698