diff options
author | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-24 03:37:23 +0000 |
---|---|---|
committer | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-24 03:37:23 +0000 |
commit | d759912753b5a71f294cd96e6fb8ea1c6e4efc12 (patch) | |
tree | 77a0be70260be8e9963cb37f4576c5e8b09ea72d /net/http/http_network_transaction.cc | |
parent | d6cc5d74d5816c6e097e110e30b47b7a36149367 (diff) | |
download | chromium_src-d759912753b5a71f294cd96e6fb8ea1c6e4efc12.zip chromium_src-d759912753b5a71f294cd96e6fb8ea1c6e4efc12.tar.gz chromium_src-d759912753b5a71f294cd96e6fb8ea1c6e4efc12.tar.bz2 |
Remove HttpStreamFactory's NPN/SPDY globals, except for spdy_enabled.
Instead, each HttpNetworkSession is given its own immutable copies on
construction. Other than spdy_enabled, none of the globals were
changed before this CL, anyways.
Also, setting spdy_enabled back to true after setting it to false no
longer clears the NPN list.
spdy_enabled is still a global because group policy can set it to
false at runtime.
BUG=372533
R=joaodasilva@chromium.org, rch@chromium.org, sergeyu@chromium.org, sgurun@chromium.org, sky@chromium.org, ttuttle@chromium.org
Review URL: https://codereview.chromium.org/284423002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272698 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_transaction.cc')
-rw-r--r-- | net/http/http_network_transaction.cc | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 0188298..1597f3a 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -76,8 +76,7 @@ namespace net { namespace { void ProcessAlternateProtocol( - HttpStreamFactory* factory, - const base::WeakPtr<HttpServerProperties>& http_server_properties, + HttpNetworkSession* session, const HttpResponseHeaders& headers, const HostPortPair& http_host_port_pair) { std::string alternate_protocol_str; @@ -88,9 +87,11 @@ void ProcessAlternateProtocol( return; } - factory->ProcessAlternateProtocol(http_server_properties, - alternate_protocol_str, - http_host_port_pair); + session->http_stream_factory()->ProcessAlternateProtocol( + session->http_server_properties(), + alternate_protocol_str, + http_host_port_pair, + *session); } // Returns true if |error| is a client certificate authentication error. @@ -142,10 +143,7 @@ HttpNetworkTransaction::HttpNetworkTransaction(RequestPriority priority, establishing_tunnel_(false), websocket_handshake_stream_base_create_helper_(NULL) { session->ssl_config_service()->GetSSLConfig(&server_ssl_config_); - if (session->http_stream_factory()->has_next_protos()) { - server_ssl_config_.next_protos = - session->http_stream_factory()->next_protos(); - } + session->GetNextProtos(&server_ssl_config_.next_protos); proxy_ssl_config_ = server_ssl_config_; } @@ -1086,8 +1084,7 @@ int HttpNetworkTransaction::DoReadHeadersComplete(int result) { HostPortPair endpoint = HostPortPair(request_->url.HostNoBrackets(), request_->url.EffectiveIntPort()); - ProcessAlternateProtocol(session_->http_stream_factory(), - session_->http_server_properties(), + ProcessAlternateProtocol(session_, *response_.headers.get(), endpoint); |