| Index: net/http/http_server_properties_manager.cc
|
| diff --git a/net/http/http_server_properties_manager.cc b/net/http/http_server_properties_manager.cc
|
| index dcfcf3ac6e459584cfb724164c3d7babdcea5bcf..d6bfb38cce1ecbf584ea098a4c1a40fe1f8f5ec7 100644
|
| --- a/net/http/http_server_properties_manager.cc
|
| +++ b/net/http/http_server_properties_manager.cc
|
| @@ -204,13 +204,6 @@
|
| ScheduleUpdatePrefsOnNetworkThread();
|
| }
|
|
|
| -bool HttpServerPropertiesManager::IsAlternativeServiceBroken(
|
| - const AlternativeService& alternative_service) {
|
| - DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
|
| - return http_server_properties_impl_->IsAlternativeServiceBroken(
|
| - alternative_service);
|
| -}
|
| -
|
| bool HttpServerPropertiesManager::WasAlternateProtocolRecentlyBroken(
|
| const HostPortPair& server) {
|
| DCHECK(network_task_runner_->RunsTasksOnCurrentThread());
|
| @@ -464,7 +457,7 @@
|
| int port = 0;
|
| if (!alternate_protocol_dict.GetInteger(kPortKey, &port) ||
|
| !IsPortValid(port)) {
|
| - DVLOG(1) << "Malformed alternative service port for server: " << server_str;
|
| + DVLOG(1) << "Malformed AltSvc port for server: " << server_str;
|
| return alternate_protocol;
|
| }
|
| alternate_protocol.port = static_cast<uint16>(port);
|
| @@ -473,8 +466,7 @@
|
| if (alternate_protocol_dict.HasKey(kProbabilityKey) &&
|
| !alternate_protocol_dict.GetDoubleWithoutPathExpansion(kProbabilityKey,
|
| &probability)) {
|
| - DVLOG(1) << "Malformed alternative service probability for server: "
|
| - << server_str;
|
| + DVLOG(1) << "Malformed AltSvc probability for server: " << server_str;
|
| return alternate_protocol;
|
| }
|
| alternate_protocol.probability = probability;
|
| @@ -482,14 +474,12 @@
|
| std::string protocol_str;
|
| if (!alternate_protocol_dict.GetStringWithoutPathExpansion(kProtocolKey,
|
| &protocol_str)) {
|
| - DVLOG(1) << "Malformed alternative service protocol string for server: "
|
| - << server_str;
|
| + DVLOG(1) << "Malformed AltSvc protocol string for server: " << server_str;
|
| return alternate_protocol;
|
| }
|
| AlternateProtocol protocol = AlternateProtocolFromString(protocol_str);
|
| if (!IsAlternateProtocolValid(protocol)) {
|
| - DVLOG(1) << "Invalid alternative service protocol string for server: "
|
| - << server_str;
|
| + DVLOG(1) << "Invalid AltSvc protocol string for server: " << server_str;
|
| return alternate_protocol;
|
| }
|
| alternate_protocol.protocol = protocol;
|
| @@ -759,13 +749,6 @@
|
| if (!IsAlternateProtocolValid(port_alternate_protocol.protocol)) {
|
| continue;
|
| }
|
| - const AlternativeService alternative_service(
|
| - port_alternate_protocol.protocol, server.host(),
|
| - port_alternate_protocol.port);
|
| - if (IsAlternativeServiceBroken(alternative_service)) {
|
| - continue;
|
| - }
|
| -
|
| server_pref_map[server].alternate_protocol = &map_it->second;
|
| }
|
|
|
| @@ -838,7 +821,7 @@
|
| void HttpServerPropertiesManager::SaveAlternateProtocolToServerPrefs(
|
| const AlternateProtocolInfo* port_alternate_protocol,
|
| base::DictionaryValue* server_pref_dict) {
|
| - if (!port_alternate_protocol)
|
| + if (!port_alternate_protocol || port_alternate_protocol->is_broken)
|
| return;
|
|
|
| base::DictionaryValue* port_alternate_protocol_dict =
|
|
|