| Index: net/http/http_server_properties_impl.cc
|
| diff --git a/net/http/http_server_properties_impl.cc b/net/http/http_server_properties_impl.cc
|
| index 7cc4a3298a2f9780dfa30e4059f073ccc824d8e2..1425c00cd1a13e90a889464a846879d071e5d1b9 100644
|
| --- a/net/http/http_server_properties_impl.cc
|
| +++ b/net/http/http_server_properties_impl.cc
|
| @@ -326,8 +326,8 @@ HttpServerPropertiesImpl::GetAlternativeServiceInfos(
|
| ++it;
|
| continue;
|
| }
|
| - valid_alternative_service_infos.push_back(
|
| - AlternativeServiceInfo(alternative_service, it->expiration));
|
| + valid_alternative_service_infos.push_back(AlternativeServiceInfo(
|
| + alternative_service, it->expiration, it->advertised_versions()));
|
| ++it;
|
| }
|
| if (map_it->second.empty()) {
|
| @@ -362,8 +362,8 @@ HttpServerPropertiesImpl::GetAlternativeServiceInfos(
|
| ++it;
|
| continue;
|
| }
|
| - valid_alternative_service_infos.push_back(
|
| - AlternativeServiceInfo(alternative_service, it->expiration));
|
| + valid_alternative_service_infos.push_back(AlternativeServiceInfo(
|
| + alternative_service, it->expiration, it->advertised_versions()));
|
| ++it;
|
| }
|
| if (map_it->second.empty()) {
|
| @@ -375,11 +375,13 @@ HttpServerPropertiesImpl::GetAlternativeServiceInfos(
|
| bool HttpServerPropertiesImpl::SetAlternativeService(
|
| const url::SchemeHostPort& origin,
|
| const AlternativeService& alternative_service,
|
| - base::Time expiration) {
|
| + base::Time expiration,
|
| + const QuicVersionVector& advertised_versions) {
|
| return SetAlternativeServices(
|
| origin,
|
| AlternativeServiceInfoVector(
|
| - /*size=*/1, AlternativeServiceInfo(alternative_service, expiration)));
|
| + /*size=*/1, AlternativeServiceInfo(alternative_service, expiration,
|
| + advertised_versions)));
|
| }
|
|
|
| bool HttpServerPropertiesImpl::SetAlternativeServices(
|
| @@ -419,6 +421,12 @@ bool HttpServerPropertiesImpl::SetAlternativeServices(
|
| changed = true;
|
| break;
|
| }
|
| + // Also persist to disk if advertised versions change significantly for
|
| + // QUIC.
|
| + if (!old.EqualAdvertisedVersions(*new_it)) {
|
| + changed = true;
|
| + break;
|
| + }
|
| ++new_it;
|
| }
|
| }
|
|
|