Chromium Code Reviews| 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; |