Chromium Code Reviews| 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..b7a310bdbadb59a52a682b090694927f1eab4323 100644 |
| --- a/net/http/http_stream_factory_impl.cc |
| +++ b/net/http/http_stream_factory_impl.cc |
| @@ -232,12 +232,12 @@ void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { |
| } |
| void HttpStreamFactoryImpl::OnHttpPipelinedHostHasAdditionalCapacity( |
| - const HostPortPair& origin) { |
| + HttpPipelinedHost* host) { |
| HttpPipelinedStream* stream; |
| - while (ContainsKey(http_pipelining_request_map_, origin) && |
| + while (ContainsKey(http_pipelining_request_map_, host->key()) && |
| (stream = http_pipelined_host_pool_.CreateStreamOnExistingPipeline( |
| - origin))) { |
| - Request* request = *http_pipelining_request_map_[origin].begin(); |
| + host->key()))) { |
|
mmenke
2012/02/23 18:54:58
[optional]: Think this might be a little easier to
James Simonsen
2012/02/23 23:49:46
Done.
|
| + Request* request = *http_pipelining_request_map_[host->key()].begin(); |
| request->Complete(stream->was_npn_negotiated(), |
| stream->protocol_negotiated(), |
| false, // not using_spdy |
| @@ -249,4 +249,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 |