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

Side by Side Diff: net/quic/chromium/quic_stream_factory.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 | « net/dns/mock_mdns_socket_factory.h ('k') | net/socket/datagram_socket.h » ('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 "net/quic/chromium/quic_stream_factory.h" 5 #include "net/quic/chromium/quic_stream_factory.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <tuple> 8 #include <tuple>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 } 1415 }
1416 1416
1417 bool QuicStreamFactory::HasActiveCertVerifierJob( 1417 bool QuicStreamFactory::HasActiveCertVerifierJob(
1418 const QuicServerId& server_id) const { 1418 const QuicServerId& server_id) const {
1419 return base::ContainsKey(active_cert_verifier_jobs_, server_id); 1419 return base::ContainsKey(active_cert_verifier_jobs_, server_id);
1420 } 1420 }
1421 1421
1422 int QuicStreamFactory::ConfigureSocket(DatagramClientSocket* socket, 1422 int QuicStreamFactory::ConfigureSocket(DatagramClientSocket* socket,
1423 IPEndPoint addr, 1423 IPEndPoint addr,
1424 NetworkHandle network) { 1424 NetworkHandle network) {
1425 socket->UseNonBlockingIO();
1426
1427 int rv; 1425 int rv;
1428 if (migrate_sessions_on_network_change_) { 1426 if (migrate_sessions_on_network_change_) {
1429 // If caller leaves network unspecified, use current default network. 1427 // If caller leaves network unspecified, use current default network.
1430 if (network == NetworkChangeNotifier::kInvalidNetworkHandle) { 1428 if (network == NetworkChangeNotifier::kInvalidNetworkHandle) {
1431 rv = socket->ConnectUsingDefaultNetwork(addr); 1429 rv = socket->ConnectUsingDefaultNetwork(addr);
1432 } else { 1430 } else {
1433 rv = socket->ConnectUsingNetwork(network, addr); 1431 rv = socket->ConnectUsingNetwork(network, addr);
1434 } 1432 }
1435 } else { 1433 } else {
1436 rv = socket->Connect(addr); 1434 rv = socket->Connect(addr);
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 // Since the session was active, there's no longer an 1730 // Since the session was active, there's no longer an
1733 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP 1731 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP
1734 // job also fails. So to avoid not using QUIC when we otherwise could, we mark 1732 // job also fails. So to avoid not using QUIC when we otherwise could, we mark
1735 // it as recently broken, which means that 0-RTT will be disabled but we'll 1733 // it as recently broken, which means that 0-RTT will be disabled but we'll
1736 // still race. 1734 // still race.
1737 http_server_properties_->MarkAlternativeServiceRecentlyBroken( 1735 http_server_properties_->MarkAlternativeServiceRecentlyBroken(
1738 alternative_service); 1736 alternative_service);
1739 } 1737 }
1740 1738
1741 } // namespace net 1739 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/mock_mdns_socket_factory.h ('k') | net/socket/datagram_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698