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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 1043973002: Introduce AlternativeServiceInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Early return. Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_server_properties_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index d70b1c09f55ef6a33732c1980f2fc6ace5c49fe0..9bebb57fa54cf3c902ffdd463e57c6325b7d2290 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -635,11 +635,12 @@ int QuicStreamFactory::Create(const HostPortPair& host_port_pair,
if (quic_server_info_factory_) {
bool load_from_disk_cache = !disable_disk_cache_;
if (http_server_properties_) {
- const AlternateProtocolMap& alternate_protocol_map =
- http_server_properties_->alternate_protocol_map();
- AlternateProtocolMap::const_iterator it =
- alternate_protocol_map.Peek(server_id.host_port_pair());
- if (it == alternate_protocol_map.end() || it->second.protocol != QUIC) {
+ const AlternativeServiceMap& alternative_service_map =
+ http_server_properties_->alternative_service_map();
+ AlternativeServiceMap::const_iterator it =
+ alternative_service_map.Peek(server_id.host_port_pair());
+ if (it == alternative_service_map.end() ||
+ it->second.alternative_service.protocol != QUIC) {
// If there is no entry for QUIC, consider that as a new server and
// don't wait for Cache thread to load the data for that server.
load_from_disk_cache = false;
@@ -1136,16 +1137,16 @@ void QuicStreamFactory::InitializeCachedStateInCryptoConfig(
if (http_server_properties_) {
if (quic_supported_servers_at_startup_.empty()) {
- for (const std::pair<const HostPortPair, AlternateProtocolInfo>&
- key_value : http_server_properties_->alternate_protocol_map()) {
- if (key_value.second.protocol == QUIC) {
+ for (const std::pair<const HostPortPair, AlternativeServiceInfo>&
+ key_value : http_server_properties_->alternative_service_map()) {
+ if (key_value.second.alternative_service.protocol == QUIC) {
quic_supported_servers_at_startup_.insert(key_value.first);
}
}
}
// TODO(rtenneti): Delete the following histogram after collecting stats.
- // If the AlternateProtocolMap contained an entry for this host, check if
+ // If the AlternativeServiceMap contained an entry for this host, check if
// the disk cache contained an entry for it.
if (ContainsKey(quic_supported_servers_at_startup_,
server_id.host_port_pair())) {
« no previous file with comments | « net/http/http_server_properties_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698