From 413379755777e3f38d4fd86e518d986771ac44eb Mon Sep 17 00:00:00 2001 From: Johannes Kron Date: Fri, 9 Jun 2023 10:49:09 +0000 Subject: [PATCH] Remove expired histograms WebRTC.PeerConnection.SrtpCryptoSuite Fixed: chromium:1448119 Change-Id: Ibf903626f78860e2fb33e5f58b37276c106fdcbe Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308380 Reviewed-by: Harald Alvestrand Commit-Queue: Johannes Kron Cr-Commit-Position: refs/heads/main@{#40254} --- pc/peer_connection.cc | 25 ------------------------- pc/peer_connection_integrationtest.cc | 8 -------- pc/test/integration_test_helpers.h | 4 ---- 3 files changed, 37 deletions(-) diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc index dd34f0fcd3..08d3a8a32f 100644 --- a/pc/peer_connection.cc +++ b/pc/peer_connection.cc @@ -2852,31 +2852,6 @@ void PeerConnection::ReportNegotiatedCiphers( return; } - if (srtp_crypto_suite != rtc::kSrtpInvalidCryptoSuite) { - for (cricket::MediaType media_type : media_types) { - switch (media_type) { - case cricket::MEDIA_TYPE_AUDIO: - RTC_HISTOGRAM_ENUMERATION_SPARSE( - "WebRTC.PeerConnection.SrtpCryptoSuite.Audio", srtp_crypto_suite, - rtc::kSrtpCryptoSuiteMaxValue); - break; - case cricket::MEDIA_TYPE_VIDEO: - RTC_HISTOGRAM_ENUMERATION_SPARSE( - "WebRTC.PeerConnection.SrtpCryptoSuite.Video", srtp_crypto_suite, - rtc::kSrtpCryptoSuiteMaxValue); - break; - case cricket::MEDIA_TYPE_DATA: - RTC_HISTOGRAM_ENUMERATION_SPARSE( - "WebRTC.PeerConnection.SrtpCryptoSuite.Data", srtp_crypto_suite, - rtc::kSrtpCryptoSuiteMaxValue); - break; - default: - RTC_DCHECK_NOTREACHED(); - continue; - } - } - } - if (ssl_cipher_suite != rtc::kTlsNullWithNullNull) { for (cricket::MediaType media_type : media_types) { switch (media_type) { diff --git a/pc/peer_connection_integrationtest.cc b/pc/peer_connection_integrationtest.cc index 43e307ea3d..58d3c9762e 100644 --- a/pc/peer_connection_integrationtest.cc +++ b/pc/peer_connection_integrationtest.cc @@ -1503,10 +1503,6 @@ TEST_P(PeerConnectionIntegrationTest, Dtls10CipherStatsAndUmaMetrics) { kDefaultTimeout); EXPECT_EQ_WAIT(rtc::SrtpCryptoSuiteToName(kDefaultSrtpCryptoSuite), caller()->OldGetStats()->SrtpCipher(), kDefaultTimeout); - // TODO(bugs.webrtc.org/9456): Fix it. - EXPECT_METRIC_EQ(1, webrtc::metrics::NumEvents( - "WebRTC.PeerConnection.SrtpCryptoSuite.Audio", - kDefaultSrtpCryptoSuite)); } // Test getting cipher stats and UMA metrics when DTLS 1.2 is negotiated. @@ -1525,10 +1521,6 @@ TEST_P(PeerConnectionIntegrationTest, Dtls12CipherStatsAndUmaMetrics) { kDefaultTimeout); EXPECT_EQ_WAIT(rtc::SrtpCryptoSuiteToName(kDefaultSrtpCryptoSuite), caller()->OldGetStats()->SrtpCipher(), kDefaultTimeout); - // TODO(bugs.webrtc.org/9456): Fix it. - EXPECT_METRIC_EQ(1, webrtc::metrics::NumEvents( - "WebRTC.PeerConnection.SrtpCryptoSuite.Audio", - kDefaultSrtpCryptoSuite)); } // Test that DTLS 1.0 can be used if the caller supports DTLS 1.2 and the diff --git a/pc/test/integration_test_helpers.h b/pc/test/integration_test_helpers.h index 966f0dab4a..24491e1a9d 100644 --- a/pc/test/integration_test_helpers.h +++ b/pc/test/integration_test_helpers.h @@ -1874,10 +1874,6 @@ class PeerConnectionIntegrationBaseTest : public ::testing::Test { ASSERT_TRUE_WAIT(DtlsConnected(), kDefaultTimeout); EXPECT_EQ_WAIT(rtc::SrtpCryptoSuiteToName(expected_cipher_suite), caller()->OldGetStats()->SrtpCipher(), kDefaultTimeout); - // TODO(bugs.webrtc.org/9456): Fix it. - EXPECT_METRIC_EQ(1, webrtc::metrics::NumEvents( - "WebRTC.PeerConnection.SrtpCryptoSuite.Audio", - expected_cipher_suite)); } void TestGcmNegotiationUsesCipherSuite(bool local_gcm_enabled,