| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1588 // If the AlternativeServiceMap contained an entry for this host, check if | 1588 // If the AlternativeServiceMap contained an entry for this host, check if |
| 1589 // the disk cache contained an entry for it. | 1589 // the disk cache contained an entry for it. |
| 1590 if (ContainsKey(quic_supported_servers_at_startup_, | 1590 if (ContainsKey(quic_supported_servers_at_startup_, |
| 1591 server_id.host_port_pair())) { | 1591 server_id.host_port_pair())) { |
| 1592 UMA_HISTOGRAM_BOOLEAN("Net.QuicServerInfo.ExpectConfigMissingFromDiskCache", | 1592 UMA_HISTOGRAM_BOOLEAN("Net.QuicServerInfo.ExpectConfigMissingFromDiskCache", |
| 1593 server_info->state().server_config.empty()); | 1593 server_info->state().server_config.empty()); |
| 1594 } | 1594 } |
| 1595 | 1595 |
| 1596 cached->Initialize(server_info->state().server_config, | 1596 cached->Initialize(server_info->state().server_config, |
| 1597 server_info->state().source_address_token, | 1597 server_info->state().source_address_token, |
| 1598 server_info->state().certs, "", | 1598 server_info->state().certs, "", "", |
| 1599 server_info->state().server_config_sig, clock_->WallNow()); | 1599 server_info->state().server_config_sig, clock_->WallNow()); |
| 1600 } | 1600 } |
| 1601 | 1601 |
| 1602 void QuicStreamFactory::MaybeInitialize() { | 1602 void QuicStreamFactory::MaybeInitialize() { |
| 1603 // We don't initialize data from HttpServerProperties in the constructor | 1603 // We don't initialize data from HttpServerProperties in the constructor |
| 1604 // because HttpServerProperties has not yet initialized. We're guaranteed | 1604 // because HttpServerProperties has not yet initialized. We're guaranteed |
| 1605 // HttpServerProperties has been initialized by the first time a request is | 1605 // HttpServerProperties has been initialized by the first time a request is |
| 1606 // made. | 1606 // made. |
| 1607 if (has_initialized_data_) | 1607 if (has_initialized_data_) |
| 1608 return; | 1608 return; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1672 // Since the session was active, there's no longer an | 1672 // Since the session was active, there's no longer an |
| 1673 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP | 1673 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP |
| 1674 // job also fails. So to avoid not using QUIC when we otherwise could, we mark | 1674 // job also fails. So to avoid not using QUIC when we otherwise could, we mark |
| 1675 // it as recently broken, which means that 0-RTT will be disabled but we'll | 1675 // it as recently broken, which means that 0-RTT will be disabled but we'll |
| 1676 // still race. | 1676 // still race. |
| 1677 http_server_properties_->MarkAlternativeServiceRecentlyBroken( | 1677 http_server_properties_->MarkAlternativeServiceRecentlyBroken( |
| 1678 alternative_service); | 1678 alternative_service); |
| 1679 } | 1679 } |
| 1680 | 1680 |
| 1681 } // namespace net | 1681 } // namespace net |
| OLD | NEW |