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

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

Issue 2447033002: Support RTCConfiguration iceTransportPolicy (Closed)
Patch Set: Created 4 years, 2 months 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 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;

Powered by Google App Engine
This is Rietveld 408576698