summaryrefslogtreecommitdiffstats
path: root/net/http/http_stream_factory_impl.h
diff options
context:
space:
mode:
authorsimonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 20:14:29 +0000
committersimonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 20:14:29 +0000
commit5a60c8bb002e4573dd0809f4a78d56b4c9720add (patch)
tree4be91c33213b0e7ab66dfed7ced978e8a16b3cdc /net/http/http_stream_factory_impl.h
parent8053408224c37ade07452972e01de6126d074d27 (diff)
downloadchromium_src-5a60c8bb002e4573dd0809f4a78d56b4c9720add.zip
chromium_src-5a60c8bb002e4573dd0809f4a78d56b4c9720add.tar.gz
chromium_src-5a60c8bb002e4573dd0809f4a78d56b4c9720add.tar.bz2
Basic HTTP pipelining support.
This must be enabled in about:flags. It is naive and assumes all servers correctly implement pipelining. Proxies are not supported. Immediate future work: - Integration tests. - Additional NetLog logging. - Refactor HttpPipelinedConnectionImpl. Long term: - Detect broken transparent proxies. - Detect and/or mitigate broken servers. - Buffer HttpPipelinedStream. - Optimize number of pipelines and their depth. - Support proxies. BUG=8991 TEST=net_unittests Review URL: http://codereview.chromium.org/7289006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106364 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_stream_factory_impl.h')
-rw-r--r--net/http/http_stream_factory_impl.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/net/http/http_stream_factory_impl.h b/net/http/http_stream_factory_impl.h
index b84f158..9c74e23 100644
--- a/net/http/http_stream_factory_impl.h
+++ b/net/http/http_stream_factory_impl.h
@@ -10,13 +10,15 @@
#include "base/memory/ref_counted.h"
#include "net/base/host_port_pair.h"
-#include "net/http/http_stream_factory.h"
#include "net/base/net_log.h"
+#include "net/http/http_pipelined_host_pool.h"
+#include "net/http/http_stream_factory.h"
#include "net/proxy/proxy_server.h"
namespace net {
class HttpNetworkSession;
+class HttpPipelinedHost;
class SpdySession;
class NET_EXPORT_PRIVATE HttpStreamFactoryImpl : public HttpStreamFactory {
@@ -40,12 +42,18 @@ class NET_EXPORT_PRIVATE HttpStreamFactoryImpl : public HttpStreamFactory {
virtual void AddTLSIntolerantServer(const HostPortPair& server);
virtual bool IsTLSIntolerantServer(const HostPortPair& server) const;
+ // Called when a HttpPipelinedHost has new capacity. Attempts to allocate any
+ // pending pipeline-capable requests to pipelines.
+ virtual void OnHttpPipelinedHostHasAdditionalCapacity(
+ const HostPortPair& origin);
+
private:
class Request;
class Job;
typedef std::set<Request*> RequestSet;
typedef std::map<HostPortProxyPair, RequestSet> SpdySessionRequestMap;
+ typedef std::map<HostPortPair, RequestSet> HttpPipeliningRequestMap;
bool GetAlternateProtocolRequestFor(const GURL& original_url,
GURL* alternate_url) const;
@@ -88,6 +96,9 @@ class NET_EXPORT_PRIVATE HttpStreamFactoryImpl : public HttpStreamFactory {
std::map<const Job*, Request*> request_map_;
SpdySessionRequestMap spdy_session_request_map_;
+ HttpPipeliningRequestMap http_pipelining_request_map_;
+
+ HttpPipelinedHostPool http_pipelined_host_pool_;
// These jobs correspond to jobs orphaned by Requests and now owned by
// HttpStreamFactoryImpl. Since they are no longer tied to Requests, they will