Reapply 23529005 after fixing the build break issue (Chromium:582133002)

Review URL: https://webrtc-codereview.appspot.com/23529005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7253 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
guoweis@webrtc.org 2014-09-19 21:06:12 +00:00
parent ed5ca1f122
commit 97ed39344a

View File

@ -39,6 +39,9 @@
#include "talk/session/media/channelmanager.h" #include "talk/session/media/channelmanager.h"
#include "webrtc/base/logging.h" #include "webrtc/base/logging.h"
#include "webrtc/base/stringencode.h" #include "webrtc/base/stringencode.h"
#ifdef WEBRTC_CHROMIUM_BUILD
#include "webrtc/system_wrappers/interface/field_trial.h"
#endif
namespace { namespace {
@ -353,12 +356,19 @@ bool PeerConnection::DoInitialize(
cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG |
cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET; cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET;
bool value; bool value;
// If IPv6 flag was specified, we'll not override it by experiment.
if (FindConstraint( if (FindConstraint(
constraints, constraints, MediaConstraintsInterface::kEnableIPv6, &value, NULL)) {
MediaConstraintsInterface::kEnableIPv6, if (value) {
&value, NULL) && 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; portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_IPV6;
} }
#endif // WEBRTC_CHROMIUM_BUILD
port_allocator_->set_flags(portallocator_flags); port_allocator_->set_flags(portallocator_flags);
// No step delay is used while allocating ports. // No step delay is used while allocating ports.