summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorguoweis@webrtc.org <guoweis@webrtc.org>2014-09-15 16:31:13 +0000
committerguoweis@webrtc.org <guoweis@webrtc.org>2014-09-15 16:31:13 +0000
commit6d3e4cf47ba3ad100bc629f1ec40aa99a76f70c4 (patch)
tree8ec0d492f2dea9a87d9e6adb08fb0130ea298d6c /app
parent22ea4927bbfadf21a8fd6349317a9402a31b37e9 (diff)
downloadtalk-6d3e4cf47ba3ad100bc629f1ec40aa99a76f70c4.tar.gz
Enable ipv6 by default for webrtc under a Finch experiment.
BUG=413437 (chromium) https://code.google.com/p/chromium/issues/detail?id=413437 Review URL: https://webrtc-codereview.appspot.com/23529005 git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@7184 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'app')
-rw-r--r--app/webrtc/peerconnection.cc16
1 files changed, 13 insertions, 3 deletions
diff --git a/app/webrtc/peerconnection.cc b/app/webrtc/peerconnection.cc
index 3698381..d133889 100644
--- a/app/webrtc/peerconnection.cc
+++ b/app/webrtc/peerconnection.cc
@@ -39,6 +39,9 @@
#include "talk/session/media/channelmanager.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/stringencode.h"
+#ifdef WEBRTC_CHROMIUM_BUILD
+#include "webrtc/system_wrappers/interface/field_trial.h"
+#endif
namespace {
@@ -353,12 +356,19 @@ bool PeerConnection::DoInitialize(
cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG |
cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET;
bool value;
+ // If IPv6 flag was specified, we'll not override it by experiment.
if (FindConstraint(
- constraints,
- MediaConstraintsInterface::kEnableIPv6,
- &value, NULL) && value) {
+ constraints, MediaConstraintsInterface::kEnableIPv6, &value, NULL)) {
+ if (value) {
+ portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_IPV6;
+ }
+ }
+#ifdef WEBRTC_CHROMIUM_BUILD
+ else if (webrtc::field_trial::FindFullName("WebRTC-IPv6Default") ==
+ "Enabled") {
portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_IPV6;
}
+#endif // WEBRTC_CHROMIUM_BUILD
port_allocator_->set_flags(portallocator_flags);
// No step delay is used while allocating ports.