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

Unified Diff: media/audio/audio_input_device.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/audio_input_device.h
diff --git a/media/audio/audio_input_device.h b/media/audio/audio_input_device.h
index 61b8829214e605bec497d3124a2b05c1d3d32522..d5dfd65f25a6bad6ad60d204ae2658c612e9a16b 100644
--- a/media/audio/audio_input_device.h
+++ b/media/audio/audio_input_device.h
@@ -53,11 +53,11 @@
#ifndef MEDIA_AUDIO_AUDIO_INPUT_DEVICE_H_
#define MEDIA_AUDIO_AUDIO_INPUT_DEVICE_H_
+#include <memory>
#include <string>
#include "base/compiler_specific.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/shared_memory.h"
#include "media/audio/audio_device_thread.h"
#include "media/audio/audio_input_ipc.h"
@@ -81,7 +81,7 @@ class MEDIA_EXPORT AudioInputDevice
public:
// NOTE: Clients must call Initialize() before using.
AudioInputDevice(
- scoped_ptr<AudioInputIPC> ipc,
+ std::unique_ptr<AudioInputIPC> ipc,
const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
// AudioCapturerSource implementation.
@@ -136,7 +136,7 @@ class MEDIA_EXPORT AudioInputDevice
// A pointer to the IPC layer that takes care of sending requests over to
// the AudioInputRendererHost. Only valid when state_ != IPC_CLOSED and must
// only be accessed on the IO thread.
- scoped_ptr<AudioInputIPC> ipc_;
+ std::unique_ptr<AudioInputIPC> ipc_;
// Current state (must only be accessed from the IO thread). See comments for
// State enum above.
@@ -157,7 +157,7 @@ class MEDIA_EXPORT AudioInputDevice
// guard to control stopping and starting the audio thread.
base::Lock audio_thread_lock_;
AudioDeviceThread audio_thread_;
- scoped_ptr<AudioInputDevice::AudioThreadCallback> audio_callback_;
+ std::unique_ptr<AudioInputDevice::AudioThreadCallback> audio_callback_;
// Temporary hack to ignore OnStreamCreated() due to the user calling Stop()
// so we don't start the audio thread pointing to a potentially freed

Powered by Google App Engine
This is Rietveld 408576698