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

Side by Side Diff: content/renderer/media/webrtc_uma_histograms.cc

Issue 446553002: Add histogram WebRTC.UserMediaRequest.NoResultState to track user media requests with no result. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b399835
Patch Set: Actually fix histogram.xml nit. 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 unified diff | Download patch
« no previous file with comments | « content/renderer/media/webrtc_uma_histograms.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/webrtc_uma_histograms.h" 5 #include "content/renderer/media/webrtc_uma_histograms.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 void LogUserMediaRequestWithNoResult(MediaStreamRequestState state) {
12 UMA_HISTOGRAM_ENUMERATION("WebRTC.UserMediaRequest.NoResultState",
13 state,
14 NUM_MEDIA_STREAM_REQUEST_WITH_NO_RESULT);
15 }
16
11 void LogUserMediaRequestResult(MediaStreamRequestResult result) { 17 void LogUserMediaRequestResult(MediaStreamRequestResult result) {
12 UMA_HISTOGRAM_ENUMERATION( 18 UMA_HISTOGRAM_ENUMERATION(
13 "WebRTC.UserMediaRequest.Result", result, NUM_MEDIA_REQUEST_RESULTS); 19 "WebRTC.UserMediaRequest.Result", result, NUM_MEDIA_REQUEST_RESULTS);
14 } 20 }
15 21
16 void UpdateWebRTCMethodCount(JavaScriptAPIName api_name) { 22 void UpdateWebRTCMethodCount(JavaScriptAPIName api_name) {
17 DVLOG(3) << "Incrementing WebRTC.webkitApiCount for " << api_name; 23 DVLOG(3) << "Incrementing WebRTC.webkitApiCount for " << api_name;
18 UMA_HISTOGRAM_ENUMERATION("WebRTC.webkitApiCount", api_name, INVALID_NAME); 24 UMA_HISTOGRAM_ENUMERATION("WebRTC.webkitApiCount", api_name, INVALID_NAME);
19 PerSessionWebRTCAPIMetrics::GetInstance()->LogUsageOnlyOnce(api_name); 25 PerSessionWebRTCAPIMetrics::GetInstance()->LogUsageOnlyOnce(api_name);
20 } 26 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 LogUsage(api_name); 62 LogUsage(api_name);
57 } 63 }
58 } 64 }
59 65
60 void PerSessionWebRTCAPIMetrics::ResetUsage() { 66 void PerSessionWebRTCAPIMetrics::ResetUsage() {
61 for (size_t i = 0; i < arraysize(has_used_api_); ++i) 67 for (size_t i = 0; i < arraysize(has_used_api_); ++i)
62 has_used_api_[i] = false; 68 has_used_api_[i] = false;
63 } 69 }
64 70
65 } // namespace content 71 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_uma_histograms.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698