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 b1d41042e14f5e3a690e76337f137428ab7e7c15..0f506203d045e611fbbf404d4ad0db8599f74288 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") { |
|
hbos_chromium
2016/12/15 15:12:06
This CL gives rtcpMuxPolicy a default value, but i
foolip
2016/12/15 15:26:03
If dictionary members have a default value, they c
hbos_chromium
2016/12/15 15:31:55
Oh cool!
|
| + 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; |
| } |
| @@ -812,9 +797,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; |