| 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 ad12091b1f1f441954f83a87955b6fc6d997e2fa..ced5f2b55918fd951859a86d20520e71b89e9d16 100644
|
| --- a/net/http/http_stream_factory_impl.cc
|
| +++ b/net/http/http_stream_factory_impl.cc
|
| @@ -22,10 +22,6 @@ namespace net {
|
|
|
| namespace {
|
|
|
| -const PortAlternateProtocolPair kNoAlternateProtocol = {
|
| - 0, UNINITIALIZED_ALTERNATE_PROTOCOL
|
| -};
|
| -
|
| GURL UpgradeUrlToHttps(const GURL& original_url, int port) {
|
| GURL::Replacements replacements;
|
| // new_sheme and new_port need to be in scope here because GURL::Replacements
|
| @@ -111,7 +107,7 @@ HttpStreamRequest* HttpStreamFactoryImpl::RequestStreamInternal(
|
| net_log);
|
|
|
| GURL alternate_url;
|
| - PortAlternateProtocolPair alternate =
|
| + AlternateProtocolInfo alternate =
|
| GetAlternateProtocolRequestFor(request_info.url, &alternate_url);
|
| Job* alternate_job = NULL;
|
| if (alternate.protocol != UNINITIALIZED_ALTERNATE_PROTOCOL) {
|
| @@ -155,7 +151,7 @@ void HttpStreamFactoryImpl::PreconnectStreams(
|
| const SSLConfig& proxy_ssl_config) {
|
| DCHECK(!for_websockets_);
|
| GURL alternate_url;
|
| - PortAlternateProtocolPair alternate =
|
| + AlternateProtocolInfo alternate =
|
| GetAlternateProtocolRequestFor(request_info.url, &alternate_url);
|
| Job* job = NULL;
|
| if (alternate.protocol != UNINITIALIZED_ALTERNATE_PROTOCOL) {
|
| @@ -176,9 +172,12 @@ const HostMappingRules* HttpStreamFactoryImpl::GetHostMappingRules() const {
|
| return session_->params().host_mapping_rules;
|
| }
|
|
|
| -PortAlternateProtocolPair HttpStreamFactoryImpl::GetAlternateProtocolRequestFor(
|
| +AlternateProtocolInfo HttpStreamFactoryImpl::GetAlternateProtocolRequestFor(
|
| const GURL& original_url,
|
| GURL* alternate_url) {
|
| + const AlternateProtocolInfo kNoAlternateProtocol =
|
| + AlternateProtocolInfo(0, UNINITIALIZED_ALTERNATE_PROTOCOL, 0);
|
| +
|
| if (!session_->params().use_alternate_protocols)
|
| return kNoAlternateProtocol;
|
|
|
| @@ -193,7 +192,7 @@ PortAlternateProtocolPair HttpStreamFactoryImpl::GetAlternateProtocolRequestFor(
|
| if (!http_server_properties.HasAlternateProtocol(origin))
|
| return kNoAlternateProtocol;
|
|
|
| - PortAlternateProtocolPair alternate =
|
| + AlternateProtocolInfo alternate =
|
| http_server_properties.GetAlternateProtocol(origin);
|
| if (alternate.protocol == ALTERNATE_PROTOCOL_BROKEN) {
|
| HistogramAlternateProtocolUsage(
|
|
|