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

Unified Diff: content/renderer/media/mock_media_stream_dispatcher.cc

Issue 34393006: Refactor MediaStreamManager to never output real device id. It now always output sourceId in the fo… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix screen capture. Created 7 years, 2 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: content/renderer/media/mock_media_stream_dispatcher.cc
diff --git a/content/renderer/media/mock_media_stream_dispatcher.cc b/content/renderer/media/mock_media_stream_dispatcher.cc
index a1b9527959fe6c7baac2de3d64ea126eae0f8fb6..d9a83b0f17da9fc327aeeb3534d4d9cee759b3e8 100644
--- a/content/renderer/media/mock_media_stream_dispatcher.cc
+++ b/content/renderer/media/mock_media_stream_dispatcher.cc
@@ -28,13 +28,14 @@ void MockMediaStreamDispatcher::GenerateStream(
const GURL& url) {
request_id_ = request_id;
- stream_label_ = base::StringPrintf("%s%d","local_stream",request_id);
+ stream_label_ = base::StringPrintf("%s%d", "local_stream", request_id);
tommi (sloooow) - chröme 2013/10/29 17:21:17 why are we using %s to print "local_stream"?
perkj_chrome 2013/10/30 08:59:29 because its fun?
audio_array_.clear();
video_array_.clear();
if (IsAudioMediaType(components.audio_type)) {
StreamDeviceInfo audio;
- audio.device.id = "audio_device_id";
+ audio.device.id = base::StringPrintf("%s%d", "audio_device_id",
+ session_id_);
tommi (sloooow) - chröme 2013/10/29 17:21:17 same here
perkj_chrome 2013/10/30 08:59:29 Done.
audio.device.name = "microphone";
audio.device.type = components.audio_type;
audio.session_id = session_id_;
@@ -42,7 +43,8 @@ void MockMediaStreamDispatcher::GenerateStream(
}
if (IsVideoMediaType(components.video_type)) {
StreamDeviceInfo video;
- video.device.id = "video_device_id";
+ video.device.id = base::StringPrintf("%s%d", "video_device_id",
+ session_id_);
tommi (sloooow) - chröme 2013/10/29 17:21:17 and here :) fyi there's also another way to conver
perkj_chrome 2013/10/30 08:59:29 ok- maybe that is more readable.
video.device.name = "usb video camera";
video.device.type = components.video_type;
video.session_id = session_id_;

Powered by Google App Engine
This is Rietveld 408576698