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 3eb067a6e30c0efb92f899fedb1faf6dc349c7d5..1f8b2884e951a587d0dcaf1bc88ff814645927cb 100644 |
--- a/net/http/http_stream_factory_impl.cc |
+++ b/net/http/http_stream_factory_impl.cc |
@@ -232,12 +232,16 @@ void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { |
} |
void HttpStreamFactoryImpl::OnHttpPipelinedHostHasAdditionalCapacity( |
- const HostPortPair& origin) { |
- HttpPipelinedStream* stream; |
- while (ContainsKey(http_pipelining_request_map_, origin) && |
- (stream = http_pipelined_host_pool_.CreateStreamOnExistingPipeline( |
- origin))) { |
- Request* request = *http_pipelining_request_map_[origin].begin(); |
+ HttpPipelinedHost* host) { |
+ while (ContainsKey(http_pipelining_request_map_, host->GetKey())) { |
+ HttpPipelinedStream* stream = |
+ http_pipelined_host_pool_.CreateStreamOnExistingPipeline( |
+ host->GetKey()); |
+ if (!stream) { |
+ break; |
+ } |
+ |
+ Request* request = *http_pipelining_request_map_[host->GetKey()].begin(); |
request->Complete(stream->was_npn_negotiated(), |
stream->protocol_negotiated(), |
false, // not using_spdy |
@@ -249,4 +253,16 @@ void HttpStreamFactoryImpl::OnHttpPipelinedHostHasAdditionalCapacity( |
} |
} |
+void HttpStreamFactoryImpl::AbortPipelinedRequestsWithKey( |
+ const Job* job, const HttpPipelinedHost::Key& key, int status, |
+ const SSLConfig& used_ssl_config) { |
+ RequestSet requests_to_fail = http_pipelining_request_map_[key]; |
+ requests_to_fail.erase(request_map_[job]); |
+ for (RequestSet::const_iterator it = requests_to_fail.begin(); |
+ it != requests_to_fail.end(); ++it) { |
+ Request* request = *it; |
+ request->OnStreamFailed(NULL, status, used_ssl_config); |
+ } |
+} |
+ |
} // namespace net |