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 ebb0ec76def6cfb0626bffd2ba97872a59de5763..fd54e332dded36280724b5d7f9ac7df92f495f8c 100644 |
--- a/net/http/http_stream_factory_impl.cc |
+++ b/net/http/http_stream_factory_impl.cc |
@@ -10,6 +10,9 @@ |
#include "net/base/net_log.h" |
#include "net/base/net_util.h" |
#include "net/http/http_network_session.h" |
+#include "net/http/http_pipelined_connection.h" |
+#include "net/http/http_pipelined_host.h" |
+#include "net/http/http_pipelined_stream.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" |
@@ -211,4 +214,23 @@ void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { |
OnPreconnectsCompleteInternal(); |
} |
+void HttpStreamFactoryImpl::OnHttpPipelinedHostHasAdditionalCapacity( |
+ HttpPipelinedHost* host) { |
+ const HostPortPair& origin = host->origin(); |
+ HttpPipelinedConnection* pipeline; |
+ while ((pipeline = host->FindAvailablePipeline())) { |
+ if (!ContainsKey(http_pipelining_request_map_, origin)) { |
+ break; |
+ } |
+ Request* request = *http_pipelining_request_map_[origin].begin(); |
+ request->Complete(pipeline->was_npn_negotiated(), |
+ false, // not using_spdy |
+ pipeline->source()); |
+ request->OnStreamReady(NULL, |
+ pipeline->used_ssl_config(), |
+ pipeline->used_proxy_info(), |
+ pipeline->CreateNewStream()); |
+ } |
+} |
+ |
} // namespace net |