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 <set> | 7 #include <set> |
8 | 8 |
9 #include "base/cpu.h" | 9 #include "base/cpu.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1140 if (!server_info) | 1140 if (!server_info) |
1141 return; | 1141 return; |
1142 | 1142 |
1143 QuicCryptoClientConfig::CachedState* cached = | 1143 QuicCryptoClientConfig::CachedState* cached = |
1144 crypto_config_.LookupOrCreate(server_id); | 1144 crypto_config_.LookupOrCreate(server_id); |
1145 if (!cached->IsEmpty()) | 1145 if (!cached->IsEmpty()) |
1146 return; | 1146 return; |
1147 | 1147 |
1148 if (http_server_properties_) { | 1148 if (http_server_properties_) { |
1149 if (quic_supported_servers_at_startup_.empty()) { | 1149 if (quic_supported_servers_at_startup_.empty()) { |
1150 for (const std::pair<net::HostPortPair, net::AlternateProtocolInfo>& | 1150 for (const std::pair<const net::HostPortPair, net::AlternateProtocolInfo>& |
1151 key_value : http_server_properties_->alternate_protocol_map()) { | 1151 key_value : http_server_properties_->alternate_protocol_map()) { |
1152 if (key_value.second.protocol == QUIC) { | 1152 if (key_value.second.protocol == QUIC) { |
1153 quic_supported_servers_at_startup_.insert(key_value.first); | 1153 quic_supported_servers_at_startup_.insert(key_value.first); |
1154 } | 1154 } |
1155 } | 1155 } |
1156 } | 1156 } |
1157 | 1157 |
1158 // TODO(rtenneti): Delete the following histogram after collecting stats. | 1158 // TODO(rtenneti): Delete the following histogram after collecting stats. |
1159 // If the AlternateProtocolMap contained an entry for this host, check if | 1159 // If the AlternateProtocolMap contained an entry for this host, check if |
1160 // the disk cache contained an entry for it. | 1160 // the disk cache contained an entry for it. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1233 http_server_properties_->ClearAlternateProtocol(server); | 1233 http_server_properties_->ClearAlternateProtocol(server); |
1234 http_server_properties_->SetAlternateProtocol( | 1234 http_server_properties_->SetAlternateProtocol( |
1235 server, alternate.port, alternate.protocol, 1); | 1235 server, alternate.port, alternate.protocol, 1); |
1236 DCHECK_EQ(QUIC, | 1236 DCHECK_EQ(QUIC, |
1237 http_server_properties_->GetAlternateProtocol(server).protocol); | 1237 http_server_properties_->GetAlternateProtocol(server).protocol); |
1238 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( | 1238 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( |
1239 server)); | 1239 server)); |
1240 } | 1240 } |
1241 | 1241 |
1242 } // namespace net | 1242 } // namespace net |
OLD | NEW |