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

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

Issue 1335023002: Add UMA metrics and finch experiment for DTLS1.2 in WebRTC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/peer_connection_dependency_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_peer_connection_handler.cc
diff --git a/content/renderer/media/rtc_peer_connection_handler.cc b/content/renderer/media/rtc_peer_connection_handler.cc
index 33ff2a29157c3db11687a98c3a73c088560bc8f9..e8a1e15243b23d3d397529c0960c26f5dace9d87 100644
--- a/content/renderer/media/rtc_peer_connection_handler.cc
+++ b/content/renderer/media/rtc_peer_connection_handler.cc
@@ -14,6 +14,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/metrics/histogram.h"
+#include "base/metrics/sparse_histogram.h"
#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/thread_task_runner_handle.h"
@@ -552,6 +553,41 @@ class PeerConnectionUMAObserver : public webrtc::UMAObserver {
}
}
+ void IncrementSparseEnumCounter(
+ webrtc::PeerConnectionEnumCounterType counter_type,
+ int counter) override {
+ switch (counter_type) {
+ case webrtc::kEnumCounterAudioSrtpCipher:
+ UMA_HISTOGRAM_SPARSE_SLOWLY(
+ "WebRTC.PeerConnection.SrtpCryptoSuite.Audio", counter);
+ break;
+ case webrtc::kEnumCounterAudioSslCipher:
+ UMA_HISTOGRAM_SPARSE_SLOWLY(
+ "WebRTC.PeerConnection.SslCipherSuite.Audio", counter);
+ break;
+ case webrtc::kEnumCounterVideoSrtpCipher:
+ UMA_HISTOGRAM_SPARSE_SLOWLY(
+ "WebRTC.PeerConnection.SrtpCryptoSuite.Video", counter);
+ break;
+ case webrtc::kEnumCounterVideoSslCipher:
+ UMA_HISTOGRAM_SPARSE_SLOWLY(
+ "WebRTC.PeerConnection.SslCipherSuite.Video", counter);
+ break;
+ case webrtc::kEnumCounterDataSrtpCipher:
+ UMA_HISTOGRAM_SPARSE_SLOWLY(
+ "WebRTC.PeerConnection.SrtpCryptoSuite.Data", counter);
+ break;
+ case webrtc::kEnumCounterDataSslCipher:
+ UMA_HISTOGRAM_SPARSE_SLOWLY("WebRTC.PeerConnection.SslCipherSuite.Data",
+ counter);
+ break;
+ default:
+ // The default clause is expected to reach when new enum types are
+ // added.
+ break;
+ }
+ }
+
void AddHistogramSample(webrtc::PeerConnectionUMAMetricsName type,
int value) override {
// Runs on libjingle's signaling thread.
« no previous file with comments | « no previous file | content/renderer/media/webrtc/peer_connection_dependency_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698