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

Unified Diff: content/renderer/media/mock_media_stream_dispatcher.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: Rebase 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
« no previous file with comments | « content/renderer/media/media_stream_impl.cc ('k') | media/audio/mock_audio_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..793fe3a6e247e1005d4f561d0cd619b1039ee90b 100644
--- a/content/renderer/media/mock_media_stream_dispatcher.cc
+++ b/content/renderer/media/mock_media_stream_dispatcher.cc
@@ -4,7 +4,7 @@
#include "content/renderer/media/mock_media_stream_dispatcher.h"
-#include "base/strings/stringprintf.h"
+#include "base/strings/string_number_conversions.h"
#include "content/public/common/media_stream_request.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -28,13 +28,13 @@ void MockMediaStreamDispatcher::GenerateStream(
const GURL& url) {
request_id_ = request_id;
- stream_label_ = base::StringPrintf("%s%d","local_stream",request_id);
+ stream_label_ = "local_stream" + base::IntToString(request_id);
audio_array_.clear();
video_array_.clear();
if (IsAudioMediaType(components.audio_type)) {
StreamDeviceInfo audio;
- audio.device.id = "audio_device_id";
+ audio.device.id = "audio_device_id" + base::IntToString(session_id_);
audio.device.name = "microphone";
audio.device.type = components.audio_type;
audio.session_id = session_id_;
@@ -42,7 +42,7 @@ void MockMediaStreamDispatcher::GenerateStream(
}
if (IsVideoMediaType(components.video_type)) {
StreamDeviceInfo video;
- video.device.id = "video_device_id";
+ video.device.id = "video_device_id" + base::IntToString(session_id_);
video.device.name = "usb video camera";
video.device.type = components.video_type;
video.session_id = session_id_;
« no previous file with comments | « content/renderer/media/media_stream_impl.cc ('k') | media/audio/mock_audio_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698