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

Unified Diff: content/renderer/p2p/port_allocator.cc

Issue 1309543004: Create a new preference which disables UDP protocol for WebRTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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: content/renderer/p2p/port_allocator.cc
diff --git a/content/renderer/p2p/port_allocator.cc b/content/renderer/p2p/port_allocator.cc
index 7a1abdc216648d18b693d50dd36db484bfb13348..92edf524fb6ff837dd2b8259b767b9aea0bc76a5 100644
--- a/content/renderer/p2p/port_allocator.cc
+++ b/content/renderer/p2p/port_allocator.cc
@@ -39,6 +39,11 @@ P2PPortAllocator::P2PPortAllocator(
flags |= cricket::PORTALLOCATOR_DISABLE_TCP;
if (!config_.enable_multiple_routes)
flags |= cricket::PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION;
+ if (config_.disable_udp_transport) {
+ flags |= cricket::PORTALLOCATOR_DISABLE_UDP |
+ cricket::PORTALLOCATOR_DISABLE_STUN |
+ cricket::PORTALLOCATOR_DISABLE_TURN_OVER_UDP;
+ }
set_flags(flags);
set_allow_tcp_listen(false);
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();

Powered by Google App Engine
This is Rietveld 408576698