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

Unified Diff: media/audio/alsa/alsa_output.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: 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/alsa/alsa_output.cc
diff --git a/media/audio/alsa/alsa_output.cc b/media/audio/alsa/alsa_output.cc
index 9216def5e2d6b70a3fc88e113688c8e5db9c6333..c127fb4c2e93a9c6bfd000e41b9717bd181681e1 100644
--- a/media/audio/alsa/alsa_output.cc
+++ b/media/audio/alsa/alsa_output.cc
@@ -561,13 +561,13 @@ std::string AlsaPcmOutputStream::FindDeviceForChannels(uint32_t 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<char, base::FreeDeleter> io(
+ std::unique_ptr<char, base::FreeDeleter> io(
danakj 2016/04/22 22:47:35 include memory
dcheng 2016/04/22 23:13:19 I shall invoke the style guide here: "However, any
danakj 2016/04/22 23:15:38 Oh okay I can adjust my algorithm then.
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<char, base::FreeDeleter> name(
+ std::unique_ptr<char, base::FreeDeleter> name(
wrapper_->DeviceNameGetHint(*hint_iter, kNameHintName));
if (strncmp(wanted_device, name.get(), strlen(wanted_device)) == 0) {
guessed_device = name.get();

Powered by Google App Engine
This is Rietveld 408576698