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: talk/app/webrtc/webrtcsession.cc

Issue 1337673002: Change WebRTC SslCipher to be exposed as number only. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@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 | « talk/app/webrtc/umametrics.h ('k') | talk/session/media/channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/webrtcsession.cc
diff --git a/talk/app/webrtc/webrtcsession.cc b/talk/app/webrtc/webrtcsession.cc
index 7f71961682cc3a97dfb1905a889b26675eb4a530..7241abf3cda5cdfc8e2b6052daba4a3b4d8d25d2 100644
--- a/talk/app/webrtc/webrtcsession.cc
+++ b/talk/app/webrtc/webrtcsession.cc
@@ -2149,32 +2149,33 @@ void WebRtcSession::ReportNegotiatedCiphers(
}
const std::string& srtp_cipher = stats.channel_stats[0].srtp_cipher;
- const std::string& ssl_cipher = stats.channel_stats[0].ssl_cipher;
- if (srtp_cipher.empty() && ssl_cipher.empty()) {
+ uint16_t ssl_cipher = stats.channel_stats[0].ssl_cipher;
+ if (srtp_cipher.empty() && !ssl_cipher) {
return;
}
- PeerConnectionMetricsName srtp_name;
- PeerConnectionMetricsName ssl_name;
+ PeerConnectionEnumCounterType srtp_counter_type;
+ PeerConnectionEnumCounterType ssl_counter_type;
if (stats.transport_name == cricket::CN_AUDIO) {
- srtp_name = kAudioSrtpCipher;
- ssl_name = kAudioSslCipher;
+ srtp_counter_type = kEnumCounterAudioSrtpCipher;
+ ssl_counter_type = kEnumCounterAudioSslCipher;
} else if (stats.transport_name == cricket::CN_VIDEO) {
- srtp_name = kVideoSrtpCipher;
- ssl_name = kVideoSslCipher;
+ srtp_counter_type = kEnumCounterVideoSrtpCipher;
+ ssl_counter_type = kEnumCounterVideoSslCipher;
} else if (stats.transport_name == cricket::CN_DATA) {
- srtp_name = kDataSrtpCipher;
- ssl_name = kDataSslCipher;
+ srtp_counter_type = kEnumCounterDataSrtpCipher;
+ ssl_counter_type = kEnumCounterDataSslCipher;
} else {
RTC_NOTREACHED();
return;
}
if (!srtp_cipher.empty()) {
- metrics_observer_->AddHistogramSample(srtp_name, srtp_cipher);
+ metrics_observer_->IncrementSparseEnumCounter(
+ srtp_counter_type, rtc::GetSrtpCryptoSuiteFromName(srtp_cipher));
}
- if (!ssl_cipher.empty()) {
- metrics_observer_->AddHistogramSample(ssl_name, ssl_cipher);
+ if (ssl_cipher) {
+ metrics_observer_->IncrementSparseEnumCounter(ssl_counter_type, ssl_cipher);
}
}
« no previous file with comments | « talk/app/webrtc/umametrics.h ('k') | talk/session/media/channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698