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

Unified Diff: media/audio/alsa/alsa_input.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: Fix cast + windows build 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/audio/alsa/alsa_input.h
diff --git a/media/audio/alsa/alsa_input.h b/media/audio/alsa/alsa_input.h
index f0b6d6948722ac8cce4221f0a32cd75210795a66..e51e476b26d28200ab04b07f4778acf853077037 100644
--- a/media/audio/alsa/alsa_input.h
+++ b/media/audio/alsa/alsa_input.h
@@ -8,11 +8,11 @@
#include <alsa/asoundlib.h>
#include <stdint.h>
+#include <memory>
#include <string>
#include "base/compiler_specific.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "media/audio/agc_audio_stream.h"
@@ -83,9 +83,10 @@ class AlsaPcmInputStream : public AgcAudioStream<AudioInputStream> {
snd_pcm_t* device_handle_; // Handle to the ALSA PCM recording device.
snd_mixer_t* mixer_handle_; // Handle to the ALSA microphone mixer.
snd_mixer_elem_t* mixer_element_handle_; // Handle to the capture element.
- scoped_ptr<uint8_t[]> audio_buffer_; // Buffer used for reading audio data.
+ std::unique_ptr<uint8_t[]>
+ audio_buffer_; // Buffer used for reading audio data.
danakj 2016/04/22 22:47:35 move the comment above the variable to its own lin
dcheng 2016/04/22 23:13:19 Done.
bool read_callback_behind_schedule_;
- scoped_ptr<AudioBus> audio_bus_;
+ std::unique_ptr<AudioBus> audio_bus_;
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<AlsaPcmInputStream> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698