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

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: Merge Created 9 years, 2 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
« no previous file with comments | « net/http/http_stream_factory_impl.h ('k') | net/http/http_stream_factory_impl_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 364d202fedd85ad6962a5851732380523966977a..9593dc4281c64511d7ed554e681fb62543c7283c 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_server_properties.h"
#include "net/http/http_stream_factory_impl_job.h"
#include "net/http/http_stream_factory_impl_request.h"
@@ -33,7 +36,8 @@ GURL UpgradeUrlToHttps(const GURL& original_url, int port) {
} // namespace
HttpStreamFactoryImpl::HttpStreamFactoryImpl(HttpNetworkSession* session)
- : session_(session) {}
+ : session_(session),
+ http_pipelined_host_pool_(this) {}
HttpStreamFactoryImpl::~HttpStreamFactoryImpl() {
DCHECK(request_map_.empty());
@@ -221,4 +225,21 @@ void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) {
OnPreconnectsCompleteInternal();
}
+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();
+ request->Complete(stream->was_npn_negotiated(),
+ false, // not using_spdy
+ stream->source());
+ request->OnStreamReady(NULL,
+ stream->used_ssl_config(),
+ stream->used_proxy_info(),
+ stream);
+ }
+}
+
} // namespace net
« no previous file with comments | « net/http/http_stream_factory_impl.h ('k') | net/http/http_stream_factory_impl_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698