gfe-relnote: (n/a) Deprecate --gfe2_reloadable_flag_quic_set_transmission_type_for_next_frame.

PiperOrigin-RevId: 244216881
Change-Id: Ie570b14c4d019acb3df7e000eb1209e2d32dddb6
diff --git a/quic/core/quic_packet_creator.cc b/quic/core/quic_packet_creator.cc
index 96b5bc6..548b504 100644
--- a/quic/core/quic_packet_creator.cc
+++ b/quic/core/quic_packet_creator.cc
@@ -82,9 +82,7 @@
               false),
       pending_padding_bytes_(0),
       needs_full_padding_(false),
-      can_set_transmission_type_(false),
-      set_transmission_type_for_next_frame_(
-          GetQuicReloadableFlag(quic_set_transmission_type_for_next_frame)) {
+      can_set_transmission_type_(false) {
   SetMaxPacketLength(kDefaultMaxPacketSize);
 }
 
@@ -395,9 +393,7 @@
   packet_.has_crypto_handshake = NOT_HANDSHAKE;
   packet_.num_padding_bytes = 0;
   packet_.original_packet_number.Clear();
-  if (!can_set_transmission_type_ || ShouldSetTransmissionTypeForNextFrame()) {
-    packet_.transmission_type = NOT_RETRANSMISSION;
-  }
+  packet_.transmission_type = NOT_RETRANSMISSION;
   packet_.encrypted_buffer = nullptr;
   packet_.encrypted_length = 0;
   DCHECK(packet_.retransmittable_frames.empty());
@@ -468,9 +464,7 @@
     return;
   }
 
-  if (ShouldSetTransmissionTypeForNextFrame()) {
-    QUIC_RELOADABLE_FLAG_COUNT_N(quic_set_transmission_type_for_next_frame, 1,
-                                 2);
+  if (can_set_transmission_type()) {
     packet_.transmission_type = transmission_type;
   }
 
@@ -892,10 +886,8 @@
 
   // Packet transmission type is determined by the last added retransmittable
   // frame.
-  if (ShouldSetTransmissionTypeForNextFrame() &&
+  if (can_set_transmission_type() &&
       QuicUtils::IsRetransmittableFrame(frame.type)) {
-    QUIC_RELOADABLE_FLAG_COUNT_N(quic_set_transmission_type_for_next_frame, 2,
-                                 2);
     packet_.transmission_type = transmission_type;
   }
   return true;
@@ -977,7 +969,7 @@
 void QuicPacketCreator::SetTransmissionType(TransmissionType type) {
   DCHECK(can_set_transmission_type_);
 
-  if (!ShouldSetTransmissionTypeForNextFrame()) {
+  if (!can_set_transmission_type()) {
     QUIC_DVLOG_IF(1, type != packet_.transmission_type)
         << ENDPOINT << "Setting Transmission type to "
         << QuicUtils::TransmissionTypeToString(type);
diff --git a/quic/core/quic_packet_creator.h b/quic/core/quic_packet_creator.h
index 85e0091..f420d9e 100644
--- a/quic/core/quic_packet_creator.h
+++ b/quic/core/quic_packet_creator.h
@@ -270,9 +270,7 @@
     can_set_transmission_type_ = can_set_transmission_type;
   }
 
-  bool ShouldSetTransmissionTypeForNextFrame() const {
-    return can_set_transmission_type_ && set_transmission_type_for_next_frame_;
-  }
+  bool can_set_transmission_type() const { return can_set_transmission_type_; }
 
   QuicByteCount pending_padding_bytes() const { return pending_padding_bytes_; }
 
@@ -410,10 +408,6 @@
   // If true, packet_'s transmission type is only set by
   // SetPacketTransmissionType and does not get cleared in ClearPacket.
   bool can_set_transmission_type_;
-
-  // Latched value of --quic_set_transmission_type_for_next_frame. Don't use
-  // this variable directly, use ShouldSetTransmissionTypeForNextFrame instead.
-  bool set_transmission_type_for_next_frame_;
 };
 
 }  // namespace quic
diff --git a/quic/core/quic_packet_creator_test.cc b/quic/core/quic_packet_creator_test.cc
index 2b71b06..6b489ba 100644
--- a/quic/core/quic_packet_creator_test.cc
+++ b/quic/core/quic_packet_creator_test.cc
@@ -1738,7 +1738,7 @@
   creator_.Flush();
   ASSERT_TRUE(serialized_packet_.encrypted_buffer);
 
-  if (creator_.ShouldSetTransmissionTypeForNextFrame()) {
+  if (creator_.can_set_transmission_type()) {
     // The last retransmittable frame on packet is a stream frame, the packet's
     // transmission type should be the same as the stream frame's.
     EXPECT_EQ(serialized_packet_.transmission_type, RTO_RETRANSMISSION);
diff --git a/quic/core/quic_packet_generator.cc b/quic/core/quic_packet_generator.cc
index 6efadcf..d3d950c 100644
--- a/quic/core/quic_packet_generator.cc
+++ b/quic/core/quic_packet_generator.cc
@@ -454,7 +454,7 @@
 
 void QuicPacketGenerator::SetTransmissionType(TransmissionType type) {
   packet_creator_.SetTransmissionType(type);
-  if (packet_creator_.ShouldSetTransmissionTypeForNextFrame()) {
+  if (packet_creator_.can_set_transmission_type()) {
     next_transmission_type_ = type;
   }
 }
diff --git a/quic/core/quic_packet_generator_test.cc b/quic/core/quic_packet_generator_test.cc
index 1e12424..bd867b8 100644
--- a/quic/core/quic_packet_generator_test.cc
+++ b/quic/core/quic_packet_generator_test.cc
@@ -1017,13 +1017,10 @@
   ASSERT_EQ(1u, packets_[0].retransmittable_frames.size());
   EXPECT_EQ(stream1_id,
             packets_[0].retransmittable_frames[0].stream_frame.stream_id);
-  if (GetQuicReloadableFlag(quic_set_transmission_type_for_next_frame)) {
-    // Since the second frame was not added, the packet's transmission type
-    // should be the first frame's type.
-    EXPECT_EQ(packets_[0].transmission_type, LOSS_RETRANSMISSION);
-  } else {
-    EXPECT_EQ(packets_[0].transmission_type, NOT_RETRANSMISSION);
-  }
+
+  // Since the second frame was not added, the packet's transmission type
+  // should be the first frame's type.
+  EXPECT_EQ(packets_[0].transmission_type, LOSS_RETRANSMISSION);
 }
 
 TEST_F(QuicPacketGeneratorTest, TestConnectionIdLength) {