Further clean up QuicConfig idle timeout API
Now that all of our clients use the single-parameter API, remove any API that allows setting different values or that uses seconds instead of QuicTime::Delta. Since the idle timeout is not used before the handshake, and required to be negotiated during the handshake, we're guaranteed that its default value is never used and only the maximum value matters. Therefore this CL does not change any behavior.
gfe-relnote: refactor QuicConfig, not flag protected
PiperOrigin-RevId: 309474946
Change-Id: I070efb307b360d0e30d4481dfb3fe24bbec62306
diff --git a/quic/core/quic_config.cc b/quic/core/quic_config.cc
index 5a3e769..a06e698 100644
--- a/quic/core/quic_config.cc
+++ b/quic/core/quic_config.cc
@@ -590,16 +590,10 @@
ContainsQuicTag(client_connection_options_.GetSendValues(), tag));
}
-void QuicConfig::SetIdleNetworkTimeout(
- QuicTime::Delta max_idle_network_timeout,
- QuicTime::Delta default_idle_network_timeout) {
- idle_network_timeout_seconds_.set(
- static_cast<uint32_t>(max_idle_network_timeout.ToSeconds()),
- static_cast<uint32_t>(default_idle_network_timeout.ToSeconds()));
-}
-
void QuicConfig::SetIdleNetworkTimeout(QuicTime::Delta idle_network_timeout) {
- SetIdleNetworkTimeout(idle_network_timeout, idle_network_timeout);
+ idle_network_timeout_seconds_.set(
+ static_cast<uint32_t>(idle_network_timeout.ToSeconds()),
+ static_cast<uint32_t>(idle_network_timeout.ToSeconds()));
}
QuicTime::Delta QuicConfig::IdleNetworkTimeout() const {
@@ -956,8 +950,7 @@
}
void QuicConfig::SetDefaults() {
- idle_network_timeout_seconds_.set(kMaximumIdleTimeoutSecs,
- kDefaultIdleTimeoutSecs);
+ SetIdleNetworkTimeout(QuicTime::Delta::FromSeconds(kMaximumIdleTimeoutSecs));
SetMaxBidirectionalStreamsToSend(kDefaultMaxStreamsPerConnection);
SetMaxUnidirectionalStreamsToSend(kDefaultMaxStreamsPerConnection);
max_time_before_crypto_handshake_ =