diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-10 07:32:53 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-10 07:32:53 +0000 |
commit | 17291a02bb3589d94ceb63fbb14ca59fff75e163 (patch) | |
tree | dff2d5c6919d567ced7dcbfeea6c8daa580b0673 /net/http/http_stream_factory_impl.cc | |
parent | cd6e0ba8e0d9435222349ff4d4d7b19d137d9c57 (diff) | |
download | chromium_src-17291a02bb3589d94ceb63fbb14ca59fff75e163.zip chromium_src-17291a02bb3589d94ceb63fbb14ca59fff75e163.tar.gz chromium_src-17291a02bb3589d94ceb63fbb14ca59fff75e163.tar.bz2 |
Migrate HttpAlternateProtocols to HttpServerPropertiesImpl.
Hooks in HttpServerPropertiesManager also. No persistence done yet. This is all plumbing.
Also require HttpServerProperties in HttpNetworkSession::Params.
BUG=98472
TEST=none
Review URL: http://codereview.chromium.org/8211003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104696 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_stream_factory_impl.cc')
-rw-r--r-- | net/http/http_stream_factory_impl.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc index 8b7db82..364d202 100644 --- a/net/http/http_stream_factory_impl.cc +++ b/net/http/http_stream_factory_impl.cc @@ -10,6 +10,7 @@ #include "net/base/net_log.h" #include "net/base/net_util.h" #include "net/http/http_network_session.h" +#include "net/http/http_server_properties.h" #include "net/http/http_stream_factory_impl_job.h" #include "net/http/http_stream_factory_impl_request.h" #include "net/spdy/spdy_http_stream.h" @@ -133,21 +134,20 @@ bool HttpStreamFactoryImpl::GetAlternateProtocolRequestFor( HostPortPair origin = HostPortPair(original_url.HostNoBrackets(), original_url.EffectiveIntPort()); - const HttpAlternateProtocols& alternate_protocols = - session_->alternate_protocols(); - if (!alternate_protocols.HasAlternateProtocolFor(origin)) + const HttpServerProperties& http_server_properties = + *session_->http_server_properties(); + if (!http_server_properties.HasAlternateProtocol(origin)) return false; - HttpAlternateProtocols::PortProtocolPair alternate = - alternate_protocols.GetAlternateProtocolFor(origin); - if (alternate.protocol == HttpAlternateProtocols::BROKEN) + PortAlternateProtocolPair alternate = + http_server_properties.GetAlternateProtocol(origin); + if (alternate.protocol == ALTERNATE_PROTOCOL_BROKEN) return false; - DCHECK_LE(HttpAlternateProtocols::NPN_SPDY_1, alternate.protocol); - DCHECK_GT(HttpAlternateProtocols::NUM_ALTERNATE_PROTOCOLS, - alternate.protocol); + DCHECK_LE(NPN_SPDY_1, alternate.protocol); + DCHECK_GT(NUM_ALTERNATE_PROTOCOLS, alternate.protocol); - if (alternate.protocol != HttpAlternateProtocols::NPN_SPDY_2) + if (alternate.protocol != NPN_SPDY_2) return false; // Some shared unix systems may have user home directories (like |