Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(697)

Side by Side Diff: net/http/http_stream_factory_impl.cc

Issue 9567025: Ensure pipelined requests are sent in the same order they're queued. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_stream_factory_impl.h" 5 #include "net/http/http_stream_factory_impl.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "net/base/net_log.h" 10 #include "net/base/net_log.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 request->OnStreamReady(NULL, 250 request->OnStreamReady(NULL,
251 stream->used_ssl_config(), 251 stream->used_ssl_config(),
252 stream->used_proxy_info(), 252 stream->used_proxy_info(),
253 stream); 253 stream);
254 } 254 }
255 } 255 }
256 256
257 void HttpStreamFactoryImpl::AbortPipelinedRequestsWithKey( 257 void HttpStreamFactoryImpl::AbortPipelinedRequestsWithKey(
258 const Job* job, const HttpPipelinedHost::Key& key, int status, 258 const Job* job, const HttpPipelinedHost::Key& key, int status,
259 const SSLConfig& used_ssl_config) { 259 const SSLConfig& used_ssl_config) {
260 RequestSet requests_to_fail = http_pipelining_request_map_[key]; 260 RequestVector requests_to_fail = http_pipelining_request_map_[key];
261 requests_to_fail.erase(request_map_[job]); 261 for (RequestVector::const_iterator it = requests_to_fail.begin();
262 for (RequestSet::const_iterator it = requests_to_fail.begin();
263 it != requests_to_fail.end(); ++it) { 262 it != requests_to_fail.end(); ++it) {
264 Request* request = *it; 263 Request* request = *it;
264 if (request == request_map_[job]) {
265 continue;
266 }
265 request->OnStreamFailed(NULL, status, used_ssl_config); 267 request->OnStreamFailed(NULL, status, used_ssl_config);
266 } 268 }
267 } 269 }
268 270
269 } // namespace net 271 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698