diff options
author | hubbe@chromium.org <hubbe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-26 14:49:28 +0000 |
---|---|---|
committer | hubbe@chromium.org <hubbe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-26 14:49:28 +0000 |
commit | 220ca7cf6e6374b9dd0423f0afe6b2520df70f9d (patch) | |
tree | 61fecf663064741b169f44de0d3dc89d48f00a55 /content | |
parent | b0066b94924d97480dbd485663bb957792472ed7 (diff) | |
download | chromium_src-220ca7cf6e6374b9dd0423f0afe6b2520df70f9d.zip chromium_src-220ca7cf6e6374b9dd0423f0afe6b2520df70f9d.tar.gz chromium_src-220ca7cf6e6374b9dd0423f0afe6b2520df70f9d.tar.bz2 |
Remove the flag for disabling the P2P stun filter.
This flag is no longer needed as cast no longer use p2p sockets.
This is a revert of https://codereview.chromium.org/111833003
Review URL: https://codereview.chromium.org/173113003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253450 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/renderer_host/p2p/socket_host_udp.cc | 11 | ||||
-rw-r--r-- | content/public/common/content_switches.cc | 5 | ||||
-rw-r--r-- | content/public/common/content_switches.h | 1 |
3 files changed, 2 insertions, 15 deletions
diff --git a/content/browser/renderer_host/p2p/socket_host_udp.cc b/content/browser/renderer_host/p2p/socket_host_udp.cc index 921eac8..ed40ec7 100644 --- a/content/browser/renderer_host/p2p/socket_host_udp.cc +++ b/content/browser/renderer_host/p2p/socket_host_udp.cc @@ -5,12 +5,10 @@ #include "content/browser/renderer_host/p2p/socket_host_udp.h" #include "base/bind.h" -#include "base/command_line.h" #include "base/debug/trace_event.h" #include "base/stl_util.h" #include "content/browser/renderer_host/p2p/socket_host_throttler.h" #include "content/common/p2p_messages.h" -#include "content/public/common/content_switches.h" #include "ipc/ipc_sender.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" @@ -43,11 +41,6 @@ bool IsTransientError(int error) { error == net::ERR_OUT_OF_MEMORY; } -bool AllowUDPWithoutSTUN() { - return CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDisableP2PSocketSTUNFilter); -} - } // namespace namespace content { @@ -162,7 +155,7 @@ void P2PSocketHostUdp::HandleReadResult(int result) { if (!ContainsKey(connected_peers_, recv_address_)) { P2PSocketHost::StunMessageType type; bool stun = GetStunPacketType(&*data.begin(), data.size(), &type); - if ((stun && IsRequestOrResponse(type)) || AllowUDPWithoutSTUN()) { + if ((stun && IsRequestOrResponse(type))) { connected_peers_.insert(recv_address_); } else if (!stun || type == STUN_DATA_INDICATION) { LOG(ERROR) << "Received unexpected data packet from " @@ -190,7 +183,7 @@ void P2PSocketHostUdp::Send(const net::IPEndPoint& to, return; } - if (!ContainsKey(connected_peers_, to) && !AllowUDPWithoutSTUN()) { + if (!ContainsKey(connected_peers_, to)) { P2PSocketHost::StunMessageType type = P2PSocketHost::StunMessageType(); bool stun = GetStunPacketType(&*data.begin(), data.size(), &type); if (!stun || type == STUN_DATA_INDICATION) { diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc index 12912aa..be23f3d 100644 --- a/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc @@ -252,11 +252,6 @@ const char kDisableLogging[] = "disable-logging"; // Disables overlay scrollbars on Aura or Linux. Does nothing on Mac. const char kDisableOverlayScrollbar[] = "disable-overlay-scrollbar"; -// Allows P2P sockets to talk UDP to other servers without using STUN first. -// For development only, use with caution. -// TODO(hubbe): Remove this flag. -const char kDisableP2PSocketSTUNFilter[] = "disable-p2psocket-stun-filter"; - // Disable Pepper3D. const char kDisablePepper3d[] = "disable-pepper-3d"; diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h index 2772af5..4e7266e 100644 --- a/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h @@ -82,7 +82,6 @@ extern const char kDisableKillAfterBadIPC[]; CONTENT_EXPORT extern const char kDisableLocalStorage[]; CONTENT_EXPORT extern const char kDisableLogging[]; extern const char kDisableNavigatorContentUtils[]; -CONTENT_EXPORT extern const char kDisableP2PSocketSTUNFilter[]; extern const char kDisablePepper3d[]; CONTENT_EXPORT extern const char kDisablePinch[]; CONTENT_EXPORT extern const char kDisablePlugins[]; |