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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 7827033: Introduce net::HttpServerPropertiesManager to manage server-specific properties. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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_server_properties_impl_unittest.cc ('k') | net/net.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_job.cc
===================================================================
--- net/http/http_stream_factory_impl_job.cc (revision 104660)
+++ net/http/http_stream_factory_impl_job.cc (working copy)
@@ -19,6 +19,7 @@
#include "net/http/http_proxy_client_socket.h"
#include "net/http/http_proxy_client_socket_pool.h"
#include "net/http/http_request_info.h"
+#include "net/http/http_server_properties.h"
#include "net/http/http_stream_factory_impl_request.h"
#include "net/socket/client_socket_handle.h"
#include "net/socket/client_socket_pool.h"
@@ -119,7 +120,17 @@
int HttpStreamFactoryImpl::Job::Preconnect(int num_streams) {
DCHECK_GT(num_streams, 0);
- num_streams_ = num_streams;
+ HostPortPair origin_server =
+ HostPortPair(request_info_.url.HostNoBrackets(),
+ request_info_.url.EffectiveIntPort());
+ HttpServerProperties* http_server_properties =
+ session_->http_server_properties();
+ if (http_server_properties &&
+ http_server_properties->SupportsSpdy(origin_server)) {
+ num_streams_ = 1;
+ } else {
+ num_streams_ = num_streams;
+ }
return StartInternal();
}
@@ -821,6 +832,11 @@
&new_spdy_session_, using_ssl_);
if (error != OK)
return error;
+ const HostPortPair& host_port_pair = pair.first;
+ HttpServerProperties* http_server_properties =
+ session_->http_server_properties();
+ if (http_server_properties)
+ http_server_properties->SetSupportsSpdy(host_port_pair, true);
spdy_session_direct_ = direct;
return OK;
}
« no previous file with comments | « net/http/http_server_properties_impl_unittest.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698