Index: content/browser/renderer_host/p2p/socket_host_udp.cc |
diff --git a/content/browser/renderer_host/p2p/socket_host_udp.cc b/content/browser/renderer_host/p2p/socket_host_udp.cc |
index fd09f7d30534e890287c0e9ee94c614813199351..37e4f9089b5a49442aacf1530ebb950ac2fc73f6 100644 |
--- a/content/browser/renderer_host/p2p/socket_host_udp.cc |
+++ b/content/browser/renderer_host/p2p/socket_host_udp.cc |
@@ -109,6 +109,19 @@ bool P2PSocketHostUdp::Init(const net::IPEndPoint& local_address, |
const P2PHostAndIPEndPoint& remote_address) { |
DCHECK_EQ(state_, STATE_UNINITIALIZED); |
+#if defined(OS_WIN) |
+ // If configured for finch experiment, use nonblocking IO. |
+ unsigned int use_nonblocking_io = 0; |
+ |
+ base::StringToUint( |
+ base::FieldTrialList::FindFullName( |
+ "WebRTC-UDPServerSocketAsync"), |
+ &use_nonblocking_io); |
+ if (use_nonblocking_io > 0) { |
guoweis_left_chromium
2015/03/03 17:43:39
Instead of using 0 to stand for disabled, could we
John L. Miller
2015/03/23 14:11:27
Done.
|
+ _socket::UseNonBlockingIO(); |
+ } |
+#endif |
+ |
int result = socket_->Listen(local_address); |
if (result < 0) { |
LOG(ERROR) << "bind() failed: " << result; |