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

Side by Side Diff: net/http/http_network_session.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_network_session.h ('k') | net/http/http_network_transaction.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_network_session.h" 5 #include "net/http/http_network_session.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 } 378 }
379 379
380 void HttpNetworkSession::GetNpnProtos(NextProtoVector* npn_protos) const { 380 void HttpNetworkSession::GetNpnProtos(NextProtoVector* npn_protos) const {
381 if (HttpStreamFactory::spdy_enabled() && params_.enable_npn) { 381 if (HttpStreamFactory::spdy_enabled() && params_.enable_npn) {
382 *npn_protos = next_protos_; 382 *npn_protos = next_protos_;
383 } else { 383 } else {
384 npn_protos->clear(); 384 npn_protos->clear();
385 } 385 }
386 } 386 }
387 387
388 void HttpNetworkSession::GetSSLConfig(const HttpRequestInfo& request,
389 SSLConfig* server_config,
390 SSLConfig* proxy_config) const {
391 ssl_config_service_->GetSSLConfig(server_config);
392 GetAlpnProtos(&server_config->alpn_protos);
393 GetNpnProtos(&server_config->npn_protos);
394 *proxy_config = *server_config;
395 if (request.privacy_mode == PRIVACY_MODE_ENABLED) {
396 server_config->channel_id_enabled = false;
397 } else if (params_.enable_token_binding && params_.channel_id_service) {
398 server_config->token_binding_params.push_back(TB_PARAM_ECDSAP256);
399 }
400 }
401
388 ClientSocketPoolManager* HttpNetworkSession::GetSocketPoolManager( 402 ClientSocketPoolManager* HttpNetworkSession::GetSocketPoolManager(
389 SocketPoolType pool_type) { 403 SocketPoolType pool_type) {
390 switch (pool_type) { 404 switch (pool_type) {
391 case NORMAL_SOCKET_POOL: 405 case NORMAL_SOCKET_POOL:
392 return normal_socket_pool_manager_.get(); 406 return normal_socket_pool_manager_.get();
393 case WEBSOCKET_SOCKET_POOL: 407 case WEBSOCKET_SOCKET_POOL:
394 return websocket_socket_pool_manager_.get(); 408 return websocket_socket_pool_manager_.get();
395 default: 409 default:
396 NOTREACHED(); 410 NOTREACHED();
397 break; 411 break;
398 } 412 }
399 return NULL; 413 return NULL;
400 } 414 }
401 415
402 } // namespace net 416 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.h ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698