Chromium Code Reviews| 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..1548f1508ad3ec755fd89c208e4499485b6b0ae5 100644 |
| --- a/content/browser/renderer_host/p2p/socket_host_udp.cc |
| +++ b/content/browser/renderer_host/p2p/socket_host_udp.cc |
| @@ -109,6 +109,14 @@ 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. |
| + if (base::FieldTrialList::FindFullName("WebRTC-UDPServerSocketAsync") == |
|
Sergey Ulanov
2015/03/13 18:28:51
This is not a good name for the experiment: overla
John L. Miller
2015/03/23 14:11:27
Done.
John L. Miller
2015/03/23 14:11:28
Done.
|
| + "Enabled") { |
| + static_cast<UdpServerSocket *>(socket_.get())->UseNonBlockingIO(); |
|
Sergey Ulanov
2015/03/13 18:28:51
You can avoid upcast if you put this in the constr
John L. Miller
2015/03/23 14:11:28
I'm nervous about changing the type when socket_ i
Sergey Ulanov
2015/03/25 17:50:28
I wasn't suggesting to change type of |socket_|. I
|
| + } |
| +#endif |
| + |
| int result = socket_->Listen(local_address); |
| if (result < 0) { |
| LOG(ERROR) << "bind() failed: " << result; |