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

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

Issue 1699653002: Remove support for Alt-Svc/Alternate Protocol Probability (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix BIDI Created 4 years, 9 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_network_transaction_unittest.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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 enable_tcp_fast_open_for_ssl(false), 91 enable_tcp_fast_open_for_ssl(false),
92 enable_spdy_ping_based_connection_checking(true), 92 enable_spdy_ping_based_connection_checking(true),
93 spdy_default_protocol(kProtoUnknown), 93 spdy_default_protocol(kProtoUnknown),
94 enable_spdy31(true), 94 enable_spdy31(true),
95 enable_http2(true), 95 enable_http2(true),
96 spdy_session_max_recv_window_size(kSpdySessionMaxRecvWindowSize), 96 spdy_session_max_recv_window_size(kSpdySessionMaxRecvWindowSize),
97 spdy_stream_max_recv_window_size(kSpdyStreamMaxRecvWindowSize), 97 spdy_stream_max_recv_window_size(kSpdyStreamMaxRecvWindowSize),
98 time_func(&base::TimeTicks::Now), 98 time_func(&base::TimeTicks::Now),
99 parse_alternative_services(false), 99 parse_alternative_services(false),
100 enable_alternative_service_with_different_host(false), 100 enable_alternative_service_with_different_host(false),
101 alternative_service_probability_threshold(1),
102 enable_npn(true), 101 enable_npn(true),
103 enable_brotli(false), 102 enable_brotli(false),
104 enable_quic(false), 103 enable_quic(false),
105 disable_quic_on_timeout_with_open_streams(false), 104 disable_quic_on_timeout_with_open_streams(false),
106 enable_quic_for_proxies(false), 105 enable_quic_for_proxies(false),
107 enable_quic_port_selection(true), 106 enable_quic_port_selection(true),
108 quic_always_require_handshake_confirmation(false), 107 quic_always_require_handshake_confirmation(false),
109 quic_disable_connection_pooling(false), 108 quic_disable_connection_pooling(false),
110 quic_load_server_info_timeout_srtt_multiplier(0.25f), 109 quic_load_server_info_timeout_srtt_multiplier(0.25f),
111 quic_enable_connection_racing(false), 110 quic_enable_connection_racing(false),
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 236
238 if (params_.enable_quic) { 237 if (params_.enable_quic) {
239 AlternateProtocol alternate = 238 AlternateProtocol alternate =
240 AlternateProtocolFromNextProto(kProtoQUIC1SPDY3); 239 AlternateProtocolFromNextProto(kProtoQUIC1SPDY3);
241 enabled_protocols_[alternate - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION] = 240 enabled_protocols_[alternate - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION] =
242 true; 241 true;
243 } 242 }
244 243
245 next_protos_.push_back(kProtoHTTP11); 244 next_protos_.push_back(kProtoHTTP11);
246 245
247 http_server_properties_->SetAlternativeServiceProbabilityThreshold(
248 params.alternative_service_probability_threshold);
249 http_server_properties_->SetMaxServerConfigsStoredInProperties( 246 http_server_properties_->SetMaxServerConfigsStoredInProperties(
250 params.quic_max_server_configs_stored_in_properties); 247 params.quic_max_server_configs_stored_in_properties);
251 } 248 }
252 249
253 HttpNetworkSession::~HttpNetworkSession() { 250 HttpNetworkSession::~HttpNetworkSession() {
254 STLDeleteElements(&response_drainers_); 251 STLDeleteElements(&response_drainers_);
255 spdy_session_pool_.CloseAllSessions(); 252 spdy_session_pool_.CloseAllSessions();
256 } 253 }
257 254
258 void HttpNetworkSession::AddResponseDrainer(HttpResponseBodyDrainer* drainer) { 255 void HttpNetworkSession::AddResponseDrainer(HttpResponseBodyDrainer* drainer) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 params_.enable_quic_port_selection); 311 params_.enable_quic_port_selection);
315 scoped_ptr<base::ListValue> connection_options(new base::ListValue); 312 scoped_ptr<base::ListValue> connection_options(new base::ListValue);
316 for (QuicTagVector::const_iterator it = 313 for (QuicTagVector::const_iterator it =
317 params_.quic_connection_options.begin(); 314 params_.quic_connection_options.begin();
318 it != params_.quic_connection_options.end(); ++it) { 315 it != params_.quic_connection_options.end(); ++it) {
319 connection_options->AppendString("'" + QuicUtils::TagToString(*it) + "'"); 316 connection_options->AppendString("'" + QuicUtils::TagToString(*it) + "'");
320 } 317 }
321 dict->Set("connection_options", std::move(connection_options)); 318 dict->Set("connection_options", std::move(connection_options));
322 dict->SetString("origin_to_force_quic_on", 319 dict->SetString("origin_to_force_quic_on",
323 params_.origin_to_force_quic_on.ToString()); 320 params_.origin_to_force_quic_on.ToString());
324 dict->SetDouble("alternative_service_probability_threshold",
325 params_.alternative_service_probability_threshold);
326 dict->SetDouble("load_server_info_timeout_srtt_multiplier", 321 dict->SetDouble("load_server_info_timeout_srtt_multiplier",
327 params_.quic_load_server_info_timeout_srtt_multiplier); 322 params_.quic_load_server_info_timeout_srtt_multiplier);
328 dict->SetBoolean("enable_connection_racing", 323 dict->SetBoolean("enable_connection_racing",
329 params_.quic_enable_connection_racing); 324 params_.quic_enable_connection_racing);
330 dict->SetBoolean("disable_disk_cache", params_.quic_disable_disk_cache); 325 dict->SetBoolean("disable_disk_cache", params_.quic_disable_disk_cache);
331 dict->SetBoolean("prefer_aes", params_.quic_prefer_aes); 326 dict->SetBoolean("prefer_aes", params_.quic_prefer_aes);
332 dict->SetInteger("max_number_of_lossy_connections", 327 dict->SetInteger("max_number_of_lossy_connections",
333 params_.quic_max_number_of_lossy_connections); 328 params_.quic_max_number_of_lossy_connections);
334 dict->SetDouble("packet_loss_threshold", params_.quic_packet_loss_threshold); 329 dict->SetDouble("packet_loss_threshold", params_.quic_packet_loss_threshold);
335 dict->SetBoolean("delay_tcp_race", params_.quic_delay_tcp_race); 330 dict->SetBoolean("delay_tcp_race", params_.quic_delay_tcp_race);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 case WEBSOCKET_SOCKET_POOL: 382 case WEBSOCKET_SOCKET_POOL:
388 return websocket_socket_pool_manager_.get(); 383 return websocket_socket_pool_manager_.get();
389 default: 384 default:
390 NOTREACHED(); 385 NOTREACHED();
391 break; 386 break;
392 } 387 }
393 return NULL; 388 return NULL;
394 } 389 }
395 390
396 } // namespace net 391 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.h ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698