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 2f22f6861e5a0988b7a0e4f103b23206f012ed2d..97f306f93af8fedf1e899756a8aba557f7242bf7 100644 |
--- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp |
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp |
@@ -225,15 +225,30 @@ WebRTCConfiguration parseConfiguration(ExecutionContext* context, |
DCHECK(context); |
DCHECK(selectedRtcpMuxPolicy); |
- WebRTCIceTransports iceTransports = WebRTCIceTransports::kAll; |
- String iceTransportsString = configuration.iceTransports(); |
- if (iceTransportsString == "none") { |
- UseCounter::count(context, UseCounter::RTCConfigurationIceTransportsNone); |
- iceTransports = WebRTCIceTransports::kNone; |
- } else if (iceTransportsString == "relay") { |
- iceTransports = WebRTCIceTransports::kRelay; |
- } else { |
- DCHECK_EQ(iceTransportsString, "all"); |
+ WebRTCIceTransportPolicy iceTransportPolicy = WebRTCIceTransportPolicy::kAll; |
+ if (configuration.hasIceTransportPolicy()) { |
+ UseCounter::count(context, UseCounter::RTCConfigurationIceTransportPolicy); |
+ String iceTransportPolicyString = configuration.iceTransportPolicy(); |
+ if (iceTransportPolicyString == "none") { |
+ UseCounter::count(context, |
+ UseCounter::RTCConfigurationIceTransportPolicyNone); |
+ iceTransportPolicy = WebRTCIceTransportPolicy::kNone; |
+ } else if (iceTransportPolicyString == "relay") { |
+ iceTransportPolicy = WebRTCIceTransportPolicy::kRelay; |
+ } else { |
+ DCHECK_EQ(iceTransportPolicyString, "all"); |
+ } |
+ } else if (configuration.hasIceTransports()) { |
+ UseCounter::count(context, UseCounter::RTCConfigurationIceTransports); |
+ String iceTransportsString = configuration.iceTransports(); |
+ if (iceTransportsString == "none") { |
hta - Chromium
2016/10/25 13:37:41
Can you do these 2 translations of icetransportPol
foolip
2016/10/25 15:43:04
Done.
|
+ UseCounter::count(context, UseCounter::RTCConfigurationIceTransportsNone); |
+ iceTransportPolicy = WebRTCIceTransportPolicy::kNone; |
+ } else if (iceTransportsString == "relay") { |
+ iceTransportPolicy = WebRTCIceTransportPolicy::kRelay; |
+ } else { |
+ DCHECK_EQ(iceTransportsString, "all"); |
+ } |
} |
WebRTCBundlePolicy bundlePolicy = WebRTCBundlePolicy::kBalanced; |
@@ -261,7 +276,7 @@ WebRTCConfiguration parseConfiguration(ExecutionContext* context, |
} |
WebRTCConfiguration webConfiguration; |
- webConfiguration.iceTransports = iceTransports; |
+ webConfiguration.iceTransportPolicy = iceTransportPolicy; |
webConfiguration.bundlePolicy = bundlePolicy; |
webConfiguration.rtcpMuxPolicy = rtcpMuxPolicy; |