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

Unified Diff: media/audio/simple_sources.h

Issue 1911913002: Convert //media/audio from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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/audio/pulse/pulse_output.h ('k') | media/audio/simple_sources.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/simple_sources.h
diff --git a/media/audio/simple_sources.h b/media/audio/simple_sources.h
index 4f153e6566fbd9bc66d4c8e6669d28c84c0524a0..4bf644377fdbf206e367bb4362cf78ebafc1bc30 100644
--- a/media/audio/simple_sources.h
+++ b/media/audio/simple_sources.h
@@ -7,6 +7,8 @@
#include <stdint.h>
+#include <memory>
+
#include "base/files/file_path.h"
#include "base/synchronization/lock.h"
#include "media/audio/audio_io.h"
@@ -72,10 +74,10 @@ class MEDIA_EXPORT FileSource : public AudioOutputStream::AudioSourceCallback,
// The WAV data at |path_to_wav_file_| is read into memory and kept here.
// This memory needs to survive for the lifetime of |wav_audio_handler_|,
// so declare it first. Do not access this member directly.
- scoped_ptr<char[]> raw_wav_data_;
+ std::unique_ptr<char[]> raw_wav_data_;
- scoped_ptr<WavAudioHandler> wav_audio_handler_;
- scoped_ptr<AudioConverter> file_audio_converter_;
+ std::unique_ptr<WavAudioHandler> wav_audio_handler_;
+ std::unique_ptr<AudioConverter> file_audio_converter_;
int wav_file_read_pos_;
bool load_failed_;
@@ -101,7 +103,7 @@ class BeepingSource : public AudioOutputStream::AudioSourceCallback {
static void BeepOnce();
private:
int buffer_size_;
- scoped_ptr<uint8_t[]> buffer_;
+ std::unique_ptr<uint8_t[]> buffer_;
AudioParameters params_;
base::TimeTicks last_callback_time_;
base::TimeDelta interval_from_last_beep_;
« no previous file with comments | « media/audio/pulse/pulse_output.h ('k') | media/audio/simple_sources.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698