gfe-relnote: (n/a) Deprecate --gfe2_reloadable_flag_quic_check_handshake_timeout_before_idle_timeout.

PiperOrigin-RevId: 301176156
Change-Id: I3b9345096ce795805b4f4656a18c44ef114c213a
diff --git a/quic/core/http/end_to_end_test.cc b/quic/core/http/end_to_end_test.cc
index ead192c..c9b8f51 100644
--- a/quic/core/http/end_to_end_test.cc
+++ b/quic/core/http/end_to_end_test.cc
@@ -3689,7 +3689,6 @@
 }
 
 TEST_P(EndToEndTest, PreSharedKey) {
-  SetQuicReloadableFlag(quic_check_handshake_timeout_before_idle_timeout, true);
   client_config_.set_max_time_before_crypto_handshake(
       QuicTime::Delta::FromSeconds(5));
   client_config_.set_max_idle_time_before_crypto_handshake(
@@ -3704,7 +3703,6 @@
 
 // TODO: reenable once we have a way to make this run faster.
 TEST_P(EndToEndTest, QUIC_TEST_DISABLED_IN_CHROME(PreSharedKeyMismatch)) {
-  SetQuicReloadableFlag(quic_check_handshake_timeout_before_idle_timeout, true);
   client_config_.set_max_time_before_crypto_handshake(
       QuicTime::Delta::FromSeconds(1));
   client_config_.set_max_idle_time_before_crypto_handshake(
@@ -3724,7 +3722,6 @@
 
 // TODO: reenable once we have a way to make this run faster.
 TEST_P(EndToEndTest, QUIC_TEST_DISABLED_IN_CHROME(PreSharedKeyNoClient)) {
-  SetQuicReloadableFlag(quic_check_handshake_timeout_before_idle_timeout, true);
   client_config_.set_max_time_before_crypto_handshake(
       QuicTime::Delta::FromSeconds(1));
   client_config_.set_max_idle_time_before_crypto_handshake(
@@ -3737,7 +3734,6 @@
 
 // TODO: reenable once we have a way to make this run faster.
 TEST_P(EndToEndTest, QUIC_TEST_DISABLED_IN_CHROME(PreSharedKeyNoServer)) {
-  SetQuicReloadableFlag(quic_check_handshake_timeout_before_idle_timeout, true);
   client_config_.set_max_time_before_crypto_handshake(
       QuicTime::Delta::FromSeconds(1));
   client_config_.set_max_idle_time_before_crypto_handshake(
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc
index 0abc88e..566d477 100644
--- a/quic/core/quic_connection.cc
+++ b/quic/core/quic_connection.cc
@@ -332,8 +332,6 @@
       bytes_received_before_address_validation_(0),
       bytes_sent_before_address_validation_(0),
       address_validated_(false),
-      check_handshake_timeout_before_idle_timeout_(GetQuicReloadableFlag(
-          quic_check_handshake_timeout_before_idle_timeout)),
       batch_writer_flush_after_mtu_probe_(
           GetQuicReloadableFlag(quic_batch_writer_flush_after_mtu_probe)) {
   QUIC_DLOG(INFO) << ENDPOINT << "Created connection with server connection ID "
@@ -345,10 +343,6 @@
       << "QuicConnection: attempted to use server connection ID "
       << server_connection_id << " which is invalid with version "
       << QuicVersionToString(transport_version());
-  if (check_handshake_timeout_before_idle_timeout_) {
-    QUIC_RELOADABLE_FLAG_COUNT(
-        quic_check_handshake_timeout_before_idle_timeout);
-  }
 
   framer_.set_visitor(this);
   stats_.connection_creation_time = clock_->ApproximateNow();
@@ -3069,8 +3063,7 @@
 
 void QuicConnection::CheckForTimeout() {
   QuicTime now = clock_->ApproximateNow();
-  if (check_handshake_timeout_before_idle_timeout_ &&
-      !handshake_timeout_.IsInfinite()) {
+  if (!handshake_timeout_.IsInfinite()) {
     QuicTime::Delta connected_duration = now - stats_.connection_creation_time;
     QUIC_DVLOG(1) << ENDPOINT
                   << "connection time: " << connected_duration.ToMicroseconds()
@@ -3119,25 +3112,6 @@
     return;
   }
 
-  if (!check_handshake_timeout_before_idle_timeout_ &&
-      !handshake_timeout_.IsInfinite()) {
-    QuicTime::Delta connected_duration = now - stats_.connection_creation_time;
-    QUIC_DVLOG(1) << ENDPOINT
-                  << "connection time: " << connected_duration.ToMicroseconds()
-                  << " handshake timeout: "
-                  << handshake_timeout_.ToMicroseconds();
-    if (connected_duration >= handshake_timeout_) {
-      const std::string error_details = quiche::QuicheStrCat(
-          "Handshake timeout expired after ",
-          connected_duration.ToDebuggingValue(),
-          ". Timeout:", handshake_timeout_.ToDebuggingValue());
-      QUIC_DVLOG(1) << ENDPOINT << error_details;
-      CloseConnection(QUIC_HANDSHAKE_TIMEOUT, error_details,
-                      ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
-      return;
-    }
-  }
-
   SetTimeoutAlarm();
 }
 
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h
index c4078c2..e0870d4 100644
--- a/quic/core/quic_connection.h
+++ b/quic/core/quic_connection.h
@@ -1541,9 +1541,6 @@
 
   QuicConnectionMtuDiscoverer mtu_discoverer_;
 
-  // Latched value of quic_check_handshake_timeout_before_idle_timeout.
-  const bool check_handshake_timeout_before_idle_timeout_;
-
   // Latched value of quic_batch_writer_flush_after_mtu_probe.
   const bool batch_writer_flush_after_mtu_probe_;
 };