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

Unified Diff: media/audio/alsa/audio_manager_alsa.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/alsa_output.cc ('k') | media/audio/mac/audio_manager_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/alsa/audio_manager_alsa.cc
diff --git a/media/audio/alsa/audio_manager_alsa.cc b/media/audio/alsa/audio_manager_alsa.cc
index 7d6421f2cfec691a7f6a7b81a221d3c7f6460347..beb60bad88b02af515dd1075fb54a43edd226cb6 100644
--- a/media/audio/alsa/audio_manager_alsa.cc
+++ b/media/audio/alsa/audio_manager_alsa.cc
@@ -152,8 +152,8 @@ void AudioManagerAlsa::GetAlsaDevicesInfo(
for (void** hint_iter = hints; *hint_iter != NULL; hint_iter++) {
// Only examine devices of the right type. Valid values are
// "Input", "Output", and NULL which means both input and output.
- scoped_ptr_malloc<char> io(wrapper_->DeviceNameGetHint(*hint_iter,
- kIoHintName));
+ scoped_ptr<char, base::FreeDeleter> io(wrapper_->DeviceNameGetHint(
+ *hint_iter, kIoHintName));
if (io != NULL && strcmp(unwanted_device_type, io.get()) == 0)
continue;
@@ -169,13 +169,13 @@ void AudioManagerAlsa::GetAlsaDevicesInfo(
}
// Get the unique device name for the device.
- scoped_ptr_malloc<char> unique_device_name(
+ scoped_ptr<char, base::FreeDeleter> unique_device_name(
wrapper_->DeviceNameGetHint(*hint_iter, kNameHintName));
// Find out if the device is available.
if (IsAlsaDeviceAvailable(type, unique_device_name.get())) {
// Get the description for the device.
- scoped_ptr_malloc<char> desc(wrapper_->DeviceNameGetHint(
+ scoped_ptr<char, base::FreeDeleter> desc(wrapper_->DeviceNameGetHint(
*hint_iter, kDescriptionHintName));
media::AudioDeviceName name;
@@ -252,8 +252,8 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice(
for (void** hint_iter = hints; *hint_iter != NULL; hint_iter++) {
// Only examine devices that are |stream| capable. Valid values are
// "Input", "Output", and NULL which means both input and output.
- scoped_ptr_malloc<char> io(wrapper_->DeviceNameGetHint(*hint_iter,
- kIoHintName));
+ scoped_ptr<char, base::FreeDeleter> io(wrapper_->DeviceNameGetHint(
+ *hint_iter, kIoHintName));
const char* unwanted_type = UnwantedDeviceTypeWhenEnumerating(stream);
if (io != NULL && strcmp(unwanted_type, io.get()) == 0)
continue; // Wrong type, skip the device.
« no previous file with comments | « media/audio/alsa/alsa_output.cc ('k') | media/audio/mac/audio_manager_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698