diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-26 20:29:57 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-26 20:29:57 +0000 |
commit | dedde4ad4122d91d59e0ae862e616aba9620b393 (patch) | |
tree | 7b18f4267b36e087d3a206e2125ab82891ed993e /media/audio/alsa | |
parent | db1156813ca4e0c82a36bb1ded160f00f579b1c6 (diff) | |
download | chromium_src-dedde4ad4122d91d59e0ae862e616aba9620b393.zip chromium_src-dedde4ad4122d91d59e0ae862e616aba9620b393.tar.gz chromium_src-dedde4ad4122d91d59e0ae862e616aba9620b393.tar.bz2 |
Convert scoped_ptr_malloc -> scoped_ptr, part 2.
scoped_ptr_malloc is deprecated; let's get rid of it.
BUG=344245
R=brettw@chromium.org
TBR=rsleevi@chromium.org,miket@chromium.org,ryanmyers@chromium.org,dalecurtis@chromium.org, cpu@chromium.org
Review URL: https://codereview.chromium.org/169193002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253582 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/alsa')
-rw-r--r-- | media/audio/alsa/alsa_output.cc | 4 | ||||
-rw-r--r-- | media/audio/alsa/audio_manager_alsa.cc | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/media/audio/alsa/alsa_output.cc b/media/audio/alsa/alsa_output.cc index f28dfca..308bedc 100644 --- a/media/audio/alsa/alsa_output.cc +++ b/media/audio/alsa/alsa_output.cc @@ -535,13 +535,13 @@ std::string AlsaPcmOutputStream::FindDeviceForChannels(uint32 channels) { for (void** hint_iter = hints; *hint_iter != NULL; hint_iter++) { // Only examine devices that are output capable.. Valid values are // "Input", "Output", and NULL which means both input and output. - scoped_ptr_malloc<char> io( + scoped_ptr<char, base::FreeDeleter> io( wrapper_->DeviceNameGetHint(*hint_iter, kIoHintName)); if (io != NULL && strcmp(io.get(), "Input") == 0) continue; // Attempt to select the closest device for number of channels. - scoped_ptr_malloc<char> name( + scoped_ptr<char, base::FreeDeleter> name( wrapper_->DeviceNameGetHint(*hint_iter, kNameHintName)); if (strncmp(wanted_device, name.get(), strlen(wanted_device)) == 0) { guessed_device = name.get(); diff --git a/media/audio/alsa/audio_manager_alsa.cc b/media/audio/alsa/audio_manager_alsa.cc index 7d6421f..beb60ba 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. |