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

Unified Diff: net/http/http_stream_factory_impl.cc

Issue 9433015: Add a force pipelining option to load flags. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix build on other platforms Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698