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

Unified Diff: third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp

Issue 2055553003: Change the default rtcp mux policy from negotiate to require. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years 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
Index: third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
index d14a5262bfbe37179521b6d8242aecd61c321100..7645e4118a46930868f1624c1949e1ce984ef49a 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
@@ -229,10 +229,8 @@ WebRTCIceTransportPolicy iceTransportPolicyFromString(const String& policy) {
WebRTCConfiguration parseConfiguration(ExecutionContext* context,
const RTCConfiguration& configuration,
- ExceptionState& exceptionState,
- RtcpMuxPolicy* selectedRtcpMuxPolicy) {
+ ExceptionState& exceptionState) {
DCHECK(context);
- DCHECK(selectedRtcpMuxPolicy);
WebRTCIceTransportPolicy iceTransportPolicy = WebRTCIceTransportPolicy::kAll;
if (configuration.hasIceTransportPolicy()) {
@@ -261,20 +259,13 @@ WebRTCConfiguration parseConfiguration(ExecutionContext* context,
DCHECK_EQ(bundlePolicyString, "balanced");
}
- // For the histogram value of "WebRTC.PeerConnection.SelectedRtcpMuxPolicy".
- *selectedRtcpMuxPolicy = RtcpMuxPolicyDefault;
- WebRTCRtcpMuxPolicy rtcpMuxPolicy = WebRTCRtcpMuxPolicy::kNegotiate;
- if (configuration.hasRtcpMuxPolicy()) {
- String rtcpMuxPolicyString = configuration.rtcpMuxPolicy();
- if (rtcpMuxPolicyString == "require") {
- *selectedRtcpMuxPolicy = RtcpMuxPolicyRequire;
- rtcpMuxPolicy = WebRTCRtcpMuxPolicy::kRequire;
- } else {
- DCHECK_EQ(rtcpMuxPolicyString, "negotiate");
- *selectedRtcpMuxPolicy = RtcpMuxPolicyNegotiate;
- }
+ WebRTCRtcpMuxPolicy rtcpMuxPolicy = WebRTCRtcpMuxPolicy::kRequire;
+ String rtcpMuxPolicyString = configuration.rtcpMuxPolicy();
+ if (rtcpMuxPolicyString == "negotiate") {
+ rtcpMuxPolicy = WebRTCRtcpMuxPolicy::kNegotiate;
+ } else {
+ DCHECK_EQ(rtcpMuxPolicyString, "require");
}
-
WebRTCConfiguration webConfiguration;
webConfiguration.iceTransportPolicy = iceTransportPolicy;
webConfiguration.bundlePolicy = bundlePolicy;
@@ -441,11 +432,8 @@ RTCPeerConnection* RTCPeerConnection::create(
UseCounter::count(context,
UseCounter::RTCPeerConnectionConstructorCompliant);
- // Record the RtcpMuxPolicy for histogram
- // "WebRTC.PeerConnection.SelectedRtcpMuxPolicy".
- RtcpMuxPolicy selectedRtcpMuxPolicy = RtcpMuxPolicyDefault;
- WebRTCConfiguration configuration = parseConfiguration(
- context, rtcConfiguration, exceptionState, &selectedRtcpMuxPolicy);
+ WebRTCConfiguration configuration =
+ parseConfiguration(context, rtcConfiguration, exceptionState);
if (exceptionState.hadException())
return 0;
@@ -477,9 +465,6 @@ RTCPeerConnection* RTCPeerConnection::create(
if (exceptionState.hadException())
return 0;
- peerConnection->m_peerHandler->logSelectedRtcpMuxPolicy(
- selectedRtcpMuxPolicy);
-
return peerConnection;
}
@@ -811,9 +796,8 @@ void RTCPeerConnection::updateIce(ExecutionContext* context,
if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState))
return;
- RtcpMuxPolicy selectedRtcpMuxPolicy = RtcpMuxPolicyDefault;
- WebRTCConfiguration configuration = parseConfiguration(
- context, rtcConfiguration, exceptionState, &selectedRtcpMuxPolicy);
+ WebRTCConfiguration configuration =
+ parseConfiguration(context, rtcConfiguration, exceptionState);
if (exceptionState.hadException())
return;

Powered by Google App Engine
This is Rietveld 408576698