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

Unified Diff: content/browser/renderer_host/media/media_stream_manager.cc

Issue 1607923002: Correctly handle enumerations for AudioManagers that report only the default audio output device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 11 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 | « content/browser/renderer_host/media/audio_renderer_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/media_stream_manager.cc
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index 49c828b00ecebe32dbbb583c936f87e3dcc45c8d..f602e8d26b18da9875b53e46862955751067afd3 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -739,10 +739,8 @@ void MediaStreamManager::AudioOutputDevicesEnumerated(
DVLOG(1) << "AudioOutputDevicesEnumerated()";
StreamDeviceInfoArray device_infos;
- // If the enumeration contains only one entry, it means there are no devices.
- // The single entry contains default parameters from the audio manager.
- if (device_enumeration.size() > 1) {
- for (const auto& entry : device_enumeration) {
+ if (device_enumeration.has_actual_devices) {
+ for (const auto& entry : device_enumeration.devices) {
StreamDeviceInfo device_info(MEDIA_DEVICE_AUDIO_OUTPUT, entry.device_name,
entry.unique_id);
device_infos.push_back(device_info);
« no previous file with comments | « content/browser/renderer_host/media/audio_renderer_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698