Chromium Code Reviews| Index: net/http/http_stream_factory.cc |
| diff --git a/net/http/http_stream_factory.cc b/net/http/http_stream_factory.cc |
| index 2c7eed610948b07a67249626b36baebbdd9c03dd..93d0d2c847b00d3c10ef8f3539dcc9a7cf36dfbc 100644 |
| --- a/net/http/http_stream_factory.cc |
| +++ b/net/http/http_stream_factory.cc |
| @@ -51,19 +51,18 @@ void HttpStreamFactory::ProcessAlternativeServices( |
| !IsPortValid(alternative_service_entry.port)) { |
| continue; |
| } |
| - // Check if QUIC version is supported. |
| + // Check if QUIC version is supported. Persist mutually supported versions |
| + // in advertised versions list. |
|
Ryan Hamilton
2017/06/07 20:52:24
This second sentence is confusing to me. How about
Zhongyi Shi
2017/06/08 23:11:16
Done.
|
| + QuicVersionVector advertised_versions; |
| if (protocol == kProtoQUIC && !alternative_service_entry.version.empty()) { |
| bool match_found = false; |
| for (QuicVersion supported : session->params().quic_supported_versions) { |
| for (uint16_t advertised : alternative_service_entry.version) { |
| if (supported == advertised) { |
| match_found = true; |
| - break; |
| + advertised_versions.push_back(supported); |
| } |
| } |
| - if (match_found) { |
| - break; |
| - } |
| } |
| if (!match_found) { |
| continue; |
| @@ -75,8 +74,8 @@ void HttpStreamFactory::ProcessAlternativeServices( |
| base::Time expiration = |
| base::Time::Now() + |
| base::TimeDelta::FromSeconds(alternative_service_entry.max_age); |
| - AlternativeServiceInfo alternative_service_info(alternative_service, |
| - expiration); |
| + AlternativeServiceInfo alternative_service_info( |
| + alternative_service, expiration, advertised_versions); |
| alternative_service_info_vector.push_back(alternative_service_info); |
| } |