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

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

Issue 2348453002: Remove NPN from SSLConfig and SSLClientSocket*. (Closed)
Patch Set: Re: #7. Created 4 years, 3 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_server_properties.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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 bool HttpNetworkSession::IsProtocolEnabled(AlternateProtocol protocol) const { 358 bool HttpNetworkSession::IsProtocolEnabled(AlternateProtocol protocol) const {
359 DCHECK(IsAlternateProtocolValid(protocol)); 359 DCHECK(IsAlternateProtocolValid(protocol));
360 return enabled_protocols_[ 360 return enabled_protocols_[
361 protocol - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION]; 361 protocol - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION];
362 } 362 }
363 363
364 void HttpNetworkSession::GetAlpnProtos(NextProtoVector* alpn_protos) const { 364 void HttpNetworkSession::GetAlpnProtos(NextProtoVector* alpn_protos) const {
365 *alpn_protos = next_protos_; 365 *alpn_protos = next_protos_;
366 } 366 }
367 367
368 void HttpNetworkSession::GetNpnProtos(NextProtoVector* npn_protos) const {
369 npn_protos->clear();
370 }
371
372 void HttpNetworkSession::GetSSLConfig(const HttpRequestInfo& request, 368 void HttpNetworkSession::GetSSLConfig(const HttpRequestInfo& request,
373 SSLConfig* server_config, 369 SSLConfig* server_config,
374 SSLConfig* proxy_config) const { 370 SSLConfig* proxy_config) const {
375 ssl_config_service_->GetSSLConfig(server_config); 371 ssl_config_service_->GetSSLConfig(server_config);
376 GetAlpnProtos(&server_config->alpn_protos); 372 GetAlpnProtos(&server_config->alpn_protos);
377 GetNpnProtos(&server_config->npn_protos);
378 *proxy_config = *server_config; 373 *proxy_config = *server_config;
379 if (request.privacy_mode == PRIVACY_MODE_ENABLED) { 374 if (request.privacy_mode == PRIVACY_MODE_ENABLED) {
380 server_config->channel_id_enabled = false; 375 server_config->channel_id_enabled = false;
381 } else if (params_.enable_token_binding && params_.channel_id_service) { 376 } else if (params_.enable_token_binding && params_.channel_id_service) {
382 server_config->token_binding_params.push_back(TB_PARAM_ECDSAP256); 377 server_config->token_binding_params.push_back(TB_PARAM_ECDSAP256);
383 } 378 }
384 } 379 }
385 380
386 ClientSocketPoolManager* HttpNetworkSession::GetSocketPoolManager( 381 ClientSocketPoolManager* HttpNetworkSession::GetSocketPoolManager(
387 SocketPoolType pool_type) { 382 SocketPoolType pool_type) {
(...skipping 15 matching lines...) Expand all
403 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE: 398 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE:
404 break; 399 break;
405 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE: 400 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE:
406 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL: 401 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL:
407 CloseIdleConnections(); 402 CloseIdleConnections();
408 break; 403 break;
409 } 404 }
410 } 405 }
411 406
412 } // namespace net 407 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.h ('k') | net/http/http_server_properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698