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

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

Issue 1625743002: Add UMA histograms for HtmlVideoElementCapturerSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 | « no previous file | content/renderer/media/webrtc_uma_histograms.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/html_video_element_capturer_source.cc
diff --git a/content/renderer/media/html_video_element_capturer_source.cc b/content/renderer/media/html_video_element_capturer_source.cc
index 293b9fe95e48098f84e202e5c3ea7483696f8e97..75744f8fb0c1d1bcf6110ac356bb5da1b1bdc46e 100644
--- a/content/renderer/media/html_video_element_capturer_source.cc
+++ b/content/renderer/media/html_video_element_capturer_source.cc
@@ -8,6 +8,7 @@
#include "base/trace_event/trace_event.h"
#include "content/public/renderer/render_thread.h"
#include "content/renderer/media/media_stream_video_source.h"
+#include "content/renderer/media/webrtc_uma_histograms.h"
#include "media/base/limits.h"
#include "media/blink/webmediaplayer_impl.h"
#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
@@ -28,6 +29,10 @@ scoped_ptr<HtmlVideoElementCapturerSource>
HtmlVideoElementCapturerSource::CreateFromWebMediaPlayerImpl(
blink::WebMediaPlayer* player,
const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) {
+ // Save histogram data so we can see how much HTML Video capture is used.
+ // The histogram counts the number of calls to the JS API.
+ UpdateWebRTCMethodCount(WEBKIT_VIDEO_CAPTURE_STREAM);
+
return make_scoped_ptr(new HtmlVideoElementCapturerSource(
static_cast<media::WebMediaPlayerImpl*>(player)->AsWeakPtr(),
io_task_runner));
« no previous file with comments | « no previous file | content/renderer/media/webrtc_uma_histograms.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698