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

Side by Side Diff: content/browser/renderer_host/p2p/socket_host_udp.cc

Issue 2253753002: Always use NonBlocking IO for UDP sockets on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/p2p/socket_host_udp_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/p2p/socket_host_udp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698