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

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

Issue 88283002: Reland review 34393006: Refactor MediaStreamManager to not output real device id. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes since the revert. Created 7 years, 1 month 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: content/browser/renderer_host/media/media_stream_ui_proxy.cc
diff --git a/content/browser/renderer_host/media/media_stream_ui_proxy.cc b/content/browser/renderer_host/media/media_stream_ui_proxy.cc
index 3e4edbc0ac03b672d71c4aa2c91e06a997199cd6..b91ccb12095d293374e743d74f8bdfabb7c2f9f8 100644
--- a/content/browser/renderer_host/media/media_stream_ui_proxy.cc
+++ b/content/browser/renderer_host/media/media_stream_ui_proxy.cc
@@ -193,12 +193,16 @@ void FakeMediaStreamUIProxy::RequestAccess(
it != devices_.end(); ++it) {
if (!accepted_audio &&
IsAudioMediaType(request.audio_type) &&
- IsAudioMediaType(it->type)) {
+ IsAudioMediaType(it->type) &&
+ (request.requested_audio_device_id.empty() ||
+ request.requested_audio_device_id == it->id)) {
devices_to_use.push_back(*it);
accepted_audio = true;
} else if (!accepted_video &&
IsVideoMediaType(request.video_type) &&
- IsVideoMediaType(it->type)) {
+ IsVideoMediaType(it->type) &&
+ (request.requested_video_device_id.empty() ||
+ request.requested_video_device_id == it->id)) {
devices_to_use.push_back(*it);
accepted_video = true;
}

Powered by Google App Engine
This is Rietveld 408576698