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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 1904483004: Change SupportsSpdy dict, SpdySettingsMap, ServerNetworkStatsMap, AlternativeServiceMap and disk da… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile after sync code, introduced by commit 388755 Created 4 years, 8 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.cc ('k') | net/http/http_stream_factory_impl_unittest.cc » ('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
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index 731cc1b893fee66d0b55010e229af467b19d81d6..152ec3f3d71fd62294f9d379d4eb677affd24ce8 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -257,7 +257,7 @@ int HttpStreamFactoryImpl::Job::Preconnect(int num_streams) {
session_->http_server_properties();
if (http_server_properties &&
http_server_properties->SupportsRequestPriority(
- HostPortPair::FromURL(request_info_.url))) {
+ url::SchemeHostPort(request_info_.url))) {
num_streams_ = 1;
} else {
num_streams_ = num_streams;
@@ -1416,9 +1416,9 @@ int HttpStreamFactoryImpl::Job::DoCreateStream() {
SSLInfo ssl_info;
bool was_npn_negotiated;
NextProto protocol_negotiated;
- if (spdy_session->GetProtocolVersion() >= HTTP2 &&
- spdy_session->GetSSLInfo(&ssl_info, &was_npn_negotiated,
- &protocol_negotiated)) {
+ if (spdy_session->GetSSLInfo(&ssl_info, &was_npn_negotiated,
+ &protocol_negotiated) &&
+ spdy_session->GetProtocolVersion() >= HTTP2) {
UMA_HISTOGRAM_SPARSE_SLOWLY(
"Net.Http2SSLCipherSuite",
SSLConnectionStatusToCipherSuite(ssl_info.connection_status));
@@ -1426,11 +1426,16 @@ int HttpStreamFactoryImpl::Job::DoCreateStream() {
new_spdy_session_ = spdy_session;
spdy_session_direct_ = direct;
- const HostPortPair& host_port_pair = spdy_session_key.host_port_pair();
+ const HostPortPair host_port_pair = spdy_session_key.host_port_pair();
+ bool is_https = ssl_info.is_valid();
+ url::SchemeHostPort scheme_host_port(is_https ? "https" : "http",
+ host_port_pair.host(),
+ host_port_pair.port());
+
base::WeakPtr<HttpServerProperties> http_server_properties =
session_->http_server_properties();
if (http_server_properties)
- http_server_properties->SetSupportsSpdy(host_port_pair, true);
+ http_server_properties->SetSupportsSpdy(scheme_host_port, true);
// Create a SpdyHttpStream or a BidirectionalStreamImpl attached to the
// session; OnNewSpdySessionReadyCallback is not called until an event loop
« no previous file with comments | « net/http/http_stream_factory_impl.cc ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698