Deprecate gfe2_reloadable_flag_quic_bw_sampler_app_limited_starting_value

PiperOrigin-RevId: 316589085
Change-Id: I0b6bf4cccacbc93a9b3b03b7a9294d20299785ce
diff --git a/quic/core/congestion_control/bandwidth_sampler.cc b/quic/core/congestion_control/bandwidth_sampler.cc
index f885c94..6eacef3 100644
--- a/quic/core/congestion_control/bandwidth_sampler.cc
+++ b/quic/core/congestion_control/bandwidth_sampler.cc
@@ -87,7 +87,7 @@
       total_bytes_sent_at_last_acked_packet_(0),
       last_acked_packet_sent_time_(QuicTime::Zero()),
       last_acked_packet_ack_time_(QuicTime::Zero()),
-      is_app_limited_(started_as_app_limited_),
+      is_app_limited_(true),
       connection_state_map_(),
       max_tracked_packets_(GetQuicFlag(FLAGS_quic_max_tracked_packet_count)),
       unacked_packet_map_(unacked_packet_map),
@@ -105,7 +105,6 @@
       last_acked_packet_sent_time_(other.last_acked_packet_sent_time_),
       last_acked_packet_ack_time_(other.last_acked_packet_ack_time_),
       last_sent_packet_(other.last_sent_packet_),
-      started_as_app_limited_(other.started_as_app_limited_),
       is_app_limited_(other.is_app_limited_),
       end_of_app_limited_phase_(other.end_of_app_limited_phase_),
       connection_state_map_(other.connection_state_map_),
@@ -321,23 +320,13 @@
     recent_ack_points_.Update(ack_time, total_bytes_acked_);
   }
 
-  if (started_as_app_limited_) {
-    if (is_app_limited_) {
-      // Exit app-limited phase in two cases:
-      // (1) end_of_app_limited_phase_ is not initialized, i.e., so far all
-      // packets are sent while there are buffered packets or pending data.
-      // (2) The current acked packet is after the sent packet marked as the end
-      // of the app limit phase.
-      if (!end_of_app_limited_phase_.IsInitialized() ||
-          packet_number > end_of_app_limited_phase_) {
-        QUIC_RELOADABLE_FLAG_COUNT(quic_bw_sampler_app_limited_starting_value);
-        is_app_limited_ = false;
-      }
-    }
-  } else {
-    // Exit app-limited phase once a packet that was sent while the connection
-    // is not app-limited is acknowledged.
-    if (is_app_limited_ && end_of_app_limited_phase_.IsInitialized() &&
+  if (is_app_limited_) {
+    // Exit app-limited phase in two cases:
+    // (1) end_of_app_limited_phase_ is not initialized, i.e., so far all
+    // packets are sent while there are buffered packets or pending data.
+    // (2) The current acked packet is after the sent packet marked as the end
+    // of the app limit phase.
+    if (!end_of_app_limited_phase_.IsInitialized() ||
         packet_number > end_of_app_limited_phase_) {
       is_app_limited_ = false;
     }
diff --git a/quic/core/congestion_control/bandwidth_sampler.h b/quic/core/congestion_control/bandwidth_sampler.h
index 32b86af..f32eabf 100644
--- a/quic/core/congestion_control/bandwidth_sampler.h
+++ b/quic/core/congestion_control/bandwidth_sampler.h
@@ -528,10 +528,6 @@
   // The most recently sent packet.
   QuicPacketNumber last_sent_packet_;
 
-  // Indicates whether the bandwidth sampler is started in app-limited phase.
-  const bool started_as_app_limited_ =
-      GetQuicReloadableFlag(quic_bw_sampler_app_limited_starting_value);
-
   // Indicates whether the bandwidth sampler is currently in an app-limited
   // phase.
   bool is_app_limited_;
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc
index 37edc16..8e85af9 100644
--- a/quic/core/quic_connection.cc
+++ b/quic/core/quic_connection.cc
@@ -1950,10 +1950,6 @@
   return stats_;
 }
 
-void QuicConnection::ResetHasNonAppLimitedSampleAfterHandshakeCompletion() {
-  stats_.has_non_app_limited_sample = false;
-}
-
 void QuicConnection::OnCoalescedPacket(const QuicEncryptedPacket& packet) {
   QueueCoalescedPacket(packet);
 }
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h
index 0cb74f7..8e3608b 100644
--- a/quic/core/quic_connection.h
+++ b/quic/core/quic_connection.h
@@ -469,11 +469,6 @@
   // Returns statistics tracked for this connection.
   const QuicConnectionStats& GetStats();
 
-  // Mark stats_.has_non_app_limited_sample as false.
-  // TODO(b/151166631) Remove this once the proper fix in b/151166631 is rolled
-  // out.
-  void ResetHasNonAppLimitedSampleAfterHandshakeCompletion();
-
   // Processes an incoming UDP packet (consisting of a QuicEncryptedPacket) from
   // the peer.
   // In a client, the packet may be "stray" and have a different connection ID
diff --git a/quic/core/quic_session.cc b/quic/core/quic_session.cc
index b697457..763b291 100644
--- a/quic/core/quic_session.cc
+++ b/quic/core/quic_session.cc
@@ -1533,9 +1533,6 @@
     case ENCRYPTION_FORWARD_SECURE:
       QUIC_BUG_IF(!config_.negotiated())
           << ENDPOINT << "Handshake confirmed without parameter negotiation.";
-      if (!GetQuicReloadableFlag(quic_bw_sampler_app_limited_starting_value)) {
-        connection_->ResetHasNonAppLimitedSampleAfterHandshakeCompletion();
-      }
       break;
     default:
       QUIC_BUG << "Unknown encryption level: " << level;
@@ -1554,9 +1551,6 @@
     // to the client.
     control_frame_manager_.WriteOrBufferHandshakeDone();
   }
-  if (!GetQuicReloadableFlag(quic_bw_sampler_app_limited_starting_value)) {
-    connection_->ResetHasNonAppLimitedSampleAfterHandshakeCompletion();
-  }
 }
 
 void QuicSession::DiscardOldDecryptionKey(EncryptionLevel level) {