diff options
author | simonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-01 21:31:31 +0000 |
---|---|---|
committer | simonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-01 21:31:31 +0000 |
commit | 5477d890353c732bbd0c16d8a3c5ce56a52ee2fe (patch) | |
tree | b225cdf9c0dba2d2c77cc76b094551a8be9ba5cf /net/http/http_network_session.h | |
parent | 271398aa3ff859d3deace9ff3ca575f14d263964 (diff) | |
download | chromium_src-5477d890353c732bbd0c16d8a3c5ce56a52ee2fe.zip chromium_src-5477d890353c732bbd0c16d8a3c5ce56a52ee2fe.tar.gz chromium_src-5477d890353c732bbd0c16d8a3c5ce56a52ee2fe.tar.bz2 |
Add a force pipelining option to load flags.
Details:
- Add a HttpPipelinedHostForced class for connections with forced requests.
+ Forced requests get their own pipeline and there's only one per host.
+ They always try to pipeline and won't retry if evicted.
+ Only one HttpStreamFactoryImpl::Job runs for all requests to the same
origin with forced pipelining. All requests will fail if that Job fails.
- Track HttpPipelinedHosts with a Key. Right now that's origin and
force-pipelining, but it might be expanded to include content type.
- Add a BufferedWriteStreamSocket that wraps a normal socket. It buffers Write()
calls until a task fires to dispatch the buffer to the underlying socket.
BUG=110794
TEST=net_unittests and unit_tests
Review URL: http://codereview.chromium.org/9433015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124487 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_session.h')
-rw-r--r-- | net/http/http_network_session.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h index 2ccec50..cb58cb0 100644 --- a/net/http/http_network_session.h +++ b/net/http/http_network_session.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -62,7 +62,8 @@ class NET_EXPORT HttpNetworkSession http_auth_handler_factory(NULL), network_delegate(NULL), http_server_properties(NULL), - net_log(NULL) {} + net_log(NULL), + force_http_pipelining(false) {} ClientSocketFactory* client_socket_factory; HostResolver* host_resolver; @@ -77,6 +78,7 @@ class NET_EXPORT HttpNetworkSession NetworkDelegate* network_delegate; HttpServerProperties* http_server_properties; NetLog* net_log; + bool force_http_pipelining; }; explicit HttpNetworkSession(const Params& params); @@ -138,6 +140,11 @@ class NET_EXPORT HttpNetworkSession void CloseAllConnections(); void CloseIdleConnections(); + bool force_http_pipelining() const { return force_http_pipelining_; } + + // Returns the original Params used to construct this session. + const Params& params() const { return params_; } + private: friend class base::RefCounted<HttpNetworkSession>; friend class HttpNetworkSessionPeer; @@ -149,6 +156,7 @@ class NET_EXPORT HttpNetworkSession HttpServerProperties* const http_server_properties_; CertVerifier* const cert_verifier_; HttpAuthHandlerFactory* const http_auth_handler_factory_; + bool force_http_pipelining_; // Not const since it's modified by HttpNetworkSessionPeer for testing. ProxyService* proxy_service_; @@ -160,6 +168,8 @@ class NET_EXPORT HttpNetworkSession SpdySessionPool spdy_session_pool_; scoped_ptr<HttpStreamFactory> http_stream_factory_; std::set<HttpResponseBodyDrainer*> response_drainers_; + + Params params_; }; } // namespace net |