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

Side by Side Diff: net/http/http_stream_factory_impl.cc

Issue 1850043002: Check whether to enable token binding in preconnect.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: HttpNetworkSession::GetSSLConfig populates both server and proxy configs 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 unified diff | Download patch
« no previous file with comments | « net/http/http_stream_factory_impl.h ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_stream_factory_impl.h" 5 #include "net/http/http_stream_factory_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 // Even if |alternative_job| has already finished, it will not have notified 136 // Even if |alternative_job| has already finished, it will not have notified
137 // the request yet, since we defer that to the next iteration of the 137 // the request yet, since we defer that to the next iteration of the
138 // MessageLoop, so starting |job| is always safe. 138 // MessageLoop, so starting |job| is always safe.
139 job->Start(request); 139 job->Start(request);
140 return request; 140 return request;
141 } 141 }
142 142
143 void HttpStreamFactoryImpl::PreconnectStreams( 143 void HttpStreamFactoryImpl::PreconnectStreams(
144 int num_streams, 144 int num_streams,
145 const HttpRequestInfo& request_info, 145 const HttpRequestInfo& request_info) {
146 const SSLConfig& server_ssl_config, 146 SSLConfig server_ssl_config;
147 const SSLConfig& proxy_ssl_config) { 147 SSLConfig proxy_ssl_config;
148 session_->GetSSLConfig(request_info, &server_ssl_config, &proxy_ssl_config);
149 // All preconnects should perform EV certificate verification.
150 server_ssl_config.verify_ev_cert = true;
151 proxy_ssl_config.verify_ev_cert = true;
152
148 DCHECK(!for_websockets_); 153 DCHECK(!for_websockets_);
149 AlternativeService alternative_service = GetAlternativeServiceFor( 154 AlternativeService alternative_service = GetAlternativeServiceFor(
150 request_info, nullptr, HttpStreamRequest::HTTP_STREAM); 155 request_info, nullptr, HttpStreamRequest::HTTP_STREAM);
151 HostPortPair destination(HostPortPair::FromURL(request_info.url)); 156 HostPortPair destination(HostPortPair::FromURL(request_info.url));
152 GURL origin_url = ApplyHostMappingRules(request_info.url, &destination); 157 GURL origin_url = ApplyHostMappingRules(request_info.url, &destination);
153 if (alternative_service.protocol != UNINITIALIZED_ALTERNATE_PROTOCOL) { 158 if (alternative_service.protocol != UNINITIALIZED_ALTERNATE_PROTOCOL) {
154 if (session_->params().quic_disable_preconnect_if_0rtt && 159 if (session_->params().quic_disable_preconnect_if_0rtt &&
155 alternative_service.protocol == QUIC && 160 alternative_service.protocol == QUIC &&
156 session_->quic_stream_factory()->ZeroRTTEnabledFor(QuicServerId( 161 session_->quic_stream_factory()->ZeroRTTEnabledFor(QuicServerId(
157 alternative_service.host_port_pair(), request_info.privacy_mode))) { 162 alternative_service.host_port_pair(), request_info.privacy_mode))) {
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 return true; 368 return true;
364 369
365 if (session_->params().transport_security_state->IsGooglePinnedHost(host)) 370 if (session_->params().transport_security_state->IsGooglePinnedHost(host))
366 return true; 371 return true;
367 372
368 return ContainsKey(session_->params().quic_host_whitelist, 373 return ContainsKey(session_->params().quic_host_whitelist,
369 base::ToLowerASCII(host)); 374 base::ToLowerASCII(host));
370 } 375 }
371 376
372 } // namespace net 377 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl.h ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698