| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |