Cleanup flag WebRTC-RTP-Lifetime, experiment launched successfully.

This feature has been Stable for 2 weeks meaning we did not have to kill
switch it. Delete the flag such that the only valid code path is that
this feature is enabled.

Bug: chromium:440975167
Change-Id: I8f83ee3962dc5dc8fae565c20cce92be7bb3266e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/416540
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45933}
diff --git a/experiments/field_trials.py b/experiments/field_trials.py
index 68ea0fc..6ebd297 100755
--- a/experiments/field_trials.py
+++ b/experiments/field_trials.py
@@ -182,9 +182,6 @@
     FieldTrial('WebRTC-RFC8888CongestionControlFeedback',
                42225697,
                date(2025, 1, 30)),
-    FieldTrial('WebRTC-RTP-Lifetime',
-               440975167,
-               date(2026, 1, 1)),
     FieldTrial('WebRTC-ReceiveBufferSize',
                42225927,
                date(2024, 4, 1)),
diff --git a/pc/rtc_stats_collector.cc b/pc/rtc_stats_collector.cc
index 881638f..032f779 100644
--- a/pc/rtc_stats_collector.cc
+++ b/pc/rtc_stats_collector.cc
@@ -1717,13 +1717,11 @@
   RTC_DCHECK_RUN_ON(network_thread_);
   Thread::ScopedDisallowBlockingCalls no_blocking_calls;
 
-  bool spec_lifetime = is_unified_plan_ &&
-                       !env_.field_trials().IsDisabled("WebRTC-RTP-Lifetime");
   for (const RtpTransceiverStatsInfo& stats : transceiver_stats_infos) {
     if (stats.media_type == MediaType::AUDIO) {
-      ProduceAudioRTPStreamStats_n(timestamp, stats, spec_lifetime, report);
+      ProduceAudioRTPStreamStats_n(timestamp, stats, report);
     } else if (stats.media_type == MediaType::VIDEO) {
-      ProduceVideoRTPStreamStats_n(timestamp, stats, spec_lifetime, report);
+      ProduceVideoRTPStreamStats_n(timestamp, stats, report);
     } else {
       RTC_DCHECK_NOTREACHED();
     }
@@ -1733,7 +1731,6 @@
 void RTCStatsCollector::ProduceAudioRTPStreamStats_n(
     Timestamp timestamp,
     const RtpTransceiverStatsInfo& stats,
-    bool spec_lifetime,
     RTCStatsReport* report) const {
   RTC_DCHECK_RUN_ON(network_thread_);
   Thread::ScopedDisallowBlockingCalls no_blocking_calls;
@@ -1755,7 +1752,7 @@
     }
     // Check both packets received and samples received to handle the Insertable
     // Streams use case of receiving media without receiving packets.
-    if (spec_lifetime && voice_receiver_info.packets_received == 0 &&
+    if (is_unified_plan_ && voice_receiver_info.packets_received == 0 &&
         voice_receiver_info.total_samples_received == 0) {
       // The SSRC is known despite not receiving any packets. This happens if
       // SSRC is signalled in the SDP which we should not rely on for getStats.
@@ -1808,7 +1805,7 @@
     if (!voice_sender_info.connected()) {
       continue;  // The SSRC is not known yet.
     }
-    if (spec_lifetime && !stats.current_direction.has_value()) {
+    if (is_unified_plan_ && !stats.current_direction.has_value()) {
       continue;  // The SSRC is known but the O/A has not completed.
     }
     auto outbound_audio = CreateOutboundRTPStreamStatsFromVoiceSenderInfo(
@@ -1852,7 +1849,6 @@
 void RTCStatsCollector::ProduceVideoRTPStreamStats_n(
     Timestamp timestamp,
     const RtpTransceiverStatsInfo& stats,
-    bool spec_lifetime,
     RTCStatsReport* report) const {
   RTC_DCHECK_RUN_ON(network_thread_);
   Thread::ScopedDisallowBlockingCalls no_blocking_calls;
@@ -1872,7 +1868,7 @@
     }
     // Check both packets received and frames received to handle the Insertable
     // Streams use case of receiving media without receiving packets.
-    if (spec_lifetime && video_receiver_info.packets_received == 0 &&
+    if (is_unified_plan_ && video_receiver_info.packets_received == 0 &&
         video_receiver_info.frames_received == 0) {
       // The SSRC is known despite not receiving any packets. This happens if
       // SSRC is signalled in the SDP which we should not rely on for getStats.
@@ -1917,7 +1913,7 @@
     if (!video_sender_info.connected()) {
       continue;  // The SSRC is not known yet.
     }
-    if (spec_lifetime && !stats.current_direction.has_value()) {
+    if (is_unified_plan_ && !stats.current_direction.has_value()) {
       continue;  // The SSRC is known but the O/A has not completed.
     }
     auto outbound_video = CreateOutboundRTPStreamStatsFromVideoSenderInfo(
diff --git a/pc/rtc_stats_collector.h b/pc/rtc_stats_collector.h
index 8c66ad1a..2ecbbad 100644
--- a/pc/rtc_stats_collector.h
+++ b/pc/rtc_stats_collector.h
@@ -214,11 +214,9 @@
       RTCStatsReport* report) const;
   void ProduceAudioRTPStreamStats_n(Timestamp timestamp,
                                     const RtpTransceiverStatsInfo& stats,
-                                    bool spec_lifetime,
                                     RTCStatsReport* report) const;
   void ProduceVideoRTPStreamStats_n(Timestamp timestamp,
                                     const RtpTransceiverStatsInfo& stats,
-                                    bool spec_lifetime,
                                     RTCStatsReport* report) const;
   // Produces `RTCTransportStats`.
   void ProduceTransportStats_n(
diff --git a/pc/rtc_stats_integrationtest.cc b/pc/rtc_stats_integrationtest.cc
index e3b9fed..f76ab65 100644
--- a/pc/rtc_stats_integrationtest.cc
+++ b/pc/rtc_stats_integrationtest.cc
@@ -1263,7 +1263,6 @@
 class RTCStatsRtpLifetimeTest : public RTCStatsIntegrationTest {
  public:
   RTCStatsRtpLifetimeTest() : RTCStatsIntegrationTest() {
-    // Field trial "WebRTC-RTP-Lifetime" is enabled-by-default.
     EXPECT_TRUE(caller_->CreatePc({}, CreateBuiltinAudioEncoderFactory(),
                                   CreateBuiltinAudioDecoderFactory()));
     EXPECT_TRUE(callee_->CreatePc({}, CreateBuiltinAudioEncoderFactory(),
diff --git a/test/peer_scenario/tests/bwe_ramp_up_test.cc b/test/peer_scenario/tests/bwe_ramp_up_test.cc
index eb14cce..cc98089 100644
--- a/test/peer_scenario/tests/bwe_ramp_up_test.cc
+++ b/test/peer_scenario/tests/bwe_ramp_up_test.cc
@@ -184,17 +184,11 @@
   DataRate initial_bwe = GetAvailableSendBitrate(GetStatsAndProcess(s, caller));
   s.ProcessMessages(TimeDelta::Seconds(2));
 
-  // Since the packets are undemuxable, no packets or frames will be received.
-  // This means either that inbound-rtp does not exist at all or that it exists
-  // but no frames have been received, depending on status of field trial
-  // "WebRTC-RTP-Lifetime" which controls if inbound-rtp is created before or
-  // after first packet is received.
-  // TODO(crbug.com/406585888): When cleaning up the field trial, change this
-  // assertion to `ASSERT_THAT(callee_inbound_stats, SizeIs(0))`.
+  // Since the packets are undemuxable, no packets will be received preventing
+  // the inbound-rtp stats entry from being created.
   auto callee_inbound_stats =
       GetStatsAndProcess(s, callee)->GetStatsOfType<RTCInboundRtpStreamStats>();
-  ASSERT_TRUE(callee_inbound_stats.empty() ||
-              *callee_inbound_stats[0]->frames_received == 0u);
+  ASSERT_THAT(callee_inbound_stats, SizeIs(0));
 
   DataRate final_bwe = GetAvailableSendBitrate(GetStatsAndProcess(s, caller));
   // Ensure BWE has increased from the initial BWE. BWE will not increase unless