gfe-relnote: deprecate gfe2_reloadable_flag_quic_write_with_transmission.

PiperOrigin-RevId: 307464457
Change-Id: I77204cd9e8787280c8576e048af9977001ab0e7f
diff --git a/quic/core/quic_session.cc b/quic/core/quic_session.cc
index e79ec24..9172ed7 100644
--- a/quic/core/quic_session.cc
+++ b/quic/core/quic_session.cc
@@ -45,24 +45,6 @@
   QuicSession* session_;
 };
 
-// TODO(renjietang): remove this function once
-// gfe2_reloadable_flag_quic_write_with_transmission is deprecated.
-void CountTransmissionTypeFlag(TransmissionType type) {
-  switch (type) {
-    case NOT_RETRANSMISSION:
-      QUIC_RELOADABLE_FLAG_COUNT_N(quic_write_with_transmission, 1, 4);
-      break;
-    case HANDSHAKE_RETRANSMISSION:
-      QUIC_RELOADABLE_FLAG_COUNT_N(quic_write_with_transmission, 2, 4);
-      break;
-    case LOSS_RETRANSMISSION:
-      QUIC_RELOADABLE_FLAG_COUNT_N(quic_write_with_transmission, 3, 4);
-      break;
-    default:
-      QUIC_RELOADABLE_FLAG_COUNT_N(quic_write_with_transmission, 4, 4);
-  }
-}
-
 }  // namespace
 
 #define ENDPOINT \
@@ -121,8 +103,6 @@
       num_expected_unidirectional_static_streams_(
           num_expected_unidirectional_static_streams),
       enable_round_robin_scheduling_(false),
-      write_with_transmission_(
-          GetQuicReloadableFlag(quic_write_with_transmission)),
       deprecate_draining_streams_(
           GetQuicReloadableFlag(quic_deprecate_draining_streams)),
       break_close_loop_(
@@ -566,9 +546,6 @@
                      "write blocked.";
     return;
   }
-  if (!write_with_transmission_) {
-    SetTransmissionType(NOT_RETRANSMISSION);
-  }
   // We limit the number of writes to the number of pending streams. If more
   // streams become pending, WillingAndAbleToWrite will be true, which will
   // cause the connection to request resumption before yielding to other
@@ -722,10 +699,7 @@
     return QuicConsumedData(0, false);
   }
 
-  if (write_with_transmission_) {
-    SetTransmissionType(type);
-    CountTransmissionTypeFlag(type);
-  }
+  SetTransmissionType(type);
   const auto current_level = connection()->encryption_level();
   if (level.has_value()) {
     connection()->SetDefaultEncryptionLevel(level.value());
@@ -751,10 +725,7 @@
                                    QuicStreamOffset offset,
                                    TransmissionType type) {
   DCHECK(QuicVersionUsesCryptoFrames(transport_version()));
-  if (write_with_transmission_) {
-    SetTransmissionType(type);
-    CountTransmissionTypeFlag(type);
-  }
+  SetTransmissionType(type);
   const auto current_level = connection()->encryption_level();
   connection_->SetDefaultEncryptionLevel(level);
   const auto bytes_consumed =
@@ -766,10 +737,7 @@
 
 bool QuicSession::WriteControlFrame(const QuicFrame& frame,
                                     TransmissionType type) {
-  if (write_with_transmission_) {
-    SetTransmissionType(type);
-    CountTransmissionTypeFlag(type);
-  }
+  SetTransmissionType(type);
   return connection_->SendControlFrame(frame);
 }
 
@@ -2130,9 +2098,6 @@
 void QuicSession::RetransmitFrames(const QuicFrames& frames,
                                    TransmissionType type) {
   QuicConnection::ScopedPacketFlusher retransmission_flusher(connection_);
-  if (!write_with_transmission_) {
-    SetTransmissionType(type);
-  }
   for (const QuicFrame& frame : frames) {
     if (frame.type == MESSAGE_FRAME) {
       // Do not retransmit MESSAGE frames.
@@ -2226,18 +2191,12 @@
   bool uses_crypto_frames = QuicVersionUsesCryptoFrames(transport_version());
   QuicCryptoStream* crypto_stream = GetMutableCryptoStream();
   if (uses_crypto_frames && crypto_stream->HasPendingCryptoRetransmission()) {
-    if (!write_with_transmission_) {
-      SetTransmissionType(HANDSHAKE_RETRANSMISSION);
-    }
     crypto_stream->WritePendingCryptoRetransmission();
   }
   // Retransmit crypto data in stream 1 frames (version < 47).
   if (!uses_crypto_frames &&
       QuicContainsKey(streams_with_pending_retransmission_,
                       QuicUtils::GetCryptoStreamId(transport_version()))) {
-    if (!write_with_transmission_) {
-      SetTransmissionType(HANDSHAKE_RETRANSMISSION);
-    }
     // Retransmit crypto data first.
     QuicStream* crypto_stream =
         GetStream(QuicUtils::GetCryptoStreamId(transport_version()));
@@ -2252,9 +2211,6 @@
     }
   }
   if (control_frame_manager_.HasPendingRetransmission()) {
-    if (!write_with_transmission_) {
-      SetTransmissionType(LOSS_RETRANSMISSION);
-    }
     control_frame_manager_.OnCanWrite();
     if (control_frame_manager_.HasPendingRetransmission()) {
       return false;
@@ -2268,9 +2224,6 @@
     const QuicStreamId id = streams_with_pending_retransmission_.begin()->first;
     QuicStream* stream = GetStream(id);
     if (stream != nullptr) {
-      if (!write_with_transmission_) {
-        SetTransmissionType(LOSS_RETRANSMISSION);
-      }
       stream->OnCanWrite();
       DCHECK(CheckStreamWriteBlocked(stream));
       if (stream->HasPendingRetransmission()) {