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

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

Issue 169193002: Convert scoped_ptr_malloc -> scoped_ptr, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 10 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/alsa/audio_manager_alsa.cc ('k') | net/base/io_buffer.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 4b4e4fab1e39f211dafb2daf26f66277502a9748..79ebe609ea9f4daba77e89c0dcc4354e5bb3c0e5 100644
--- a/media/audio/mac/audio_manager_mac.cc
+++ b/media/audio/mac/audio_manager_mac.cc
@@ -76,8 +76,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_malloc<AudioDeviceID>
- devices(reinterpret_cast<AudioDeviceID*>(malloc(size)));
+ scoped_ptr<AudioDeviceID, base::FreeDeleter>
+ devices(static_cast<AudioDeviceID*>(malloc(size)));
AudioDeviceID* device_ids = devices.get();
result = AudioObjectGetPropertyData(kAudioObjectSystemObject,
&property_address,
@@ -488,8 +488,8 @@ std::string AudioManagerMac::GetAssociatedOutputDeviceID(
return std::string();
int device_count = size / sizeof(AudioDeviceID);
- scoped_ptr_malloc<AudioDeviceID>
- devices(reinterpret_cast<AudioDeviceID*>(malloc(size)));
+ scoped_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/alsa/audio_manager_alsa.cc ('k') | net/base/io_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698