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

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

Issue 427713004: Add histogram WebRTC.UserMediaRequest.Events to allow to track getUserMedia failures and hangs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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/webrtc_uma_histograms.cc
diff --git a/content/renderer/media/webrtc_uma_histograms.cc b/content/renderer/media/webrtc_uma_histograms.cc
index 16da393073e45e1b27d8f4e055faa0a898d7f9f2..80a5e4471c9a6eb93ccb32ec345a367b21000b48 100644
--- a/content/renderer/media/webrtc_uma_histograms.cc
+++ b/content/renderer/media/webrtc_uma_histograms.cc
@@ -8,6 +8,16 @@
namespace content {
+void LogUserMediaRequestEvent(UserMediaRequestEvent event) {
+ UMA_HISTOGRAM_ENUMERATION(
+ "WebRTC.UserMediaRequest.Event", event, NUM_USERMEDIAREQUEST_EVENTS);
+}
+
+void LogUserMediaRequestResult(MediaStreamRequestResult result) {
+ LogUserMediaRequestEvent(
+ static_cast<UserMediaRequestEvent>(USERMEDIAREQUEST_RESULT + result));
+}
+
void UpdateWebRTCMethodCount(JavaScriptAPIName api_name) {
DVLOG(3) << "Incrementing WebRTC.webkitApiCount for " << api_name;
UMA_HISTOGRAM_ENUMERATION("WebRTC.webkitApiCount", api_name, INVALID_NAME);

Powered by Google App Engine
This is Rietveld 408576698