gfe-relnote: deprecate gfe2_reloadable_flag_quic_close_connection_and_discard_data_on_wrong_offset

PiperOrigin-RevId: 288330466
Change-Id: I6ad17ca9127e9e2da2c925d128db719dce11fc53
diff --git a/quic/core/quic_stream_sequencer.cc b/quic/core/quic_stream_sequencer.cc
index 845803d..f5849f6 100644
--- a/quic/core/quic_stream_sequencer.cc
+++ b/quic/core/quic_stream_sequencer.cc
@@ -33,9 +33,7 @@
       num_frames_received_(0),
       num_duplicate_frames_received_(0),
       ignore_read_data_(false),
-      level_triggered_(false),
-      close_connection_and_discard_data_on_wrong_offset_(GetQuicReloadableFlag(
-          quic_close_connection_and_discard_data_on_wrong_offset)) {}
+      level_triggered_(false) {}
 
 QuicStreamSequencer::~QuicStreamSequencer() {}
 
@@ -50,12 +48,8 @@
     if (data_len == 0) {
       return;
     }
-    if (close_connection_and_discard_data_on_wrong_offset_) {
-      QUIC_RELOADABLE_FLAG_COUNT_N(
-          quic_close_connection_and_discard_data_on_wrong_offset, 1, 3);
-      if (!should_process_data) {
-        return;
-      }
+    if (!should_process_data) {
+      return;
     }
   }
   OnFrameData(byte_offset, data_len, frame.data_buffer);
@@ -126,12 +120,6 @@
 
   // If there is a scheduled close, the new offset should match it.
   if (close_offset_ != kMaxOffset && offset != close_offset_) {
-    if (!close_connection_and_discard_data_on_wrong_offset_) {
-      stream_->Reset(QUIC_MULTIPLE_TERMINATION_OFFSETS);
-      return false;
-    }
-    QUIC_RELOADABLE_FLAG_COUNT_N(
-        quic_close_connection_and_discard_data_on_wrong_offset, 2, 3);
     stream_->CloseConnectionWithDetails(
         QUIC_STREAM_SEQUENCER_INVALID_STATE,
         quiche::QuicheStrCat(
@@ -142,10 +130,7 @@
 
   // The final offset should be no less than the highest offset that is
   // received.
-  if (close_connection_and_discard_data_on_wrong_offset_ &&
-      offset < highest_offset_) {
-    QUIC_RELOADABLE_FLAG_COUNT_N(
-        quic_close_connection_and_discard_data_on_wrong_offset, 3, 3);
+  if (offset < highest_offset_) {
     stream_->CloseConnectionWithDetails(
         QUIC_STREAM_SEQUENCER_INVALID_STATE,
         quiche::QuicheStrCat(
diff --git a/quic/core/quic_stream_sequencer.h b/quic/core/quic_stream_sequencer.h
index b8808a8..c3d34c0 100644
--- a/quic/core/quic_stream_sequencer.h
+++ b/quic/core/quic_stream_sequencer.h
@@ -206,11 +206,6 @@
   // If false, only call OnDataAvailable() when it becomes newly unblocked.
   // Otherwise, call OnDataAvailable() when number of readable bytes changes.
   bool level_triggered_;
-
-  // Latched value of quic_close_connection_and_discard_data_on_wrong_offset.
-  // When true, the sequencer will inform the stream to close connection when
-  // wrong offset is received. And the stream frame's data will be discarded.
-  const bool close_connection_and_discard_data_on_wrong_offset_;
 };
 
 }  // namespace quic
diff --git a/quic/core/quic_stream_sequencer_test.cc b/quic/core/quic_stream_sequencer_test.cc
index b841327..67051c2 100644
--- a/quic/core/quic_stream_sequencer_test.cc
+++ b/quic/core/quic_stream_sequencer_test.cc
@@ -375,15 +375,10 @@
   OnFinFrame(3, "");
   EXPECT_EQ(3u, QuicStreamSequencerPeer::GetCloseOffset(sequencer_.get()));
 
-  if (!GetQuicReloadableFlag(
-          quic_close_connection_and_discard_data_on_wrong_offset)) {
-    EXPECT_CALL(stream_, Reset(QUIC_MULTIPLE_TERMINATION_OFFSETS));
-  } else {
-    EXPECT_CALL(stream_, CloseConnectionWithDetails(
-                             QUIC_STREAM_SEQUENCER_INVALID_STATE,
-                             "Stream 1 received new final offset: 1, which is "
-                             "different from close offset: 3"));
-  }
+  EXPECT_CALL(stream_, CloseConnectionWithDetails(
+                           QUIC_STREAM_SEQUENCER_INVALID_STATE,
+                           "Stream 1 received new final offset: 1, which is "
+                           "different from close offset: 3"));
   OnFinFrame(1, "");
 }
 
@@ -756,10 +751,6 @@
 
 // Regression test for https://crbug.com/992486.
 TEST_F(QuicStreamSequencerTest, CorruptFinFrames) {
-  if (!GetQuicReloadableFlag(
-          quic_close_connection_and_discard_data_on_wrong_offset)) {
-    return;
-  }
   EXPECT_CALL(stream_, CloseConnectionWithDetails(
                            QUIC_STREAM_SEQUENCER_INVALID_STATE,
                            "Stream 1 received new final offset: 1, which is "
@@ -772,10 +763,6 @@
 
 // Regression test for crbug.com/1015693
 TEST_F(QuicStreamSequencerTest, ReceiveFinLessThanHighestOffset) {
-  if (!GetQuicReloadableFlag(
-          quic_close_connection_and_discard_data_on_wrong_offset)) {
-    return;
-  }
   EXPECT_CALL(stream_, OnDataAvailable()).Times(1);
   EXPECT_CALL(stream_, CloseConnectionWithDetails(
                            QUIC_STREAM_SEQUENCER_INVALID_STATE,