Remove unlimited retransmission for screenshare experiment code

Bug: webrtc:9659
Change-Id: I29d8f0d20b0faee5ec2e8e196581338770b1a74d
Reviewed-on: https://webrtc-review.googlesource.com/c/105001
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25103}
diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn
index 4b37290..a4774d8 100644
--- a/modules/rtp_rtcp/BUILD.gn
+++ b/modules/rtp_rtcp/BUILD.gn
@@ -194,7 +194,6 @@
     "../../api/audio_codecs:audio_codecs_api",
     "../../api/video:video_bitrate_allocation",
     "../../api/video:video_bitrate_allocator",
-    "../../api/video:video_frame",
     "../../api/video_codecs:video_codecs_api",
     "../../call:rtp_interfaces",
     "../../common_video",
diff --git a/modules/rtp_rtcp/source/rtp_sender.cc b/modules/rtp_rtcp/source/rtp_sender.cc
index fa46e74..31887bd 100644
--- a/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/modules/rtp_rtcp/source/rtp_sender.cc
@@ -168,9 +168,7 @@
       overhead_observer_(overhead_observer),
       populate_network2_timestamp_(populate_network2_timestamp),
       send_side_bwe_with_overhead_(
-          webrtc::field_trial::IsEnabled("WebRTC-SendSideBwe-WithOverhead")),
-      unlimited_retransmission_experiment_(
-          field_trial::IsEnabled("WebRTC-UnlimitedScreenshareRetransmission")) {
+          webrtc::field_trial::IsEnabled("WebRTC-SendSideBwe-WithOverhead")) {
   // This random initialization is not intended to be cryptographic strong.
   timestamp_offset_ = random_.Rand<uint32_t>();
   // Random start, 16 bits. Can't be 0.
@@ -427,11 +425,6 @@
       *transport_frame_id_out = rtp_timestamp;
     if (!sending_media_)
       return true;
-
-    // Cache video content type.
-    if (!audio_configured_ && rtp_header) {
-      video_content_type_ = rtp_header->content_type;
-    }
   }
   VideoCodecType video_type = kVideoCodecGeneric;
   if (CheckPayloadType(payload_type, &video_type) != 0) {
@@ -671,20 +664,9 @@
 
   // Skip retransmission rate check if not configured.
   if (retransmission_rate_limiter_) {
-    // Skip retransmission rate check if sending screenshare and the experiment
-    // is on.
-    bool skip_retransmission_rate_limit = false;
-    if (unlimited_retransmission_experiment_) {
-      rtc::CritScope lock(&send_critsect_);
-      skip_retransmission_rate_limit =
-          video_content_type_ &&
-          videocontenttypehelpers::IsScreenshare(*video_content_type_);
-    }
-
     // Check if we're overusing retransmission bitrate.
     // TODO(sprang): Add histograms for nack success or failure reasons.
-    if (!skip_retransmission_rate_limit &&
-        !retransmission_rate_limiter_->TryUseRate(packet_size)) {
+    if (!retransmission_rate_limiter_->TryUseRate(packet_size)) {
       return -1;
     }
   }
diff --git a/modules/rtp_rtcp/source/rtp_sender.h b/modules/rtp_rtcp/source/rtp_sender.h
index e410f97..e9095d1 100644
--- a/modules/rtp_rtcp/source/rtp_sender.h
+++ b/modules/rtp_rtcp/source/rtp_sender.h
@@ -20,7 +20,6 @@
 #include "absl/types/optional.h"
 #include "api/array_view.h"
 #include "api/call/transport.h"
-#include "api/video/video_content_type.h"
 #include "common_types.h"  // NOLINT(build/include)
 #include "modules/rtp_rtcp/include/flexfec_sender.h"
 #include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
@@ -345,11 +344,6 @@
 
   const bool send_side_bwe_with_overhead_;
 
-  const bool unlimited_retransmission_experiment_;
-
-  absl::optional<VideoContentType> video_content_type_
-      RTC_GUARDED_BY(send_critsect_);
-
   RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender);
 };