| Index: net/http/http_stream_factory_impl.cc
|
| diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc
|
| index 9e932ee99cc0e3cf4ed6d415f8c684a4a0a56aa7..78238b946e13d20a976dfae78b28239117748c98 100644
|
| --- a/net/http/http_stream_factory_impl.cc
|
| +++ b/net/http/http_stream_factory_impl.cc
|
| @@ -175,8 +175,7 @@ const HostMappingRules* HttpStreamFactoryImpl::GetHostMappingRules() const {
|
| AlternateProtocolInfo HttpStreamFactoryImpl::GetAlternateProtocolRequestFor(
|
| const GURL& original_url,
|
| GURL* alternate_url) {
|
| - const AlternateProtocolInfo kNoAlternateProtocol =
|
| - AlternateProtocolInfo(0, UNINITIALIZED_ALTERNATE_PROTOCOL, 0);
|
| + const AlternateProtocolInfo kNoAlternateProtocol;
|
|
|
| if (!session_->params().use_alternate_protocols)
|
| return kNoAlternateProtocol;
|
| @@ -185,19 +184,17 @@ AlternateProtocolInfo HttpStreamFactoryImpl::GetAlternateProtocolRequestFor(
|
| return kNoAlternateProtocol;
|
|
|
| HostPortPair origin = HostPortPair::FromURL(original_url);
|
| -
|
| HttpServerProperties& http_server_properties =
|
| *session_->http_server_properties();
|
| - if (!http_server_properties.HasAlternateProtocol(origin))
|
| - return kNoAlternateProtocol;
|
| -
|
| - AlternateProtocolInfo alternate =
|
| + const AlternateProtocolInfo alternate =
|
| http_server_properties.GetAlternateProtocol(origin);
|
| +
|
| + if (alternate.protocol == UNINITIALIZED_ALTERNATE_PROTOCOL)
|
| + return kNoAlternateProtocol;
|
| if (alternate.is_broken) {
|
| HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_BROKEN);
|
| return kNoAlternateProtocol;
|
| }
|
| -
|
| if (!IsAlternateProtocolValid(alternate.protocol)) {
|
| NOTREACHED();
|
| return kNoAlternateProtocol;
|
|
|