OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/p2p/socket_host_udp.h" | 5 #include "content/browser/renderer_host/p2p/socket_host_udp.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 NOTREACHED(); | 440 NOTREACHED(); |
441 return false; | 441 return false; |
442 } | 442 } |
443 } | 443 } |
444 | 444 |
445 // static | 445 // static |
446 std::unique_ptr<net::DatagramServerSocket> | 446 std::unique_ptr<net::DatagramServerSocket> |
447 P2PSocketHostUdp::DefaultSocketFactory() { | 447 P2PSocketHostUdp::DefaultSocketFactory() { |
448 net::UDPServerSocket* socket = new net::UDPServerSocket( | 448 net::UDPServerSocket* socket = new net::UDPServerSocket( |
449 GetContentClient()->browser()->GetNetLog(), net::NetLogSource()); | 449 GetContentClient()->browser()->GetNetLog(), net::NetLogSource()); |
450 #if defined(OS_WIN) | |
451 socket->UseNonBlockingIO(); | |
452 #endif | |
453 | 450 |
454 return base::WrapUnique(socket); | 451 return base::WrapUnique(socket); |
455 } | 452 } |
456 | 453 |
457 } // namespace content | 454 } // namespace content |
OLD | NEW |