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

Unified Diff: media/audio/mac/audio_manager_mac.cc

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/mac/audio_manager_mac.h ('k') | media/audio/mock_audio_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_manager_mac.cc
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
index 37b6bac689c7cbb848ffa1124155373fb4b94507..b0744eeaa1f10bbb1f87443686f18bd2a61e02f0 100644
--- a/media/audio/mac/audio_manager_mac.cc
+++ b/media/audio/mac/audio_manager_mac.cc
@@ -133,8 +133,8 @@ static void GetAudioDeviceInfo(bool is_input,
// Get the array of device ids for all the devices, which includes both
// input devices and output devices.
- scoped_ptr<AudioDeviceID, base::FreeDeleter>
- devices(static_cast<AudioDeviceID*>(malloc(size)));
+ std::unique_ptr<AudioDeviceID, base::FreeDeleter> devices(
+ static_cast<AudioDeviceID*>(malloc(size)));
AudioDeviceID* device_ids = devices.get();
result = AudioObjectGetPropertyData(kAudioObjectSystemObject,
&property_address,
@@ -412,7 +412,7 @@ bool AudioManagerMac::GetDeviceChannels(AudioDeviceID device,
if (result != noErr || !size)
return false;
- scoped_ptr<uint8_t[]> list_storage(new uint8_t[size]);
+ std::unique_ptr<uint8_t[]> list_storage(new uint8_t[size]);
AudioBufferList& buffer_list =
*reinterpret_cast<AudioBufferList*>(list_storage.get());
@@ -534,8 +534,8 @@ std::string AudioManagerMac::GetAssociatedOutputDeviceID(
return std::string();
int device_count = size / sizeof(AudioDeviceID);
- scoped_ptr<AudioDeviceID, base::FreeDeleter>
- devices(static_cast<AudioDeviceID*>(malloc(size)));
+ std::unique_ptr<AudioDeviceID, base::FreeDeleter> devices(
+ static_cast<AudioDeviceID*>(malloc(size)));
result = AudioObjectGetPropertyData(
device, &pa, 0, NULL, &size, devices.get());
if (result)
« no previous file with comments | « media/audio/mac/audio_manager_mac.h ('k') | media/audio/mock_audio_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698