Deprecate gfe2_reloadable_flag_quic_one_write_for_headers.

PiperOrigin-RevId: 499881049
diff --git a/quiche/quic/core/http/quic_spdy_stream.cc b/quiche/quic/core/http/quic_spdy_stream.cc
index aded5c8..839e330 100644
--- a/quiche/quic/core/http/quic_spdy_stream.cc
+++ b/quiche/quic/core/http/quic_spdy_stream.cc
@@ -1170,28 +1170,12 @@
       send_buffer().stream_offset(),
       send_buffer().stream_offset() + headers_frame_header.length());
 
-  if (GetQuicReloadableFlag(quic_one_write_for_headers)) {
-    QUIC_RELOADABLE_FLAG_COUNT(quic_one_write_for_headers);
-
-    QUIC_DLOG(INFO) << ENDPOINT << "Stream " << id()
-                    << " is writing HEADERS frame header of length "
-                    << headers_frame_header.length()
-                    << ", and payload of length " << encoded_headers.length()
-                    << " with fin " << fin;
-    WriteOrBufferData(absl::StrCat(headers_frame_header, encoded_headers), fin,
-                      /*ack_listener=*/nullptr);
-  } else {
-    QUIC_DLOG(INFO) << ENDPOINT << "Stream " << id()
-                    << " is writing HEADERS frame header of length "
-                    << headers_frame_header.length();
-    WriteOrBufferData(headers_frame_header, /* fin = */ false,
-                      /* ack_listener = */ nullptr);
-
-    QUIC_DLOG(INFO) << ENDPOINT << "Stream " << id()
-                    << " is writing HEADERS frame payload of length "
-                    << encoded_headers.length() << " with fin " << fin;
-    WriteOrBufferData(encoded_headers, fin, nullptr);
-  }
+  QUIC_DLOG(INFO) << ENDPOINT << "Stream " << id()
+                  << " is writing HEADERS frame header of length "
+                  << headers_frame_header.length() << ", and payload of length "
+                  << encoded_headers.length() << " with fin " << fin;
+  WriteOrBufferData(absl::StrCat(headers_frame_header, encoded_headers), fin,
+                    /*ack_listener=*/nullptr);
 
   QuicSpdySession::LogHeaderCompressionRatioHistogram(
       /* using_qpack = */ true,
diff --git a/quiche/quic/core/http/quic_spdy_stream_test.cc b/quiche/quic/core/http/quic_spdy_stream_test.cc
index dbc033e..1ab50a0 100644
--- a/quiche/quic/core/http/quic_spdy_stream_test.cc
+++ b/quiche/quic/core/http/quic_spdy_stream_test.cc
@@ -1491,11 +1491,7 @@
     // In this case, TestStream::WriteHeadersImpl() does not prevent writes.
     // Four writes on the request stream: HEADERS frame header and payload both
     // for headers and trailers.
-    if (GetQuicReloadableFlag(quic_one_write_for_headers)) {
-      EXPECT_CALL(*session_, WritevData(stream_->id(), _, _, _, _, _)).Times(2);
-    } else {
-      EXPECT_CALL(*session_, WritevData(stream_->id(), _, _, _, _, _)).Times(4);
-    }
+    EXPECT_CALL(*session_, WritevData(stream_->id(), _, _, _, _, _)).Times(2);
   }
 
   // Write the initial headers, without a FIN.
@@ -1521,11 +1517,7 @@
 
   // Four writes on the request stream: HEADERS frame header and payload both
   // for headers and trailers.
-  if (GetQuicReloadableFlag(quic_one_write_for_headers)) {
-    EXPECT_CALL(*session_, WritevData(stream_->id(), _, _, _, _, _)).Times(2);
-  } else {
-    EXPECT_CALL(*session_, WritevData(stream_->id(), _, _, _, _, _)).Times(4);
-  }
+  EXPECT_CALL(*session_, WritevData(stream_->id(), _, _, _, _, _)).Times(2);
 
   // No PRIORITY_UPDATE frames on the control stream,
   // because the stream has default priority.
@@ -1557,12 +1549,7 @@
   StrictMock<MockHttp3DebugVisitor> debug_visitor;
   session_->set_debug_visitor(&debug_visitor);
 
-  if (GetQuicReloadableFlag(quic_one_write_for_headers)) {
-    EXPECT_CALL(*session_, WritevData(stream_->id(), _, _, _, _, _)).Times(1);
-  } else {
-    // Two writes on the request stream: HEADERS frame header and payload.
-    EXPECT_CALL(*session_, WritevData(stream_->id(), _, _, _, _, _)).Times(2);
-  }
+  EXPECT_CALL(*session_, WritevData(stream_->id(), _, _, _, _, _)).Times(1);
   EXPECT_CALL(*stream_, WriteHeadersMock(false));
   EXPECT_CALL(debug_visitor, OnHeadersFrameSent(stream_->id(), _));
   stream_->WriteHeaders(Http2HeaderBlock(), /*fin=*/false, nullptr);
@@ -1611,11 +1598,7 @@
 
   // Two writes on the request stream: HEADERS frame header and payload.
   // PRIORITY_UPDATE frame is not sent this time, because one is already sent.
-  if (GetQuicReloadableFlag(quic_one_write_for_headers)) {
-    EXPECT_CALL(*session_, WritevData(stream_->id(), _, _, _, _, _)).Times(1);
-  } else {
-    EXPECT_CALL(*session_, WritevData(stream_->id(), _, _, _, _, _)).Times(2);
-  }
+  EXPECT_CALL(*session_, WritevData(stream_->id(), _, _, _, _, _)).Times(1);
   EXPECT_CALL(*stream_, WriteHeadersMock(true));
   stream_->WriteHeaders(Http2HeaderBlock(), /*fin=*/true, nullptr);
 }
@@ -1628,11 +1611,7 @@
   if (UsesHttp3()) {
     // In this case, TestStream::WriteHeadersImpl() does not prevent writes.
     // HEADERS frame header and payload on the request stream.
-    if (GetQuicReloadableFlag(quic_one_write_for_headers)) {
-      EXPECT_CALL(*session_, WritevData(stream_->id(), _, _, _, _, _)).Times(1);
-    } else {
-      EXPECT_CALL(*session_, WritevData(stream_->id(), _, _, _, _, _)).Times(2);
-    }
+    EXPECT_CALL(*session_, WritevData(stream_->id(), _, _, _, _, _)).Times(1);
   }
 
   // Write the initial headers.
@@ -3037,34 +3016,19 @@
       .Times(AnyNumber());
 
   size_t bytes_written = 0;
-  if (GetQuicReloadableFlag(quic_one_write_for_headers)) {
-    EXPECT_CALL(*session_,
-                WritevData(stream_->id(), _, /* offset = */ 0, _, _, _))
-        .WillOnce(
-            DoAll(SaveArg<1>(&bytes_written),
-                  Invoke(session_.get(), &MockQuicSpdySession::ConsumeData)));
-  } else {
-    // HEADERS frame header.
-    EXPECT_CALL(*session_,
-                WritevData(stream_->id(), _, /* offset = */ 0, _, _, _));
-    // HEADERS frame payload.
-    EXPECT_CALL(*session_, WritevData(stream_->id(), _, _, _, _, _))
-        .WillOnce(
-            DoAll(SaveArg<1>(&bytes_written),
-                  Invoke(session_.get(), &MockQuicSpdySession::ConsumeData)));
-  }
+  EXPECT_CALL(*session_,
+              WritevData(stream_->id(), _, /* offset = */ 0, _, _, _))
+      .WillOnce(
+          DoAll(SaveArg<1>(&bytes_written),
+                Invoke(session_.get(), &MockQuicSpdySession::ConsumeData)));
 
   Http2HeaderBlock request_headers;
   request_headers["foo"] = "bar";
   size_t write_headers_return_value =
       stream_->WriteHeaders(std::move(request_headers), /*fin=*/true, nullptr);
   EXPECT_TRUE(stream_->fin_sent());
-  if (GetQuicReloadableFlag(quic_one_write_for_headers)) {
-    // bytes_written includes HEADERS frame header.
-    EXPECT_GT(bytes_written, write_headers_return_value);
-  } else {
-    EXPECT_EQ(bytes_written, write_headers_return_value);
-  }
+  // bytes_written includes HEADERS frame header.
+  EXPECT_GT(bytes_written, write_headers_return_value);
 }
 
 // Regression test for https://crbug.com/1177662.
diff --git a/quiche/quic/core/quic_flags_list.h b/quiche/quic/core/quic_flags_list.h
index 0730c8d..3287bae 100644
--- a/quiche/quic/core/quic_flags_list.h
+++ b/quiche/quic/core/quic_flags_list.h
@@ -27,8 +27,6 @@
 QUIC_FLAG(quic_reloadable_flag_quic_allow_client_enabled_bbr_v2, true)
 // If true, an endpoint does not detect path degrading or blackholing until handshake gets confirmed.
 QUIC_FLAG(quic_reloadable_flag_quic_no_path_degrading_before_handshake_confirmed, true)
-// If true, combine two WriteOrBufferData to one while writing headers.
-QUIC_FLAG(quic_reloadable_flag_quic_one_write_for_headers, true)
 // If true, default-enable 5RTO blachole detection.
 QUIC_FLAG(quic_reloadable_flag_quic_default_enable_5rto_blackhole_detection2, true)
 // If true, delay setting of stateless reset token until session initialization.