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

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: rebase 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 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* config) const {
390 ssl_config_service_->GetSSLConfig(config);
391 GetAlpnProtos(&config->alpn_protos);
392 GetNpnProtos(&config->npn_protos);
393 if (request.privacy_mode == PRIVACY_MODE_ENABLED) {
394 config->channel_id_enabled = false;
395 } else if (params_.enable_token_binding && params_.channel_id_service) {
396 config->token_binding_params.push_back(TB_PARAM_ECDSAP256);
397 }
398 }
399
388 ClientSocketPoolManager* HttpNetworkSession::GetSocketPoolManager( 400 ClientSocketPoolManager* HttpNetworkSession::GetSocketPoolManager(
389 SocketPoolType pool_type) { 401 SocketPoolType pool_type) {
390 switch (pool_type) { 402 switch (pool_type) {
391 case NORMAL_SOCKET_POOL: 403 case NORMAL_SOCKET_POOL:
392 return normal_socket_pool_manager_.get(); 404 return normal_socket_pool_manager_.get();
393 case WEBSOCKET_SOCKET_POOL: 405 case WEBSOCKET_SOCKET_POOL:
394 return websocket_socket_pool_manager_.get(); 406 return websocket_socket_pool_manager_.get();
395 default: 407 default:
396 NOTREACHED(); 408 NOTREACHED();
397 break; 409 break;
398 } 410 }
399 return NULL; 411 return NULL;
400 } 412 }
401 413
402 } // namespace net 414 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698