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

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

Issue 1572753003: QUIC - Allow cronet apps to specify how many server configs are to be (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments in Patch set 4 Created 4 years, 11 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.h » ('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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 quic_disable_connection_pooling(false), 107 quic_disable_connection_pooling(false),
108 quic_load_server_info_timeout_srtt_multiplier(0.25f), 108 quic_load_server_info_timeout_srtt_multiplier(0.25f),
109 quic_enable_connection_racing(false), 109 quic_enable_connection_racing(false),
110 quic_enable_non_blocking_io(false), 110 quic_enable_non_blocking_io(false),
111 quic_disable_disk_cache(false), 111 quic_disable_disk_cache(false),
112 quic_prefer_aes(false), 112 quic_prefer_aes(false),
113 quic_max_number_of_lossy_connections(0), 113 quic_max_number_of_lossy_connections(0),
114 quic_packet_loss_threshold(1.0f), 114 quic_packet_loss_threshold(1.0f),
115 quic_socket_receive_buffer_size(kQuicSocketReceiveBufferSize), 115 quic_socket_receive_buffer_size(kQuicSocketReceiveBufferSize),
116 quic_delay_tcp_race(false), 116 quic_delay_tcp_race(false),
117 quic_store_server_configs_in_properties(false), 117 quic_max_server_configs_stored_in_properties(0u),
118 quic_clock(NULL), 118 quic_clock(NULL),
119 quic_random(NULL), 119 quic_random(NULL),
120 quic_max_packet_length(kDefaultMaxPacketSize), 120 quic_max_packet_length(kDefaultMaxPacketSize),
121 enable_user_alternate_protocol_ports(false), 121 enable_user_alternate_protocol_ports(false),
122 quic_crypto_client_stream_factory( 122 quic_crypto_client_stream_factory(
123 QuicCryptoClientStreamFactory::GetDefaultFactory()), 123 QuicCryptoClientStreamFactory::GetDefaultFactory()),
124 quic_max_recent_disabled_reasons(kQuicMaxRecentDisabledReasons), 124 quic_max_recent_disabled_reasons(kQuicMaxRecentDisabledReasons),
125 quic_threshold_public_resets_post_handshake(0), 125 quic_threshold_public_resets_post_handshake(0),
126 quic_threshold_timeouts_streams_open(0), 126 quic_threshold_timeouts_streams_open(0),
127 quic_close_sessions_on_ip_change(false), 127 quic_close_sessions_on_ip_change(false),
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 params.quic_enable_non_blocking_io, 169 params.quic_enable_non_blocking_io,
170 params.quic_disable_disk_cache, 170 params.quic_disable_disk_cache,
171 params.quic_prefer_aes, 171 params.quic_prefer_aes,
172 params.quic_max_number_of_lossy_connections, 172 params.quic_max_number_of_lossy_connections,
173 params.quic_packet_loss_threshold, 173 params.quic_packet_loss_threshold,
174 params.quic_max_recent_disabled_reasons, 174 params.quic_max_recent_disabled_reasons,
175 params.quic_threshold_public_resets_post_handshake, 175 params.quic_threshold_public_resets_post_handshake,
176 params.quic_threshold_timeouts_streams_open, 176 params.quic_threshold_timeouts_streams_open,
177 params.quic_socket_receive_buffer_size, 177 params.quic_socket_receive_buffer_size,
178 params.quic_delay_tcp_race, 178 params.quic_delay_tcp_race,
179 params.quic_store_server_configs_in_properties, 179 params.quic_max_server_configs_stored_in_properties,
180 params.quic_close_sessions_on_ip_change, 180 params.quic_close_sessions_on_ip_change,
181 params.quic_idle_connection_timeout_seconds, 181 params.quic_idle_connection_timeout_seconds,
182 params.quic_migrate_sessions_on_network_change, 182 params.quic_migrate_sessions_on_network_change,
183 params.quic_connection_options), 183 params.quic_connection_options),
184 spdy_session_pool_(params.host_resolver, 184 spdy_session_pool_(params.host_resolver,
185 params.ssl_config_service, 185 params.ssl_config_service,
186 params.http_server_properties, 186 params.http_server_properties,
187 params.transport_security_state, 187 params.transport_security_state,
188 params.enable_spdy_compression, 188 params.enable_spdy_compression,
189 params.enable_spdy_ping_based_connection_checking, 189 params.enable_spdy_ping_based_connection_checking,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 NOTREACHED() << "Invalid next proto: " << proto; 232 NOTREACHED() << "Invalid next proto: " << proto;
233 continue; 233 continue;
234 } 234 }
235 enabled_protocols_[alternate - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION] = 235 enabled_protocols_[alternate - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION] =
236 true; 236 true;
237 } 237 }
238 } 238 }
239 239
240 http_server_properties_->SetAlternativeServiceProbabilityThreshold( 240 http_server_properties_->SetAlternativeServiceProbabilityThreshold(
241 params.alternative_service_probability_threshold); 241 params.alternative_service_probability_threshold);
242 http_server_properties_->SetMaxServerConfigsStoredInProperties(
243 params.quic_max_server_configs_stored_in_properties);
242 } 244 }
243 245
244 HttpNetworkSession::~HttpNetworkSession() { 246 HttpNetworkSession::~HttpNetworkSession() {
245 STLDeleteElements(&response_drainers_); 247 STLDeleteElements(&response_drainers_);
246 spdy_session_pool_.CloseAllSessions(); 248 spdy_session_pool_.CloseAllSessions();
247 } 249 }
248 250
249 void HttpNetworkSession::AddResponseDrainer(HttpResponseBodyDrainer* drainer) { 251 void HttpNetworkSession::AddResponseDrainer(HttpResponseBodyDrainer* drainer) {
250 DCHECK(!ContainsKey(response_drainers_, drainer)); 252 DCHECK(!ContainsKey(response_drainers_, drainer));
251 response_drainers_.insert(drainer); 253 response_drainers_.insert(drainer);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 dict->SetDouble("load_server_info_timeout_srtt_multiplier", 319 dict->SetDouble("load_server_info_timeout_srtt_multiplier",
318 params_.quic_load_server_info_timeout_srtt_multiplier); 320 params_.quic_load_server_info_timeout_srtt_multiplier);
319 dict->SetBoolean("enable_connection_racing", 321 dict->SetBoolean("enable_connection_racing",
320 params_.quic_enable_connection_racing); 322 params_.quic_enable_connection_racing);
321 dict->SetBoolean("disable_disk_cache", params_.quic_disable_disk_cache); 323 dict->SetBoolean("disable_disk_cache", params_.quic_disable_disk_cache);
322 dict->SetBoolean("prefer_aes", params_.quic_prefer_aes); 324 dict->SetBoolean("prefer_aes", params_.quic_prefer_aes);
323 dict->SetInteger("max_number_of_lossy_connections", 325 dict->SetInteger("max_number_of_lossy_connections",
324 params_.quic_max_number_of_lossy_connections); 326 params_.quic_max_number_of_lossy_connections);
325 dict->SetDouble("packet_loss_threshold", params_.quic_packet_loss_threshold); 327 dict->SetDouble("packet_loss_threshold", params_.quic_packet_loss_threshold);
326 dict->SetBoolean("delay_tcp_race", params_.quic_delay_tcp_race); 328 dict->SetBoolean("delay_tcp_race", params_.quic_delay_tcp_race);
327 dict->SetBoolean("store_server_configs_in_properties", 329 dict->SetInteger("max_server_configs_stored_in_properties",
328 params_.quic_store_server_configs_in_properties); 330 params_.quic_max_server_configs_stored_in_properties);
329 dict->SetInteger("idle_connection_timeout_seconds", 331 dict->SetInteger("idle_connection_timeout_seconds",
330 params_.quic_idle_connection_timeout_seconds); 332 params_.quic_idle_connection_timeout_seconds);
331 dict->SetBoolean("disable_preconnect_if_0rtt", 333 dict->SetBoolean("disable_preconnect_if_0rtt",
332 params_.quic_disable_preconnect_if_0rtt); 334 params_.quic_disable_preconnect_if_0rtt);
333 dict->SetString("disabled_reason", 335 dict->SetString("disabled_reason",
334 quic_stream_factory_.QuicDisabledReasonString()); 336 quic_stream_factory_.QuicDisabledReasonString());
335 return std::move(dict); 337 return std::move(dict);
336 } 338 }
337 339
338 void HttpNetworkSession::CloseAllConnections() { 340 void HttpNetworkSession::CloseAllConnections() {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 case WEBSOCKET_SOCKET_POOL: 386 case WEBSOCKET_SOCKET_POOL:
385 return websocket_socket_pool_manager_.get(); 387 return websocket_socket_pool_manager_.get();
386 default: 388 default:
387 NOTREACHED(); 389 NOTREACHED();
388 break; 390 break;
389 } 391 }
390 return NULL; 392 return NULL;
391 } 393 }
392 394
393 } // namespace net 395 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.h ('k') | net/http/http_server_properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698