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

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

Issue 2301453002: Quic use reduced PING timeout when previous connection times out with open streams (Closed)
Patch Set: address rch's comments 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
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 quic_random(NULL), 115 quic_random(NULL),
116 quic_max_packet_length(kDefaultMaxPacketSize), 116 quic_max_packet_length(kDefaultMaxPacketSize),
117 enable_user_alternate_protocol_ports(false), 117 enable_user_alternate_protocol_ports(false),
118 quic_crypto_client_stream_factory( 118 quic_crypto_client_stream_factory(
119 QuicCryptoClientStreamFactory::GetDefaultFactory()), 119 QuicCryptoClientStreamFactory::GetDefaultFactory()),
120 quic_max_recent_disabled_reasons(kQuicMaxRecentDisabledReasons), 120 quic_max_recent_disabled_reasons(kQuicMaxRecentDisabledReasons),
121 quic_threshold_public_resets_post_handshake(0), 121 quic_threshold_public_resets_post_handshake(0),
122 quic_threshold_timeouts_streams_open(0), 122 quic_threshold_timeouts_streams_open(0),
123 quic_close_sessions_on_ip_change(false), 123 quic_close_sessions_on_ip_change(false),
124 quic_idle_connection_timeout_seconds(kIdleConnectionTimeoutSeconds), 124 quic_idle_connection_timeout_seconds(kIdleConnectionTimeoutSeconds),
125 quic_reduced_ping_timeout_seconds(kPingTimeoutSecs),
ianswett 2016/09/01 20:04:15 nit: kDefaultPingTimeoutSecs?
Zhongyi Shi 2016/09/02 00:48:21 Shall we change it when we decide to default this
125 quic_packet_reader_yield_after_duration_milliseconds( 126 quic_packet_reader_yield_after_duration_milliseconds(
126 kQuicYieldAfterDurationMilliseconds), 127 kQuicYieldAfterDurationMilliseconds),
127 quic_disable_preconnect_if_0rtt(false), 128 quic_disable_preconnect_if_0rtt(false),
128 quic_migrate_sessions_on_network_change(false), 129 quic_migrate_sessions_on_network_change(false),
129 quic_migrate_sessions_early(false), 130 quic_migrate_sessions_early(false),
130 quic_allow_server_migration(false), 131 quic_allow_server_migration(false),
131 quic_disable_bidirectional_streams(false), 132 quic_disable_bidirectional_streams(false),
132 quic_force_hol_blocking(false), 133 quic_force_hol_blocking(false),
133 quic_race_cert_verification(false), 134 quic_race_cert_verification(false),
134 proxy_delegate(NULL), 135 proxy_delegate(NULL),
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 params.quic_packet_loss_threshold, 181 params.quic_packet_loss_threshold,
181 params.quic_max_recent_disabled_reasons, 182 params.quic_max_recent_disabled_reasons,
182 params.quic_threshold_public_resets_post_handshake, 183 params.quic_threshold_public_resets_post_handshake,
183 params.quic_threshold_timeouts_streams_open, 184 params.quic_threshold_timeouts_streams_open,
184 params.quic_socket_receive_buffer_size, 185 params.quic_socket_receive_buffer_size,
185 params.quic_delay_tcp_race, 186 params.quic_delay_tcp_race,
186 params.quic_max_server_configs_stored_in_properties, 187 params.quic_max_server_configs_stored_in_properties,
187 params.quic_close_sessions_on_ip_change, 188 params.quic_close_sessions_on_ip_change,
188 params.disable_quic_on_timeout_with_open_streams, 189 params.disable_quic_on_timeout_with_open_streams,
189 params.quic_idle_connection_timeout_seconds, 190 params.quic_idle_connection_timeout_seconds,
191 params.quic_reduced_ping_timeout_seconds,
190 params.quic_packet_reader_yield_after_duration_milliseconds, 192 params.quic_packet_reader_yield_after_duration_milliseconds,
191 params.quic_migrate_sessions_on_network_change, 193 params.quic_migrate_sessions_on_network_change,
192 params.quic_migrate_sessions_early, 194 params.quic_migrate_sessions_early,
193 params.quic_allow_server_migration, 195 params.quic_allow_server_migration,
194 params.quic_force_hol_blocking, 196 params.quic_force_hol_blocking,
195 params.quic_race_cert_verification, 197 params.quic_race_cert_verification,
196 params.quic_connection_options, 198 params.quic_connection_options,
197 params.enable_token_binding), 199 params.enable_token_binding),
198 spdy_session_pool_(params.host_resolver, 200 spdy_session_pool_(params.host_resolver,
199 params.ssl_config_service, 201 params.ssl_config_service,
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 dict->SetBoolean("disable_disk_cache", params_.quic_disable_disk_cache); 334 dict->SetBoolean("disable_disk_cache", params_.quic_disable_disk_cache);
333 dict->SetBoolean("prefer_aes", params_.quic_prefer_aes); 335 dict->SetBoolean("prefer_aes", params_.quic_prefer_aes);
334 dict->SetInteger("max_number_of_lossy_connections", 336 dict->SetInteger("max_number_of_lossy_connections",
335 params_.quic_max_number_of_lossy_connections); 337 params_.quic_max_number_of_lossy_connections);
336 dict->SetDouble("packet_loss_threshold", params_.quic_packet_loss_threshold); 338 dict->SetDouble("packet_loss_threshold", params_.quic_packet_loss_threshold);
337 dict->SetBoolean("delay_tcp_race", params_.quic_delay_tcp_race); 339 dict->SetBoolean("delay_tcp_race", params_.quic_delay_tcp_race);
338 dict->SetInteger("max_server_configs_stored_in_properties", 340 dict->SetInteger("max_server_configs_stored_in_properties",
339 params_.quic_max_server_configs_stored_in_properties); 341 params_.quic_max_server_configs_stored_in_properties);
340 dict->SetInteger("idle_connection_timeout_seconds", 342 dict->SetInteger("idle_connection_timeout_seconds",
341 params_.quic_idle_connection_timeout_seconds); 343 params_.quic_idle_connection_timeout_seconds);
344 dict->SetInteger("reduced_ping_timeout_seconds",
345 params_.quic_reduced_ping_timeout_seconds);
342 dict->SetInteger( 346 dict->SetInteger(
343 "packet_reader_yield_after_duration_milliseconds", 347 "packet_reader_yield_after_duration_milliseconds",
344 params_.quic_packet_reader_yield_after_duration_milliseconds); 348 params_.quic_packet_reader_yield_after_duration_milliseconds);
345 dict->SetBoolean("disable_preconnect_if_0rtt", 349 dict->SetBoolean("disable_preconnect_if_0rtt",
346 params_.quic_disable_preconnect_if_0rtt); 350 params_.quic_disable_preconnect_if_0rtt);
347 dict->SetBoolean("disable_quic_on_timeout_with_open_streams", 351 dict->SetBoolean("disable_quic_on_timeout_with_open_streams",
348 params_.disable_quic_on_timeout_with_open_streams); 352 params_.disable_quic_on_timeout_with_open_streams);
349 dict->SetString("disabled_reason", 353 dict->SetString("disabled_reason",
350 quic_stream_factory_.QuicDisabledReasonString()); 354 quic_stream_factory_.QuicDisabledReasonString());
351 dict->SetBoolean("force_hol_blocking", params_.quic_force_hol_blocking); 355 dict->SetBoolean("force_hol_blocking", params_.quic_force_hol_blocking);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE: 419 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE:
416 break; 420 break;
417 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE: 421 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE:
418 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL: 422 case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL:
419 CloseIdleConnections(); 423 CloseIdleConnections();
420 break; 424 break;
421 } 425 }
422 } 426 }
423 427
424 } // namespace net 428 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698