| 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 "net/quic/quic_stream_factory.h" | 5 #include "net/quic/quic_stream_factory.h" |
| 6 | 6 |
| 7 #include <openssl/aead.h> | 7 #include <openssl/aead.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1552 int QuicStreamFactory::ConfigureSocket(DatagramClientSocket* socket, | 1552 int QuicStreamFactory::ConfigureSocket(DatagramClientSocket* socket, |
| 1553 IPEndPoint addr, | 1553 IPEndPoint addr, |
| 1554 NetworkHandle network) { | 1554 NetworkHandle network) { |
| 1555 if (enable_non_blocking_io_ && | 1555 if (enable_non_blocking_io_ && |
| 1556 client_socket_factory_ == ClientSocketFactory::GetDefaultFactory()) { | 1556 client_socket_factory_ == ClientSocketFactory::GetDefaultFactory()) { |
| 1557 #if defined(OS_WIN) | 1557 #if defined(OS_WIN) |
| 1558 static_cast<UDPClientSocket*>(socket)->UseNonBlockingIO(); | 1558 static_cast<UDPClientSocket*>(socket)->UseNonBlockingIO(); |
| 1559 #endif | 1559 #endif |
| 1560 } | 1560 } |
| 1561 | 1561 |
| 1562 #if defined(OS_WIN) | |
| 1563 // TODO(rtenneti): Delete the check for TSVIPCli.dll loaded and the histogram. | |
| 1564 bool tsvipcli_loaded = ::GetModuleHandle(L"TSVIPCli.dll") != NULL; | |
| 1565 UMA_HISTOGRAM_BOOLEAN("Net.QuicStreamFactory.TSVIPCliIsLoaded", | |
| 1566 tsvipcli_loaded); | |
| 1567 #endif | |
| 1568 | |
| 1569 int rv; | 1562 int rv; |
| 1570 if (migrate_sessions_on_network_change_) { | 1563 if (migrate_sessions_on_network_change_) { |
| 1571 // If caller leaves network unspecified, use current default network. | 1564 // If caller leaves network unspecified, use current default network. |
| 1572 if (network == NetworkChangeNotifier::kInvalidNetworkHandle) { | 1565 if (network == NetworkChangeNotifier::kInvalidNetworkHandle) { |
| 1573 rv = socket->ConnectUsingDefaultNetwork(addr); | 1566 rv = socket->ConnectUsingDefaultNetwork(addr); |
| 1574 } else { | 1567 } else { |
| 1575 rv = socket->ConnectUsingNetwork(network, addr); | 1568 rv = socket->ConnectUsingNetwork(network, addr); |
| 1576 } | 1569 } |
| 1577 } else { | 1570 } else { |
| 1578 rv = socket->Connect(addr); | 1571 rv = socket->Connect(addr); |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1877 // Since the session was active, there's no longer an | 1870 // Since the session was active, there's no longer an |
| 1878 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP | 1871 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP |
| 1879 // job also fails. So to avoid not using QUIC when we otherwise could, we mark | 1872 // job also fails. So to avoid not using QUIC when we otherwise could, we mark |
| 1880 // it as recently broken, which means that 0-RTT will be disabled but we'll | 1873 // it as recently broken, which means that 0-RTT will be disabled but we'll |
| 1881 // still race. | 1874 // still race. |
| 1882 http_server_properties_->MarkAlternativeServiceRecentlyBroken( | 1875 http_server_properties_->MarkAlternativeServiceRecentlyBroken( |
| 1883 alternative_service); | 1876 alternative_service); |
| 1884 } | 1877 } |
| 1885 | 1878 |
| 1886 } // namespace net | 1879 } // namespace net |
| OLD | NEW |