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

Unified Diff: net/http/http_stream_factory_impl.cc

Issue 7289006: Basic HTTP pipelining support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use HttpStreamFactoryImpl::Job Created 9 years, 5 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 63db4569e4dc904bac904b3b990443c9450c7e67..60ae0193f92f725b1d5dcde20b2416218714ac69 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"
@@ -205,4 +208,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(),
+ new HttpPipelinedStream(pipeline));
+ }
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698