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

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

Issue 2140733002: Remove HttpStreamFactory::spdy_enabled_ static member and accessors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drop half of this CL. Created 4 years, 5 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 spdy_session_pool_.CloseCurrentIdleSessions(); 356 spdy_session_pool_.CloseCurrentIdleSessions();
357 } 357 }
358 358
359 bool HttpNetworkSession::IsProtocolEnabled(AlternateProtocol protocol) const { 359 bool HttpNetworkSession::IsProtocolEnabled(AlternateProtocol protocol) const {
360 DCHECK(IsAlternateProtocolValid(protocol)); 360 DCHECK(IsAlternateProtocolValid(protocol));
361 return enabled_protocols_[ 361 return enabled_protocols_[
362 protocol - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION]; 362 protocol - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION];
363 } 363 }
364 364
365 void HttpNetworkSession::GetAlpnProtos(NextProtoVector* alpn_protos) const { 365 void HttpNetworkSession::GetAlpnProtos(NextProtoVector* alpn_protos) const {
366 if (HttpStreamFactory::spdy_enabled()) { 366 *alpn_protos = next_protos_;
367 *alpn_protos = next_protos_;
368 } else {
369 alpn_protos->clear();
370 }
371 } 367 }
372 368
373 void HttpNetworkSession::GetNpnProtos(NextProtoVector* npn_protos) const { 369 void HttpNetworkSession::GetNpnProtos(NextProtoVector* npn_protos) const {
374 npn_protos->clear(); 370 npn_protos->clear();
375 } 371 }
376 372
377 void HttpNetworkSession::GetSSLConfig(const HttpRequestInfo& request, 373 void HttpNetworkSession::GetSSLConfig(const HttpRequestInfo& request,
378 SSLConfig* server_config, 374 SSLConfig* server_config,
379 SSLConfig* proxy_config) const { 375 SSLConfig* proxy_config) const {
380 ssl_config_service_->GetSSLConfig(server_config); 376 ssl_config_service_->GetSSLConfig(server_config);
(...skipping 15 matching lines...) Expand all
396 case WEBSOCKET_SOCKET_POOL: 392 case WEBSOCKET_SOCKET_POOL:
397 return websocket_socket_pool_manager_.get(); 393 return websocket_socket_pool_manager_.get();
398 default: 394 default:
399 NOTREACHED(); 395 NOTREACHED();
400 break; 396 break;
401 } 397 }
402 return NULL; 398 return NULL;
403 } 399 }
404 400
405 } // namespace net 401 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698