Deprecate gfe2_reloadable_flag_quic_fix_http3_goaway_stream_id.

PiperOrigin-RevId: 343882708
Change-Id: Ieebe29a16ff75f774540d0fd82788035a59091e7
diff --git a/quic/core/http/quic_send_control_stream.cc b/quic/core/http/quic_send_control_stream.cc
index 939c327..c03a68a 100644
--- a/quic/core/http/quic_send_control_stream.cc
+++ b/quic/core/http/quic_send_control_stream.cc
@@ -126,12 +126,6 @@
   MaybeSendSettingsFrame();
 
   GoAwayFrame frame;
-  // If the peer has not created any stream yet, use stream ID 0 to indicate no
-  // request is accepted.
-  if (!GetQuicReloadableFlag(quic_fix_http3_goaway_stream_id) &&
-      id == QuicUtils::GetInvalidStreamId(session()->transport_version())) {
-    id = 0;
-  }
   frame.id = id;
   if (spdy_session_->debug_visitor()) {
     spdy_session_->debug_visitor()->OnGoAwayFrameSent(id);
diff --git a/quic/core/http/quic_spdy_session.cc b/quic/core/http/quic_spdy_session.cc
index 581a4fa..ceb030c 100644
--- a/quic/core/http/quic_spdy_session.cc
+++ b/quic/core/http/quic_spdy_session.cc
@@ -740,25 +740,22 @@
   } else {
     stream_id = GetLargestPeerCreatedStreamId(/*unidirectional = */ false);
 
-    if (GetQuicReloadableFlag(quic_fix_http3_goaway_stream_id)) {
-      QUIC_RELOADABLE_FLAG_COUNT(quic_fix_http3_goaway_stream_id);
-      if (stream_id == QuicUtils::GetInvalidStreamId(transport_version())) {
-        // No client-initiated bidirectional streams received yet.
-        // Send 0 to let client know that all requests can be retried.
-        stream_id = 0;
-      } else {
-        // Tell client that streams starting with the next after the largest
-        // received one can be retried.
-        stream_id += QuicUtils::StreamIdDelta(transport_version());
-      }
-      if (last_sent_http3_goaway_id_.has_value() &&
-          last_sent_http3_goaway_id_.value() <= stream_id) {
-        // MUST not send GOAWAY with identifier larger than previously sent.
-        // Do not bother sending one with same identifier as before, since
-        // GOAWAY frames on the control stream are guaranteed to be processed in
-        // order.
-        return;
-      }
+    if (stream_id == QuicUtils::GetInvalidStreamId(transport_version())) {
+      // No client-initiated bidirectional streams received yet.
+      // Send 0 to let client know that all requests can be retried.
+      stream_id = 0;
+    } else {
+      // Tell client that streams starting with the next after the largest
+      // received one can be retried.
+      stream_id += QuicUtils::StreamIdDelta(transport_version());
+    }
+    if (last_sent_http3_goaway_id_.has_value() &&
+        last_sent_http3_goaway_id_.value() <= stream_id) {
+      // MUST not send GOAWAY with identifier larger than previously sent.
+      // Do not bother sending one with same identifier as before, since
+      // GOAWAY frames on the control stream are guaranteed to be processed in
+      // order.
+      return;
     }
   }
 
@@ -1404,31 +1401,28 @@
   QuicStreamId stream_id =
       GetLargestPeerCreatedStreamId(/*unidirectional = */ false);
 
-  if (GetQuicReloadableFlag(quic_fix_http3_goaway_stream_id)) {
-    QUIC_RELOADABLE_FLAG_COUNT(quic_fix_http3_goaway_stream_id);
-    if (stream_id == QuicUtils::GetInvalidStreamId(transport_version())) {
-      // No client-initiated bidirectional streams received yet.
-      // Send 0 to let client know that all requests can be retried.
-      stream_id = 0;
-    } else {
-      // Tell client that streams starting with the next after the largest
-      // received one can be retried.
-      stream_id += QuicUtils::StreamIdDelta(transport_version());
+  if (stream_id == QuicUtils::GetInvalidStreamId(transport_version())) {
+    // No client-initiated bidirectional streams received yet.
+    // Send 0 to let client know that all requests can be retried.
+    stream_id = 0;
+  } else {
+    // Tell client that streams starting with the next after the largest
+    // received one can be retried.
+    stream_id += QuicUtils::StreamIdDelta(transport_version());
+  }
+  if (last_sent_http3_goaway_id_.has_value() &&
+      last_sent_http3_goaway_id_.value() <= stream_id) {
+    if (goaway_with_max_stream_id_) {
+      // A previous GOAWAY frame was sent with smaller stream ID.  This is not
+      // possible, because this is the only method sending a GOAWAY frame with
+      // non-maximal stream ID, and this must only be called once, right
+      // before closing connection.
+      QUIC_BUG << "GOAWAY frame with smaller ID already sent.";
     }
-    if (last_sent_http3_goaway_id_.has_value() &&
-        last_sent_http3_goaway_id_.value() <= stream_id) {
-      if (goaway_with_max_stream_id_) {
-        // A previous GOAWAY frame was sent with smaller stream ID.  This is not
-        // possible, because this is the only method sending a GOAWAY frame with
-        // non-maximal stream ID, and this must only be called once, right
-        // before closing connection.
-        QUIC_BUG << "GOAWAY frame with smaller ID already sent.";
-      }
-      // MUST not send GOAWAY with identifier larger than previously sent.
-      // Do not bother sending one with same identifier as before, since GOAWAY
-      // frames on the control stream are guaranteed to be processed in order.
-      return;
-    }
+    // MUST not send GOAWAY with identifier larger than previously sent.
+    // Do not bother sending one with same identifier as before, since GOAWAY
+    // frames on the control stream are guaranteed to be processed in order.
+    return;
   }
 
   send_control_stream_->SendGoAway(stream_id);
diff --git a/quic/core/http/quic_spdy_session_test.cc b/quic/core/http/quic_spdy_session_test.cc
index 6d93b44..d1e271c 100644
--- a/quic/core/http/quic_spdy_session_test.cc
+++ b/quic/core/http/quic_spdy_session_test.cc
@@ -1130,14 +1130,6 @@
 
   // No more GOAWAY frames are sent because they could not convey new
   // information to the client.
-  if (!GetQuicReloadableFlag(quic_fix_http3_goaway_stream_id) &&
-      !GetQuicReloadableFlag(quic_goaway_with_max_stream_id)) {
-    // Except when both these flags are false, in which case a second GOAWAY
-    // frame is sent.
-    EXPECT_CALL(*writer_, WritePacket(_, _, _, _, _))
-        .WillOnce(Return(WriteResult(WRITE_STATUS_OK, 0)));
-    EXPECT_CALL(debug_visitor, OnGoAwayFrameSent(/* stream_id = */ 0));
-  }
   session_.SendHttp3GoAway();
 }
 
@@ -1146,10 +1138,6 @@
     return;
   }
 
-  if (!GetQuicReloadableFlag(quic_fix_http3_goaway_stream_id)) {
-    return;
-  }
-
   CompleteHandshake();
   StrictMock<MockHttp3DebugVisitor> debug_visitor;
   session_.set_debug_visitor(&debug_visitor);
@@ -3160,16 +3148,11 @@
                            &session_, /*unidirectional = */ false));
 
   if (GetQuicReloadableFlag(quic_send_goaway_with_connection_close)) {
-    if (GetQuicReloadableFlag(quic_fix_http3_goaway_stream_id)) {
-      // Stream with stream_id is already received and potentially processed,
-      // therefore a GOAWAY frame is sent with the next stream ID.
-      EXPECT_CALL(debug_visitor,
-                  OnGoAwayFrameSent(stream_id + QuicUtils::StreamIdDelta(
-                                                    transport_version())));
-    } else {
-      // GOAWAY frame stream id is incorrect, ignore.
-      EXPECT_CALL(debug_visitor, OnGoAwayFrameSent(_));
-    }
+    // Stream with stream_id is already received and potentially processed,
+    // therefore a GOAWAY frame is sent with the next stream ID.
+    EXPECT_CALL(debug_visitor,
+                OnGoAwayFrameSent(
+                    stream_id + QuicUtils::StreamIdDelta(transport_version())));
   }
 
   // Close connection.
diff --git a/quic/core/quic_flags_list.h b/quic/core/quic_flags_list.h
index 7cb12d4..473106f 100644
--- a/quic/core/quic_flags_list.h
+++ b/quic/core/quic_flags_list.h
@@ -47,7 +47,6 @@
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_extract_x509_subject_using_certificate_view, true)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_fix_address_validation, true)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_fix_arm_pto_for_application_data, true)
-QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_fix_http3_goaway_stream_id, true)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_fix_missing_initial_keys2, true)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_fix_out_of_order_sending2, true)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_fix_pto_pending_timer_count, true)