diff --git a/api/uma_metrics.h b/api/uma_metrics.h index c4fecf0269..9eb3bf7e1f 100644 --- a/api/uma_metrics.h +++ b/api/uma_metrics.h @@ -83,14 +83,6 @@ enum IceCandidatePairType { // occurrences of events, while "Name" has a value associated with it which is // used to form a histogram. -// These values are persisted to logs. Entries should not be renumbered and -// numeric values should never be reused. -enum KeyExchangeProtocolType { - kEnumCounterKeyProtocolDtls = 0, - kEnumCounterKeyProtocolSdes = 1, - kEnumCounterKeyProtocolMax -}; - // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. enum KeyExchangeProtocolMedia { diff --git a/pc/peer_connection_integrationtest.cc b/pc/peer_connection_integrationtest.cc index ffe64fe8d8..19cc6ce3cf 100644 --- a/pc/peer_connection_integrationtest.cc +++ b/pc/peer_connection_integrationtest.cc @@ -268,12 +268,6 @@ TEST_P(PeerConnectionIntegrationTest, EndToEndCallWithDtls) { MediaExpectations media_expectations; media_expectations.ExpectBidirectionalAudioAndVideo(); ASSERT_TRUE(ExpectNewFrames(media_expectations)); - EXPECT_METRIC_LE( - 2, webrtc::metrics::NumEvents("WebRTC.PeerConnection.KeyProtocol", - webrtc::kEnumCounterKeyProtocolDtls)); - EXPECT_METRIC_EQ( - 0, webrtc::metrics::NumEvents("WebRTC.PeerConnection.KeyProtocol", - webrtc::kEnumCounterKeyProtocolSdes)); } #if defined(WEBRTC_FUCHSIA) @@ -293,12 +287,6 @@ TEST_P(PeerConnectionIntegrationTest, EndToEndCallWithSdes) { MediaExpectations media_expectations; media_expectations.ExpectBidirectionalAudioAndVideo(); ASSERT_TRUE(ExpectNewFrames(media_expectations)); - EXPECT_METRIC_LE( - 2, webrtc::metrics::NumEvents("WebRTC.PeerConnection.KeyProtocol", - webrtc::kEnumCounterKeyProtocolSdes)); - EXPECT_METRIC_EQ( - 0, webrtc::metrics::NumEvents("WebRTC.PeerConnection.KeyProtocol", - webrtc::kEnumCounterKeyProtocolDtls)); } #endif diff --git a/pc/sdp_offer_answer.cc b/pc/sdp_offer_answer.cc index 7b41fceb09..758a50c2c9 100644 --- a/pc/sdp_offer_answer.cc +++ b/pc/sdp_offer_answer.cc @@ -133,11 +133,6 @@ void NoteAddIceCandidateResult(int result) { kAddIceCandidateMax); } -void NoteKeyProtocol(KeyExchangeProtocolType protocol_type) { - RTC_HISTOGRAM_ENUMERATION("WebRTC.PeerConnection.KeyProtocol", protocol_type, - kEnumCounterKeyProtocolMax); -} - std::map GetBundleGroupsByMid( const SessionDescription* desc) { std::vector bundle_groups = @@ -331,9 +326,9 @@ RTCError VerifyCrypto(const SessionDescription* desc, if (content_info.rejected) { continue; } - // Note what media is used with each crypto protocol, for all sections. - NoteKeyProtocol(dtls_enabled ? webrtc::kEnumCounterKeyProtocolDtls - : webrtc::kEnumCounterKeyProtocolSdes); +#if !defined(WEBRTC_FUCHSIA) + RTC_CHECK(dtls_enabled) << "SDES protocol is only allowed in Fuchsia"; +#endif const std::string& mid = content_info.name; auto it = bundle_groups_by_mid.find(mid); const cricket::ContentGroup* bundle =