Deprecate --gfe2_restart_flag_quic_allow_control_frames_while_procesing.

PiperOrigin-RevId: 610952734
diff --git a/quiche/quic/core/quic_flags_list.h b/quiche/quic/core/quic_flags_list.h
index e565066..b56587a 100644
--- a/quiche/quic/core/quic_flags_list.h
+++ b/quiche/quic/core/quic_flags_list.h
@@ -53,8 +53,6 @@
 QUIC_FLAG(quic_reloadable_flag_quic_allow_client_enabled_bbr_v2, true)
 // If true, allow quic to use new ALPS codepoint to negotiate during handshake for H3 if client sends new ALPS codepoint.
 QUIC_FLAG(quic_reloadable_flag_quic_gfe_allow_alps_new_codepoint, false)
-// If true, allows QUIC control frames to be written while a packet is being processed.
-QUIC_FLAG(quic_restart_flag_quic_allow_control_frames_while_procesing, true)
 // If true, always bundle qpack decoder data with other frames opportunistically.
 QUIC_FLAG(quic_restart_flag_quic_opport_bundle_qpack_decoder_data3, false)
 // If true, an endpoint does not detect path degrading or blackholing until handshake gets confirmed.
diff --git a/quiche/quic/core/quic_packet_creator.cc b/quiche/quic/core/quic_packet_creator.cc
index 2898348..ee22a63 100644
--- a/quiche/quic/core/quic_packet_creator.cc
+++ b/quiche/quic/core/quic_packet_creator.cc
@@ -156,17 +156,10 @@
 }
 
 void QuicPacketCreator::SetMaxPacketLength(QuicByteCount length) {
-  if (!GetQuicRestartFlag(quic_allow_control_frames_while_procesing)) {
-    QUICHE_DCHECK(CanSetMaxPacketLength()) << ENDPOINT;
-  } else {
-    QUIC_RESTART_FLAG_COUNT_N(quic_allow_control_frames_while_procesing, 2, 3);
-    if (!CanSetMaxPacketLength()) {
-      QUIC_RESTART_FLAG_COUNT_N(quic_allow_control_frames_while_procesing, 3,
-                                3);
-      // The new max packet length will be applied to the next packet.
-      next_max_packet_length_ = length;
-      return;
-    }
+  if (!CanSetMaxPacketLength()) {
+    // The new max packet length will be applied to the next packet.
+    next_max_packet_length_ = length;
+    return;
   }
   // Avoid recomputing |max_plaintext_size_| if the length does not actually
   // change.
diff --git a/quiche/quic/core/quic_packet_creator_test.cc b/quiche/quic/core/quic_packet_creator_test.cc
index 98dbfec..2b67c0b 100644
--- a/quiche/quic/core/quic_packet_creator_test.cc
+++ b/quiche/quic/core/quic_packet_creator_test.cc
@@ -389,12 +389,6 @@
 }
 
 TEST_P(QuicPacketCreatorTest, IncreaseMaxPacketLengthWithFramesPending) {
-  if (!GetQuicRestartFlag(quic_allow_control_frames_while_procesing)) {
-    // When this flag is not set, the call to SetMaxPacketLength()
-    // is an error which triggers a QUICHE_DCHECK.
-    return;
-  }
-
   creator_.set_encryption_level(ENCRYPTION_FORWARD_SECURE);
   const QuicByteCount packet_size = 100 + kDefaultMaxPacketSize;
 
diff --git a/quiche/quic/core/quic_session.cc b/quiche/quic/core/quic_session.cc
index 359841a..ee5c23f 100644
--- a/quiche/quic/core/quic_session.cc
+++ b/quiche/quic/core/quic_session.cc
@@ -922,14 +922,6 @@
     // Suppress the write before encryption gets established.
     return false;
   }
-  if (GetQuicRestartFlag(quic_allow_control_frames_while_procesing)) {
-    QUIC_RESTART_FLAG_COUNT_N(quic_allow_control_frames_while_procesing, 1, 3);
-  } else {
-    if (connection_->framer().is_processing_packet()) {
-      // The frame will be sent when OnCanWrite() is called.
-      return false;
-    }
-  }
   SetTransmissionType(type);
   QuicConnection::ScopedEncryptionLevelContext context(
       connection(), GetEncryptionLevelToSendApplicationData());