| 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 9e6e92e719d66a5dbf7711e29367b468b0117b20..6f0c1ea1f8ba1e73bbfb0958610e471bf6e80fbe 100644
|
| --- a/net/http/http_server_properties_impl.cc
|
| +++ b/net/http/http_server_properties_impl.cc
|
| @@ -413,8 +413,18 @@ bool HttpServerPropertiesImpl::SetAlternativeServices(
|
| if (it != alternative_service_map_.end()) {
|
| DCHECK(!it->second.empty());
|
| if (it->second.size() == alternative_service_info_vector.size()) {
|
| - changed = !std::equal(it->second.begin(), it->second.end(),
|
| - alternative_service_info_vector.begin());
|
| + changed = false;
|
| + auto new_it = alternative_service_info_vector.begin();
|
| + for (const auto& old : it->second) {
|
| + // Persist to disk immediately if new entry has different scheme, host,
|
| + // or port, or if it expires sooner.
|
| + if (old.alternative_service != new_it->alternative_service ||
|
| + old.expiration > new_it->expiration) {
|
| + changed = true;
|
| + break;
|
| + }
|
| + ++new_it;
|
| + }
|
| }
|
| }
|
|
|
|
|