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..2882de91d5b24b68c4cf4c32a6684081e963dd2a 100644 |
| --- a/content/browser/renderer_host/p2p/socket_host_udp.cc |
| +++ b/content/browser/renderer_host/p2p/socket_host_udp.cc |
| @@ -68,17 +68,23 @@ P2PSocketHostUdp::PendingPacket::PendingPacket( |
| P2PSocketHostUdp::PendingPacket::~PendingPacket() { |
| } |
| -P2PSocketHostUdp::P2PSocketHostUdp(IPC::Sender* message_sender, |
| - int socket_id, |
| +P2PSocketHostUdp::P2PSocketHostUdp(IPC::Sender* message_sender, int socket_id, |
|
Sergey Ulanov
2015/03/26 18:15:32
Formatting was correct here. One argument per line
John L. Miller
2015/03/26 18:23:10
Done.
|
| P2PMessageThrottler* throttler) |
| : P2PSocketHost(message_sender, socket_id, P2PSocketHost::UDP), |
| - socket_( |
| - new net::UDPServerSocket(GetContentClient()->browser()->GetNetLog(), |
| - net::NetLog::Source())), |
| send_pending_(false), |
| last_dscp_(net::DSCP_CS0), |
| throttler_(throttler), |
| send_buffer_size_(0) { |
| + net::UDPServerSocket* socket = new net::UDPServerSocket( |
| + GetContentClient()->browser()->GetNetLog(), net::NetLog::Source()); |
| +#if defined(OS_WIN) |
| + // If configured for finch experiment, use nonblocking IO. |
| + if (base::FieldTrialList::FindFullName("WebRTC-UDPSocketNonBlockingIO") == |
| + "Enabled") { |
| + socket->UseNonBlockingIO(); |
| + } |
| +#endif |
| + socket_.reset(socket); |
| } |
| P2PSocketHostUdp::~P2PSocketHostUdp() { |