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

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: Remove the histogram. Created 4 years, 1 month 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 e9a15eac46c3e07401d3a8554b946da93e04e576..3403b8be3865b8a3ef14737fcc0a84cc44b35d17 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,17 +259,12 @@ WebRTCConfiguration parseConfiguration(ExecutionContext* context,
DCHECK_EQ(bundlePolicyString, "balanced");
}
- // For the histogram value of "WebRTC.PeerConnection.SelectedRtcpMuxPolicy".
- *selectedRtcpMuxPolicy = RtcpMuxPolicyDefault;
- WebRTCRtcpMuxPolicy rtcpMuxPolicy = WebRTCRtcpMuxPolicy::kNegotiate;
+ WebRTCRtcpMuxPolicy rtcpMuxPolicy = WebRTCRtcpMuxPolicy::kRequire;
if (configuration.hasRtcpMuxPolicy()) {
foolip 2016/12/14 19:24:47 Now that rtcpMuxPolicy has a default value in the
zhihuang1 2016/12/15 19:14:28 Done.
String rtcpMuxPolicyString = configuration.rtcpMuxPolicy();
- if (rtcpMuxPolicyString == "require") {
- *selectedRtcpMuxPolicy = RtcpMuxPolicyRequire;
- rtcpMuxPolicy = WebRTCRtcpMuxPolicy::kRequire;
- } else {
+ if (rtcpMuxPolicyString != "require") {
foolip 2016/12/14 19:24:47 To match the above structure, I'd do: if (rtcpMux
zhihuang1 2016/12/15 19:14:28 Done.
DCHECK_EQ(rtcpMuxPolicyString, "negotiate");
- *selectedRtcpMuxPolicy = RtcpMuxPolicyNegotiate;
+ rtcpMuxPolicy = WebRTCRtcpMuxPolicy::kNegotiate;
}
}
@@ -441,11 +434,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 +467,6 @@ RTCPeerConnection* RTCPeerConnection::create(
if (exceptionState.hadException())
return 0;
- peerConnection->m_peerHandler->logSelectedRtcpMuxPolicy(
- selectedRtcpMuxPolicy);
-
return peerConnection;
}
@@ -813,9 +800,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