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

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: Remove ssl_config args from PreconnectStreams and remove privacy mode/token binding duplicate logic 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
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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 } 375 }
376 376
377 void HttpNetworkSession::GetNpnProtos(NextProtoVector* npn_protos) const { 377 void HttpNetworkSession::GetNpnProtos(NextProtoVector* npn_protos) const {
378 if (HttpStreamFactory::spdy_enabled() && params_.enable_npn) { 378 if (HttpStreamFactory::spdy_enabled() && params_.enable_npn) {
379 *npn_protos = next_protos_; 379 *npn_protos = next_protos_;
380 } else { 380 } else {
381 npn_protos->clear(); 381 npn_protos->clear();
382 } 382 }
383 } 383 }
384 384
385 void HttpNetworkSession::GetSSLConfig(const HttpRequestInfo& request,
386 SSLConfig* config) const {
387 ssl_config_service_->GetSSLConfig(config);
388 GetAlpnProtos(&config->alpn_protos);
389 GetNpnProtos(&config->npn_protos);
390 if (request.privacy_mode == PRIVACY_MODE_ENABLED) {
391 config->channel_id_enabled = false;
392 } else if (params_.enable_token_binding && params_.channel_id_service) {
393 config->token_binding_params.push_back(TB_PARAM_ECDSAP256);
394 }
395 }
396
385 ClientSocketPoolManager* HttpNetworkSession::GetSocketPoolManager( 397 ClientSocketPoolManager* HttpNetworkSession::GetSocketPoolManager(
386 SocketPoolType pool_type) { 398 SocketPoolType pool_type) {
387 switch (pool_type) { 399 switch (pool_type) {
388 case NORMAL_SOCKET_POOL: 400 case NORMAL_SOCKET_POOL:
389 return normal_socket_pool_manager_.get(); 401 return normal_socket_pool_manager_.get();
390 case WEBSOCKET_SOCKET_POOL: 402 case WEBSOCKET_SOCKET_POOL:
391 return websocket_socket_pool_manager_.get(); 403 return websocket_socket_pool_manager_.get();
392 default: 404 default:
393 NOTREACHED(); 405 NOTREACHED();
394 break; 406 break;
395 } 407 }
396 return NULL; 408 return NULL;
397 } 409 }
398 410
399 } // namespace net 411 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698