diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-14 00:13:35 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-14 00:13:35 +0000 |
commit | e2f9086f94991bc35b6ea93b3e422fa39099ad84 (patch) | |
tree | 383bb1b92cd8207f9ead4eb32682cfda6cf0a46b /content/renderer/p2p | |
parent | 0c56006b65298dc08010fc00edf8ebffe651b7e7 (diff) | |
download | chromium_src-e2f9086f94991bc35b6ea93b3e422fa39099ad84.zip chromium_src-e2f9086f94991bc35b6ea93b3e422fa39099ad84.tar.gz chromium_src-e2f9086f94991bc35b6ea93b3e422fa39099ad84.tar.bz2 |
Add a flag to turn on TCP server socket for WebRTC
New flag to enable TCP server socket.
Review URL: https://chromiumcodereview.appspot.com/16876003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206239 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/p2p')
-rw-r--r-- | content/renderer/p2p/port_allocator.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/content/renderer/p2p/port_allocator.cc b/content/renderer/p2p/port_allocator.cc index b077b45..edab294 100644 --- a/content/renderer/p2p/port_allocator.cc +++ b/content/renderer/p2p/port_allocator.cc @@ -5,9 +5,11 @@ #include "content/renderer/p2p/port_allocator.h" #include "base/bind.h" +#include "base/command_line.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" +#include "content/public/common/content_switches.h" #include "content/renderer/p2p/host_address_request.h" #include "jingle/glue/utils.h" #include "net/base/escape.h" @@ -76,7 +78,10 @@ P2PPortAllocator::P2PPortAllocator( set_flags(flags); // TODO(ronghuawu): crbug/138185 add ourselves to the firewall list in browser // process and then remove below line. - set_allow_tcp_listen(false); + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableWebRtcTcpServerSocket)) { + set_allow_tcp_listen(false); + } } P2PPortAllocator::~P2PPortAllocator() { |