| 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 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 // If the AlternativeServiceMap contained an entry for this host, check if | 1565 // If the AlternativeServiceMap contained an entry for this host, check if |
| 1566 // the disk cache contained an entry for it. | 1566 // the disk cache contained an entry for it. |
| 1567 if (ContainsKey(quic_supported_servers_at_startup_, | 1567 if (ContainsKey(quic_supported_servers_at_startup_, |
| 1568 server_id.host_port_pair())) { | 1568 server_id.host_port_pair())) { |
| 1569 UMA_HISTOGRAM_BOOLEAN("Net.QuicServerInfo.ExpectConfigMissingFromDiskCache", | 1569 UMA_HISTOGRAM_BOOLEAN("Net.QuicServerInfo.ExpectConfigMissingFromDiskCache", |
| 1570 server_info->state().server_config.empty()); | 1570 server_info->state().server_config.empty()); |
| 1571 } | 1571 } |
| 1572 | 1572 |
| 1573 cached->Initialize(server_info->state().server_config, | 1573 cached->Initialize(server_info->state().server_config, |
| 1574 server_info->state().source_address_token, | 1574 server_info->state().source_address_token, |
| 1575 server_info->state().certs, "", | 1575 server_info->state().certs, "", "", |
| 1576 server_info->state().server_config_sig, clock_->WallNow()); | 1576 server_info->state().server_config_sig, clock_->WallNow()); |
| 1577 } | 1577 } |
| 1578 | 1578 |
| 1579 void QuicStreamFactory::MaybeInitialize() { | 1579 void QuicStreamFactory::MaybeInitialize() { |
| 1580 // We don't initialize data from HttpServerProperties in the constructor | 1580 // We don't initialize data from HttpServerProperties in the constructor |
| 1581 // because HttpServerProperties has not yet initialized. We're guaranteed | 1581 // because HttpServerProperties has not yet initialized. We're guaranteed |
| 1582 // HttpServerProperties has been initialized by the first time a request is | 1582 // HttpServerProperties has been initialized by the first time a request is |
| 1583 // made. | 1583 // made. |
| 1584 if (has_initialized_data_) | 1584 if (has_initialized_data_) |
| 1585 return; | 1585 return; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1649 // Since the session was active, there's no longer an | 1649 // Since the session was active, there's no longer an |
| 1650 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP | 1650 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP |
| 1651 // job also fails. So to avoid not using QUIC when we otherwise could, we mark | 1651 // job also fails. So to avoid not using QUIC when we otherwise could, we mark |
| 1652 // it as recently broken, which means that 0-RTT will be disabled but we'll | 1652 // it as recently broken, which means that 0-RTT will be disabled but we'll |
| 1653 // still race. | 1653 // still race. |
| 1654 http_server_properties_->MarkAlternativeServiceRecentlyBroken( | 1654 http_server_properties_->MarkAlternativeServiceRecentlyBroken( |
| 1655 alternative_service); | 1655 alternative_service); |
| 1656 } | 1656 } |
| 1657 | 1657 |
| 1658 } // namespace net | 1658 } // namespace net |
| OLD | NEW |