gfe-relnote: In QUIC, remove LossDetectionType given IETF style loss detection is default enabled.

Deprecate gfe2_restart_flag_quic_default_on_ietf_loss_detection.

PiperOrigin-RevId: 294515792
Change-Id: I5c76c398de77c930f856621f96ebb13e64679639
diff --git a/quic/core/congestion_control/general_loss_algorithm.cc b/quic/core/congestion_control/general_loss_algorithm.cc
index 0f1c024..3cf22a2 100644
--- a/quic/core/congestion_control/general_loss_algorithm.cc
+++ b/quic/core/congestion_control/general_loss_algorithm.cc
@@ -24,45 +24,13 @@
 }  // namespace
 
 GeneralLossAlgorithm::GeneralLossAlgorithm()
-    : GeneralLossAlgorithm(GetDefaultLossDetectionType()) {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    // TODO(fayang): Change defaults in GeneralLossAlgorithm(LossDetectionType
-    // loss_type) when deprecating quic_default_on_ietf_loss_detection.
-    set_reordering_shift(kDefaultLossDelayShift);
-    set_use_adaptive_reordering_threshold(true);
-  }
-}
-
-GeneralLossAlgorithm::GeneralLossAlgorithm(LossDetectionType loss_type)
     : loss_detection_timeout_(QuicTime::Zero()),
+      reordering_shift_(kDefaultLossDelayShift),
       reordering_threshold_(kNumberOfNacksBeforeRetransmission),
-      use_adaptive_reordering_threshold_(false),
+      use_adaptive_reordering_threshold_(true),
       use_adaptive_time_threshold_(false),
       least_in_flight_(1),
-      packet_number_space_(NUM_PACKET_NUMBER_SPACES) {
-  SetLossDetectionType(loss_type);
-}
-
-void GeneralLossAlgorithm::SetLossDetectionType(LossDetectionType loss_type) {
-  DCHECK(!GetQuicRestartFlag(quic_default_on_ietf_loss_detection) ||
-         loss_type == kIetfLossDetection);
-  loss_detection_timeout_ = QuicTime::Zero();
-  loss_type_ = loss_type;
-  if (loss_type == kAdaptiveTime) {
-    reordering_shift_ = kDefaultAdaptiveLossDelayShift;
-  } else if (loss_type == kIetfLossDetection) {
-    if (!GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-      reordering_shift_ = kDefaultIetfLossDelayShift;
-    }
-  } else {
-    reordering_shift_ = kDefaultLossDelayShift;
-  }
-  largest_previously_acked_.Clear();
-}
-
-LossDetectionType GeneralLossAlgorithm::GetLossDetectionType() const {
-  return loss_type_;
-}
+      packet_number_space_(NUM_PACKET_NUMBER_SPACES) {}
 
 // Uses nack counts to decide when packets are lost.
 void GeneralLossAlgorithm::DetectLosses(
@@ -95,14 +63,8 @@
   }
   QuicTime::Delta max_rtt =
       std::max(rtt_stats.previous_srtt(), rtt_stats.latest_rtt());
-  if (loss_type_ == kIetfLossDetection) {
-    max_rtt = std::max(kAlarmGranularity, max_rtt);
-  }
+  max_rtt = std::max(kAlarmGranularity, max_rtt);
   QuicTime::Delta loss_delay = max_rtt + (max_rtt >> reordering_shift_);
-  if (loss_type_ != kIetfLossDetection) {
-    loss_delay = std::max(QuicTime::Delta::FromMilliseconds(kMinLossDelayMs),
-                          loss_delay);
-  }
   QuicPacketNumber packet_number = unacked_packets.GetLeastUnacked();
   auto it = unacked_packets.begin();
   if (least_in_flight_.IsInitialized() && least_in_flight_ >= packet_number) {
@@ -129,55 +91,25 @@
     if (!it->in_flight) {
       continue;
     }
-
-    if (loss_type_ == kNack || loss_type_ == kIetfLossDetection) {
-      // Packet threshold loss detection.
-      if (largest_newly_acked - packet_number >= reordering_threshold_) {
-        packets_lost->push_back(LostPacket(packet_number, it->bytes_sent));
-        continue;
-      }
-    } else if (loss_type_ == kLazyFack) {
-      // Require two in order acks to invoke FACK, which avoids spuriously
-      // retransmitting packets when one packet is reordered by a large amount.
-      if (largest_previously_acked_.IsInitialized() &&
-          largest_newly_acked > largest_previously_acked_ &&
-          largest_previously_acked_ > packet_number &&
-          largest_previously_acked_ - packet_number >=
-              (kNumberOfNacksBeforeRetransmission - 1)) {
-        packets_lost->push_back(LostPacket(packet_number, it->bytes_sent));
-        continue;
-      }
-    }
-
-    // Time threshold loss detection. Also implements early retransmit(RFC5827)
-    // when time threshold is not used and the last packet gets acked.
-    QuicPacketNumber largest_sent_retransmittable_packet =
-        unacked_packets.GetLargestSentRetransmittableOfPacketNumberSpace(
-            packet_number_space_);
-    if (largest_sent_retransmittable_packet <= largest_newly_acked ||
-        loss_type_ == kTime || loss_type_ == kAdaptiveTime ||
-        loss_type_ == kIetfLossDetection) {
-      QuicTime when_lost = it->sent_time + loss_delay;
-      if (time < when_lost) {
-        loss_detection_timeout_ = when_lost;
-        if (!least_in_flight_.IsInitialized()) {
-          // At this point, packet_number is in flight and not detected as lost.
-          least_in_flight_ = packet_number;
-        }
-        break;
-      }
+    // Packet threshold loss detection.
+    if (largest_newly_acked - packet_number >= reordering_threshold_) {
       packets_lost->push_back(LostPacket(packet_number, it->bytes_sent));
       continue;
     }
 
-    // NACK-based loss detection allows for a max reordering window of 1 RTT.
-    if (loss_type_ != kIetfLossDetection &&
-        it->sent_time + rtt_stats.smoothed_rtt() <
-            unacked_packets.GetTransmissionInfo(largest_newly_acked)
-                .sent_time) {
-      packets_lost->push_back(LostPacket(packet_number, it->bytes_sent));
-      continue;
+    // Time threshold loss detection.
+    QuicTime when_lost = it->sent_time + loss_delay;
+    if (time < when_lost) {
+      loss_detection_timeout_ = when_lost;
+      if (!least_in_flight_.IsInitialized()) {
+        // At this point, packet_number is in flight and not detected as lost.
+        least_in_flight_ = packet_number;
+      }
+      break;
     }
+    packets_lost->push_back(LostPacket(packet_number, it->bytes_sent));
+    continue;
+
     if (!least_in_flight_.IsInitialized()) {
       // At this point, packet_number is in flight and not detected as lost.
       least_in_flight_ = packet_number;
@@ -200,8 +132,7 @@
     QuicTime ack_receive_time,
     QuicPacketNumber packet_number,
     QuicPacketNumber previous_largest_acked) {
-  if ((loss_type_ == kAdaptiveTime || use_adaptive_time_threshold_) &&
-      reordering_shift_ > 0) {
+  if (use_adaptive_time_threshold_ && reordering_shift_ > 0) {
     // Increase reordering fraction such that the packet would not have been
     // declared lost.
     QuicTime::Delta time_needed =
diff --git a/quic/core/congestion_control/general_loss_algorithm.h b/quic/core/congestion_control/general_loss_algorithm.h
index fb6af22..dd390b6 100644
--- a/quic/core/congestion_control/general_loss_algorithm.h
+++ b/quic/core/congestion_control/general_loss_algorithm.h
@@ -25,17 +25,10 @@
   static const QuicPacketCount kNumberOfNacksBeforeRetransmission = 3;
 
   GeneralLossAlgorithm();
-  explicit GeneralLossAlgorithm(LossDetectionType loss_type);
   GeneralLossAlgorithm(const GeneralLossAlgorithm&) = delete;
   GeneralLossAlgorithm& operator=(const GeneralLossAlgorithm&) = delete;
   ~GeneralLossAlgorithm() override {}
 
-  LossDetectionType GetLossDetectionType() const override;
-
-  // Switches the loss detection type to |loss_type| and resets the loss
-  // algorithm.
-  void SetLossDetectionType(LossDetectionType loss_type);
-
   // Uses |largest_acked| and time to decide when packets are lost.
   void DetectLosses(const QuicUnackedPacketMap& unacked_packets,
                     QuicTime time,
@@ -78,9 +71,6 @@
 
  private:
   QuicTime loss_detection_timeout_;
-  // TODO(fayang): remove loss_type_ when deprecating
-  // quic_default_on_ietf_loss_detection.
-  LossDetectionType loss_type_;
   // Fraction of a max(SRTT, latest_rtt) to permit reordering before declaring
   // loss.  Fraction calculated by shifting max(SRTT, latest_rtt) to the right
   // by reordering_shift.
diff --git a/quic/core/congestion_control/general_loss_algorithm_test.cc b/quic/core/congestion_control/general_loss_algorithm_test.cc
index 435e8ea..f3fb1f1 100644
--- a/quic/core/congestion_control/general_loss_algorithm_test.cc
+++ b/quic/core/congestion_control/general_loss_algorithm_test.cc
@@ -138,12 +138,8 @@
   packets_acked.push_back(AckedPacket(
       QuicPacketNumber(4), kMaxOutgoingPacketSize, QuicTime::Zero()));
   VerifyLosses(4, packets_acked, {1});
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    EXPECT_EQ(clock_.Now() + 1.25 * rtt_stats_.smoothed_rtt(),
-              loss_algorithm_.GetLossTimeout());
-  } else {
-    EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-  }
+  EXPECT_EQ(clock_.Now() + 1.25 * rtt_stats_.smoothed_rtt(),
+            loss_algorithm_.GetLossTimeout());
 }
 
 TEST_F(GeneralLossAlgorithmTest, EarlyRetransmit1Packet) {
@@ -267,293 +263,7 @@
   VerifyLosses(2, packets_acked, {1});
 }
 
-// NoFack loss detection tests.
-TEST_F(GeneralLossAlgorithmTest, LazyFackNackRetransmit1Packet) {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    return;
-  }
-  loss_algorithm_.SetLossDetectionType(kLazyFack);
-  const size_t kNumSentPackets = 5;
-  // Transmit 5 packets.
-  for (size_t i = 1; i <= kNumSentPackets; ++i) {
-    SendDataPacket(i);
-  }
-  AckedPacketVector packets_acked;
-  // No loss on one ack.
-  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(2));
-  packets_acked.push_back(AckedPacket(
-      QuicPacketNumber(2), kMaxOutgoingPacketSize, QuicTime::Zero()));
-  VerifyLosses(2, packets_acked, std::vector<uint64_t>{});
-  packets_acked.clear();
-  // No loss on two acks.
-  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(3));
-  packets_acked.push_back(AckedPacket(
-      QuicPacketNumber(3), kMaxOutgoingPacketSize, QuicTime::Zero()));
-  VerifyLosses(3, packets_acked, std::vector<uint64_t>{});
-  packets_acked.clear();
-  // Loss on three acks.
-  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(4));
-  packets_acked.push_back(AckedPacket(
-      QuicPacketNumber(4), kMaxOutgoingPacketSize, QuicTime::Zero()));
-  VerifyLosses(4, packets_acked, {1});
-  EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-}
-
-// A stretch ack is an ack that covers more than 1 packet of previously
-// unacknowledged data.
-TEST_F(GeneralLossAlgorithmTest,
-       LazyFackNoNackRetransmit1PacketWith1StretchAck) {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    return;
-  }
-  loss_algorithm_.SetLossDetectionType(kLazyFack);
-  const size_t kNumSentPackets = 10;
-  // Transmit 10 packets.
-  for (size_t i = 1; i <= kNumSentPackets; ++i) {
-    SendDataPacket(i);
-  }
-  AckedPacketVector packets_acked;
-  // Nack the first packet 3 times in a single StretchAck.
-  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(2));
-  packets_acked.push_back(AckedPacket(
-      QuicPacketNumber(2), kMaxOutgoingPacketSize, QuicTime::Zero()));
-  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(3));
-  packets_acked.push_back(AckedPacket(
-      QuicPacketNumber(3), kMaxOutgoingPacketSize, QuicTime::Zero()));
-  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(4));
-  packets_acked.push_back(AckedPacket(
-      QuicPacketNumber(4), kMaxOutgoingPacketSize, QuicTime::Zero()));
-  VerifyLosses(4, packets_acked, std::vector<uint64_t>{});
-  packets_acked.clear();
-  // The timer isn't set because we expect more acks.
-  EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-  // Process another ack and then packet 1 will be lost.
-  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(5));
-  packets_acked.push_back(AckedPacket(
-      QuicPacketNumber(5), kMaxOutgoingPacketSize, QuicTime::Zero()));
-  VerifyLosses(5, packets_acked, {1});
-  EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-}
-
-// Ack a packet 3 packets ahead does not cause a retransmit.
-TEST_F(GeneralLossAlgorithmTest, LazyFackNackRetransmit1PacketSingleAck) {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    return;
-  }
-  loss_algorithm_.SetLossDetectionType(kLazyFack);
-  const size_t kNumSentPackets = 10;
-  // Transmit 10 packets.
-  for (size_t i = 1; i <= kNumSentPackets; ++i) {
-    SendDataPacket(i);
-  }
-  AckedPacketVector packets_acked;
-  // Nack the first packet 3 times in an AckFrame with three missing packets.
-  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(4));
-  packets_acked.push_back(AckedPacket(
-      QuicPacketNumber(4), kMaxOutgoingPacketSize, QuicTime::Zero()));
-  VerifyLosses(4, packets_acked, std::vector<uint64_t>{});
-  packets_acked.clear();
-  // The timer isn't set because we expect more acks.
-  EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-  // Process another ack and then packet 1 and 2 will be lost.
-  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(5));
-  packets_acked.push_back(AckedPacket(
-      QuicPacketNumber(5), kMaxOutgoingPacketSize, QuicTime::Zero()));
-  VerifyLosses(5, packets_acked, {1, 2});
-  EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-}
-
-// Time-based loss detection tests.
-TEST_F(GeneralLossAlgorithmTest, NoLossFor500Nacks) {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    return;
-  }
-  loss_algorithm_.SetLossDetectionType(kTime);
-  const size_t kNumSentPackets = 5;
-  // Transmit 5 packets.
-  for (size_t i = 1; i <= kNumSentPackets; ++i) {
-    SendDataPacket(i);
-  }
-  AckedPacketVector packets_acked;
-  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(2));
-  packets_acked.push_back(AckedPacket(
-      QuicPacketNumber(2), kMaxOutgoingPacketSize, QuicTime::Zero()));
-  for (size_t i = 1; i < 500; ++i) {
-    VerifyLosses(2, packets_acked, std::vector<uint64_t>{});
-    packets_acked.clear();
-  }
-  EXPECT_EQ(1.25 * rtt_stats_.smoothed_rtt(),
-            loss_algorithm_.GetLossTimeout() - clock_.Now());
-}
-
-TEST_F(GeneralLossAlgorithmTest, NoLossUntilTimeout) {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    return;
-  }
-  loss_algorithm_.SetLossDetectionType(kTime);
-  const size_t kNumSentPackets = 10;
-  // Transmit 10 packets at 1/10th an RTT interval.
-  for (size_t i = 1; i <= kNumSentPackets; ++i) {
-    SendDataPacket(i);
-    clock_.AdvanceTime(0.1 * rtt_stats_.smoothed_rtt());
-  }
-  AckedPacketVector packets_acked;
-  // Expect the timer to not be set.
-  EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-  // The packet should not be lost until 1.25 RTTs pass.
-  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(2));
-  packets_acked.push_back(AckedPacket(
-      QuicPacketNumber(2), kMaxOutgoingPacketSize, QuicTime::Zero()));
-  VerifyLosses(2, packets_acked, std::vector<uint64_t>{});
-  packets_acked.clear();
-  // Expect the timer to be set to 0.25 RTT's in the future.
-  EXPECT_EQ(0.25 * rtt_stats_.smoothed_rtt(),
-            loss_algorithm_.GetLossTimeout() - clock_.Now());
-  VerifyLosses(2, packets_acked, std::vector<uint64_t>{});
-  clock_.AdvanceTime(0.25 * rtt_stats_.smoothed_rtt());
-  VerifyLosses(2, packets_acked, {1});
-  EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-}
-
-TEST_F(GeneralLossAlgorithmTest, NoLossWithoutNack) {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    return;
-  }
-  loss_algorithm_.SetLossDetectionType(kTime);
-  const size_t kNumSentPackets = 10;
-  // Transmit 10 packets at 1/10th an RTT interval.
-  for (size_t i = 1; i <= kNumSentPackets; ++i) {
-    SendDataPacket(i);
-    clock_.AdvanceTime(0.1 * rtt_stats_.smoothed_rtt());
-  }
-  AckedPacketVector packets_acked;
-  // Expect the timer to not be set.
-  EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-  // The packet should not be lost without a nack.
-  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(1));
-  packets_acked.push_back(AckedPacket(
-      QuicPacketNumber(1), kMaxOutgoingPacketSize, QuicTime::Zero()));
-  VerifyLosses(1, packets_acked, std::vector<uint64_t>{});
-  packets_acked.clear();
-  // The timer should still not be set.
-  EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-  clock_.AdvanceTime(0.25 * rtt_stats_.smoothed_rtt());
-  VerifyLosses(1, packets_acked, std::vector<uint64_t>{});
-  clock_.AdvanceTime(rtt_stats_.smoothed_rtt());
-  VerifyLosses(1, packets_acked, std::vector<uint64_t>{});
-
-  EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-}
-
-TEST_F(GeneralLossAlgorithmTest, MultipleLossesAtOnce) {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    return;
-  }
-  loss_algorithm_.SetLossDetectionType(kTime);
-  const size_t kNumSentPackets = 10;
-  // Transmit 10 packets at once and then go forward an RTT.
-  for (size_t i = 1; i <= kNumSentPackets; ++i) {
-    SendDataPacket(i);
-  }
-  AckedPacketVector packets_acked;
-  clock_.AdvanceTime(rtt_stats_.smoothed_rtt());
-  // Expect the timer to not be set.
-  EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-  // The packet should not be lost until 1.25 RTTs pass.
-  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(10));
-  packets_acked.push_back(AckedPacket(
-      QuicPacketNumber(10), kMaxOutgoingPacketSize, QuicTime::Zero()));
-  VerifyLosses(10, packets_acked, std::vector<uint64_t>{});
-  packets_acked.clear();
-  // Expect the timer to be set to 0.25 RTT's in the future.
-  EXPECT_EQ(0.25 * rtt_stats_.smoothed_rtt(),
-            loss_algorithm_.GetLossTimeout() - clock_.Now());
-  clock_.AdvanceTime(0.25 * rtt_stats_.smoothed_rtt());
-  VerifyLosses(10, packets_acked, {1, 2, 3, 4, 5, 6, 7, 8, 9});
-  EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-}
-
-TEST_F(GeneralLossAlgorithmTest, NoSpuriousLossesFromLargeReordering) {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    return;
-  }
-  loss_algorithm_.SetLossDetectionType(kTime);
-  const size_t kNumSentPackets = 10;
-  // Transmit 10 packets at once and then go forward an RTT.
-  for (size_t i = 1; i <= kNumSentPackets; ++i) {
-    SendDataPacket(i);
-  }
-  AckedPacketVector packets_acked;
-  clock_.AdvanceTime(rtt_stats_.smoothed_rtt());
-  // Expect the timer to not be set.
-  EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-  // The packet should not be lost until 1.25 RTTs pass.
-
-  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(10));
-  packets_acked.push_back(AckedPacket(
-      QuicPacketNumber(10), kMaxOutgoingPacketSize, QuicTime::Zero()));
-  VerifyLosses(10, packets_acked, std::vector<uint64_t>{});
-  packets_acked.clear();
-  // Expect the timer to be set to 0.25 RTT's in the future.
-  EXPECT_EQ(0.25 * rtt_stats_.smoothed_rtt(),
-            loss_algorithm_.GetLossTimeout() - clock_.Now());
-  clock_.AdvanceTime(0.25 * rtt_stats_.smoothed_rtt());
-  // Now ack packets 1 to 9 and ensure the timer is no longer set and no packets
-  // are lost.
-  for (uint64_t i = 1; i <= 9; ++i) {
-    unacked_packets_.RemoveFromInFlight(QuicPacketNumber(i));
-    packets_acked.push_back(AckedPacket(
-        QuicPacketNumber(i), kMaxOutgoingPacketSize, QuicTime::Zero()));
-    VerifyLosses(i, packets_acked, std::vector<uint64_t>{});
-    packets_acked.clear();
-    EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-  }
-}
-
-TEST_F(GeneralLossAlgorithmTest, IncreaseThresholdUponSpuriousLoss) {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    return;
-  }
-  loss_algorithm_.SetLossDetectionType(kAdaptiveTime);
-  EXPECT_EQ(4, loss_algorithm_.reordering_shift());
-  const size_t kNumSentPackets = 10;
-  // Transmit 2 packets at 1/10th an RTT interval.
-  for (size_t i = 1; i <= kNumSentPackets; ++i) {
-    SendDataPacket(i);
-    clock_.AdvanceTime(0.1 * rtt_stats_.smoothed_rtt());
-  }
-  EXPECT_EQ(QuicTime::Zero() + rtt_stats_.smoothed_rtt(), clock_.Now());
-  AckedPacketVector packets_acked;
-  // Expect the timer to not be set.
-  EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-  // Packet 1 should not be lost until 1/16 RTTs pass.
-  unacked_packets_.RemoveFromInFlight(QuicPacketNumber(2));
-  packets_acked.push_back(AckedPacket(
-      QuicPacketNumber(2), kMaxOutgoingPacketSize, QuicTime::Zero()));
-  VerifyLosses(2, packets_acked, std::vector<uint64_t>{});
-  packets_acked.clear();
-  // Expect the timer to be set to 1/16 RTT's in the future.
-  EXPECT_EQ(rtt_stats_.smoothed_rtt() * (1.0f / 16),
-            loss_algorithm_.GetLossTimeout() - clock_.Now());
-  VerifyLosses(2, packets_acked, std::vector<uint64_t>{});
-  clock_.AdvanceTime(rtt_stats_.smoothed_rtt() * (1.0f / 16));
-  VerifyLosses(2, packets_acked, {1});
-  EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-  // Retransmit packet 1 as 11 and 2 as 12.
-  SendDataPacket(11);
-  SendDataPacket(12);
-
-  // Advance the time 1/4 RTT and indicate the loss was spurious.
-  // The new threshold should be 1/2 RTT.
-  clock_.AdvanceTime(rtt_stats_.smoothed_rtt() * (1.0f / 4));
-  loss_algorithm_.SpuriousLossDetected(unacked_packets_, rtt_stats_,
-                                       clock_.Now(), QuicPacketNumber(1),
-                                       QuicPacketNumber(2));
-  EXPECT_EQ(1, loss_algorithm_.reordering_shift());
-}
-
 TEST_F(GeneralLossAlgorithmTest, IncreaseTimeThresholdUponSpuriousLoss) {
-  loss_algorithm_.SetLossDetectionType(kIetfLossDetection);
   loss_algorithm_.enable_adaptive_time_threshold();
   loss_algorithm_.set_reordering_shift(kDefaultLossDelayShift);
   EXPECT_EQ(kDefaultLossDelayShift, loss_algorithm_.reordering_shift());
@@ -658,7 +368,6 @@
 }
 
 TEST_F(GeneralLossAlgorithmTest, DefaultIetfLossDetection) {
-  loss_algorithm_.SetLossDetectionType(kIetfLossDetection);
   loss_algorithm_.set_reordering_shift(kDefaultIetfLossDelayShift);
   for (size_t i = 1; i <= 6; ++i) {
     SendDataPacket(i);
@@ -703,7 +412,6 @@
 }
 
 TEST_F(GeneralLossAlgorithmTest, IetfLossDetectionWithOneFourthRttDelay) {
-  loss_algorithm_.SetLossDetectionType(kIetfLossDetection);
   loss_algorithm_.set_reordering_shift(2);
   SendDataPacket(1);
   SendDataPacket(2);
diff --git a/quic/core/congestion_control/loss_detection_interface.h b/quic/core/congestion_control/loss_detection_interface.h
index af9c196..601f2f7 100644
--- a/quic/core/congestion_control/loss_detection_interface.h
+++ b/quic/core/congestion_control/loss_detection_interface.h
@@ -20,9 +20,6 @@
 class QUIC_EXPORT_PRIVATE LossDetectionInterface {
  public:
   virtual ~LossDetectionInterface() {}
-
-  virtual LossDetectionType GetLossDetectionType() const = 0;
-
   // Called when a new ack arrives or the loss alarm fires.
   virtual void DetectLosses(const QuicUnackedPacketMap& unacked_packets,
                             QuicTime time,
diff --git a/quic/core/congestion_control/uber_loss_algorithm.cc b/quic/core/congestion_control/uber_loss_algorithm.cc
index a72ba03..ad8ef3f 100644
--- a/quic/core/congestion_control/uber_loss_algorithm.cc
+++ b/quic/core/congestion_control/uber_loss_algorithm.cc
@@ -8,29 +8,13 @@
 
 namespace quic {
 
-UberLossAlgorithm::UberLossAlgorithm()
-    : UberLossAlgorithm(GetDefaultLossDetectionType()) {}
-
-UberLossAlgorithm::UberLossAlgorithm(LossDetectionType loss_type)
-    : loss_type_(loss_type) {
-  SetLossDetectionType(loss_type);
+UberLossAlgorithm::UberLossAlgorithm() {
   for (int8_t i = INITIAL_DATA; i < NUM_PACKET_NUMBER_SPACES; ++i) {
     general_loss_algorithms_[i].SetPacketNumberSpace(
         static_cast<PacketNumberSpace>(i));
   }
 }
 
-LossDetectionType UberLossAlgorithm::GetLossDetectionType() const {
-  return loss_type_;
-}
-
-void UberLossAlgorithm::SetLossDetectionType(LossDetectionType loss_type) {
-  loss_type_ = loss_type;
-  for (auto& loss_algorithm : general_loss_algorithms_) {
-    loss_algorithm.SetLossDetectionType(loss_type);
-  }
-}
-
 void UberLossAlgorithm::DetectLosses(
     const QuicUnackedPacketMap& unacked_packets,
     QuicTime time,
diff --git a/quic/core/congestion_control/uber_loss_algorithm.h b/quic/core/congestion_control/uber_loss_algorithm.h
index 2a530d2..4248553 100644
--- a/quic/core/congestion_control/uber_loss_algorithm.h
+++ b/quic/core/congestion_control/uber_loss_algorithm.h
@@ -19,17 +19,10 @@
 class QUIC_EXPORT_PRIVATE UberLossAlgorithm : public LossDetectionInterface {
  public:
   UberLossAlgorithm();
-  explicit UberLossAlgorithm(LossDetectionType loss_type);
   UberLossAlgorithm(const UberLossAlgorithm&) = delete;
   UberLossAlgorithm& operator=(const UberLossAlgorithm&) = delete;
   ~UberLossAlgorithm() override {}
 
-  LossDetectionType GetLossDetectionType() const override;
-
-  // Switches the loss detection type to |loss_type| and resets loss algorithm
-  // for all packet number spaces.
-  void SetLossDetectionType(LossDetectionType loss_type);
-
   // Detects lost packets.
   void DetectLosses(const QuicUnackedPacketMap& unacked_packets,
                     QuicTime time,
@@ -63,7 +56,6 @@
  private:
   friend class test::QuicSentPacketManagerPeer;
 
-  LossDetectionType loss_type_;
   // One loss algorithm per packet number space.
   GeneralLossAlgorithm general_loss_algorithms_[NUM_PACKET_NUMBER_SPACES];
 };
diff --git a/quic/core/congestion_control/uber_loss_algorithm_test.cc b/quic/core/congestion_control/uber_loss_algorithm_test.cc
index 33e4167..a3daf09 100644
--- a/quic/core/congestion_control/uber_loss_algorithm_test.cc
+++ b/quic/core/congestion_control/uber_loss_algorithm_test.cc
@@ -115,12 +115,8 @@
       APPLICATION_DATA, QuicPacketNumber(4));
   // No packet loss by acking 4.
   VerifyLosses(4, packets_acked_, std::vector<uint64_t>{});
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    EXPECT_EQ(clock_.Now() + 1.25 * rtt_stats_.smoothed_rtt(),
-              loss_algorithm_.GetLossTimeout());
-  } else {
-    EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
-  }
+  EXPECT_EQ(clock_.Now() + 1.25 * rtt_stats_.smoothed_rtt(),
+            loss_algorithm_.GetLossTimeout());
 
   // Acking 6 causes 3 to be detected loss.
   AckPackets({6});
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc
index 8d97c48..6bdb6b0 100644
--- a/quic/core/quic_connection.cc
+++ b/quic/core/quic_connection.cc
@@ -304,8 +304,7 @@
                            clock_,
                            random_generator_,
                            &stats_,
-                           GetDefaultCongestionControlType(),
-                           GetDefaultLossDetectionType()),
+                           GetDefaultCongestionControlType()),
       version_negotiated_(false),
       perspective_(perspective),
       connected_(true),
diff --git a/quic/core/quic_sent_packet_manager.cc b/quic/core/quic_sent_packet_manager.cc
index 302daf4..a6c875b 100644
--- a/quic/core/quic_sent_packet_manager.cc
+++ b/quic/core/quic_sent_packet_manager.cc
@@ -66,8 +66,7 @@
     const QuicClock* clock,
     QuicRandom* random,
     QuicConnectionStats* stats,
-    CongestionControlType congestion_control_type,
-    LossDetectionType loss_type)
+    CongestionControlType congestion_control_type)
     : unacked_packets_(perspective),
       clock_(clock),
       random_(random),
@@ -76,7 +75,6 @@
       network_change_visitor_(nullptr),
       initial_congestion_window_(kInitialCongestionWindow),
       loss_algorithm_(GetInitialLossAlgorithm()),
-      uber_loss_algorithm_(loss_type),
       consecutive_rto_count_(0),
       consecutive_tlp_count_(0),
       consecutive_crypto_retransmission_count_(0),
@@ -254,45 +252,23 @@
     use_new_rto_ = true;
   }
   // Configure loss detection.
-  if (!GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    if (config.HasClientRequestedIndependentOption(kTIME, perspective)) {
-      uber_loss_algorithm_.SetLossDetectionType(kTime);
-    }
-    if (config.HasClientRequestedIndependentOption(kATIM, perspective)) {
-      uber_loss_algorithm_.SetLossDetectionType(kAdaptiveTime);
-    }
-    if (config.HasClientRequestedIndependentOption(kLFAK, perspective)) {
-      uber_loss_algorithm_.SetLossDetectionType(kLazyFack);
-    }
-  }
   if (config.HasClientRequestedIndependentOption(kILD0, perspective)) {
-    uber_loss_algorithm_.SetLossDetectionType(kIetfLossDetection);
-    if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-      uber_loss_algorithm_.SetReorderingShift(kDefaultIetfLossDelayShift);
-      uber_loss_algorithm_.DisableAdaptiveReorderingThreshold();
-    }
+    uber_loss_algorithm_.SetReorderingShift(kDefaultIetfLossDelayShift);
+    uber_loss_algorithm_.DisableAdaptiveReorderingThreshold();
   }
   if (config.HasClientRequestedIndependentOption(kILD1, perspective)) {
-    uber_loss_algorithm_.SetLossDetectionType(kIetfLossDetection);
     uber_loss_algorithm_.SetReorderingShift(kDefaultLossDelayShift);
-    if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-      uber_loss_algorithm_.DisableAdaptiveReorderingThreshold();
-    }
+    uber_loss_algorithm_.DisableAdaptiveReorderingThreshold();
   }
   if (config.HasClientRequestedIndependentOption(kILD2, perspective)) {
-    uber_loss_algorithm_.SetLossDetectionType(kIetfLossDetection);
     uber_loss_algorithm_.EnableAdaptiveReorderingThreshold();
-    if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-      uber_loss_algorithm_.SetReorderingShift(kDefaultIetfLossDelayShift);
-    }
+    uber_loss_algorithm_.SetReorderingShift(kDefaultIetfLossDelayShift);
   }
   if (config.HasClientRequestedIndependentOption(kILD3, perspective)) {
-    uber_loss_algorithm_.SetLossDetectionType(kIetfLossDetection);
     uber_loss_algorithm_.SetReorderingShift(kDefaultLossDelayShift);
     uber_loss_algorithm_.EnableAdaptiveReorderingThreshold();
   }
   if (config.HasClientRequestedIndependentOption(kILD4, perspective)) {
-    uber_loss_algorithm_.SetLossDetectionType(kIetfLossDetection);
     uber_loss_algorithm_.SetReorderingShift(kDefaultLossDelayShift);
     uber_loss_algorithm_.EnableAdaptiveReorderingThreshold();
     uber_loss_algorithm_.EnableAdaptiveTimeThreshold();
@@ -849,7 +825,6 @@
 void QuicSentPacketManager::EnableIetfPtoAndLossDetection() {
   pto_enabled_ = true;
   handshake_mode_disabled_ = true;
-  uber_loss_algorithm_.SetLossDetectionType(kIetfLossDetection);
 }
 
 void QuicSentPacketManager::StartExponentialBackoffAfterNthPto(
diff --git a/quic/core/quic_sent_packet_manager.h b/quic/core/quic_sent_packet_manager.h
index f70b525..884b32e 100644
--- a/quic/core/quic_sent_packet_manager.h
+++ b/quic/core/quic_sent_packet_manager.h
@@ -111,8 +111,7 @@
                         const QuicClock* clock,
                         QuicRandom* random,
                         QuicConnectionStats* stats,
-                        CongestionControlType congestion_control_type,
-                        LossDetectionType loss_type);
+                        CongestionControlType congestion_control_type);
   QuicSentPacketManager(const QuicSentPacketManager&) = delete;
   QuicSentPacketManager& operator=(const QuicSentPacketManager&) = delete;
   virtual ~QuicSentPacketManager();
diff --git a/quic/core/quic_sent_packet_manager_test.cc b/quic/core/quic_sent_packet_manager_test.cc
index 6b34482..d3eca0e 100644
--- a/quic/core/quic_sent_packet_manager_test.cc
+++ b/quic/core/quic_sent_packet_manager_test.cc
@@ -91,8 +91,7 @@
                  &clock_,
                  QuicRandom::GetInstance(),
                  &stats_,
-                 kInitialCongestionControlType,
-                 GetDefaultLossDetectionType()),
+                 kInitialCongestionControlType),
         send_algorithm_(new StrictMock<MockSendAlgorithm>),
         network_change_visitor_(new StrictMock<MockNetworkChangeVisitor>) {
     QuicSentPacketManagerPeer::SetSendAlgorithm(&manager_, send_algorithm_);
@@ -472,13 +471,9 @@
   clock_.AdvanceTime(rtt);
 
   // Next, NACK packet 2 three times.
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    EXPECT_CALL(notifier_, IsFrameOutstanding(_)).WillRepeatedly(Return(false));
-    EXPECT_CALL(notifier_, OnFrameLost(_)).Times(1);
-    ExpectAckAndLoss(true, 3, 2);
-  } else {
-    ExpectAck(3);
-  }
+  EXPECT_CALL(notifier_, IsFrameOutstanding(_)).WillRepeatedly(Return(false));
+  EXPECT_CALL(notifier_, OnFrameLost(_)).Times(1);
+  ExpectAckAndLoss(true, 3, 2);
   manager_.OnAckFrameStart(QuicPacketNumber(3), QuicTime::Delta::Infinite(),
                            clock_.Now());
   manager_.OnAckRange(QuicPacketNumber(3), QuicPacketNumber(4));
@@ -496,16 +491,7 @@
             manager_.OnAckFrameEnd(clock_.Now(), QuicPacketNumber(3),
                                    ENCRYPTION_INITIAL));
 
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    ExpectAck(5);
-  } else {
-    // Frames in all packets are acked.
-    EXPECT_CALL(notifier_, IsFrameOutstanding(_)).WillRepeatedly(Return(false));
-    // Notify session that stream frame in packet 2 gets lost although it is
-    // not outstanding.
-    EXPECT_CALL(notifier_, OnFrameLost(_)).Times(1);
-    ExpectAckAndLoss(true, 5, 2);
-  }
+  ExpectAck(5);
   manager_.OnAckFrameStart(QuicPacketNumber(5), QuicTime::Delta::Infinite(),
                            clock_.Now());
   manager_.OnAckRange(QuicPacketNumber(3), QuicPacketNumber(6));
@@ -1782,40 +1768,13 @@
   manager_.OnRetransmissionTimeout();
 }
 
-TEST_F(QuicSentPacketManagerTest, NegotiateTimeLossDetectionFromOptions) {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    return;
-  }
-  EXPECT_EQ(kNack, QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                       ->GetLossDetectionType());
-
-  QuicConfig config;
-  QuicTagVector options;
-  options.push_back(kTIME);
-  QuicConfigPeer::SetReceivedConnectionOptions(&config, options);
-  EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
-  EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
-  manager_.SetFromConfig(config);
-
-  EXPECT_EQ(kTime, QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                       ->GetLossDetectionType());
-}
-
 TEST_F(QuicSentPacketManagerTest, NegotiateIetfLossDetectionFromOptions) {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    EXPECT_EQ(kIetfLossDetection,
-              QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                  ->GetLossDetectionType());
-    EXPECT_TRUE(QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(
-        &manager_));
-    EXPECT_FALSE(
-        QuicSentPacketManagerPeer::AdaptiveTimeThresholdEnabled(&manager_));
-    EXPECT_EQ(kDefaultLossDelayShift,
-              QuicSentPacketManagerPeer::GetReorderingShift(&manager_));
-  } else {
-    EXPECT_EQ(kNack, QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                         ->GetLossDetectionType());
-  }
+  EXPECT_TRUE(
+      QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(&manager_));
+  EXPECT_FALSE(
+      QuicSentPacketManagerPeer::AdaptiveTimeThresholdEnabled(&manager_));
+  EXPECT_EQ(kDefaultLossDelayShift,
+            QuicSentPacketManagerPeer::GetReorderingShift(&manager_));
 
   QuicConfig config;
   QuicTagVector options;
@@ -1825,9 +1784,6 @@
   EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
   manager_.SetFromConfig(config);
 
-  EXPECT_EQ(kIetfLossDetection,
-            QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                ->GetLossDetectionType());
   EXPECT_EQ(3, QuicSentPacketManagerPeer::GetReorderingShift(&manager_));
   EXPECT_FALSE(
       QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(&manager_));
@@ -1835,20 +1791,12 @@
 
 TEST_F(QuicSentPacketManagerTest,
        NegotiateIetfLossDetectionOneFourthRttFromOptions) {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    EXPECT_EQ(kIetfLossDetection,
-              QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                  ->GetLossDetectionType());
-    EXPECT_TRUE(QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(
-        &manager_));
-    EXPECT_FALSE(
-        QuicSentPacketManagerPeer::AdaptiveTimeThresholdEnabled(&manager_));
-    EXPECT_EQ(kDefaultLossDelayShift,
-              QuicSentPacketManagerPeer::GetReorderingShift(&manager_));
-  } else {
-    EXPECT_EQ(kNack, QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                         ->GetLossDetectionType());
-  }
+  EXPECT_TRUE(
+      QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(&manager_));
+  EXPECT_FALSE(
+      QuicSentPacketManagerPeer::AdaptiveTimeThresholdEnabled(&manager_));
+  EXPECT_EQ(kDefaultLossDelayShift,
+            QuicSentPacketManagerPeer::GetReorderingShift(&manager_));
 
   QuicConfig config;
   QuicTagVector options;
@@ -1858,9 +1806,6 @@
   EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
   manager_.SetFromConfig(config);
 
-  EXPECT_EQ(kIetfLossDetection,
-            QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                ->GetLossDetectionType());
   EXPECT_EQ(kDefaultLossDelayShift,
             QuicSentPacketManagerPeer::GetReorderingShift(&manager_));
   EXPECT_FALSE(
@@ -1869,22 +1814,12 @@
 
 TEST_F(QuicSentPacketManagerTest,
        NegotiateIetfLossDetectionAdaptiveReorderingThreshold) {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    EXPECT_EQ(kIetfLossDetection,
-              QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                  ->GetLossDetectionType());
-    EXPECT_TRUE(QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(
-        &manager_));
-    EXPECT_FALSE(
-        QuicSentPacketManagerPeer::AdaptiveTimeThresholdEnabled(&manager_));
-    EXPECT_EQ(kDefaultLossDelayShift,
-              QuicSentPacketManagerPeer::GetReorderingShift(&manager_));
-  } else {
-    EXPECT_EQ(kNack, QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                         ->GetLossDetectionType());
-    EXPECT_FALSE(QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(
-        &manager_));
-  }
+  EXPECT_TRUE(
+      QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(&manager_));
+  EXPECT_FALSE(
+      QuicSentPacketManagerPeer::AdaptiveTimeThresholdEnabled(&manager_));
+  EXPECT_EQ(kDefaultLossDelayShift,
+            QuicSentPacketManagerPeer::GetReorderingShift(&manager_));
 
   QuicConfig config;
   QuicTagVector options;
@@ -1894,9 +1829,6 @@
   EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
   manager_.SetFromConfig(config);
 
-  EXPECT_EQ(kIetfLossDetection,
-            QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                ->GetLossDetectionType());
   EXPECT_EQ(3, QuicSentPacketManagerPeer::GetReorderingShift(&manager_));
   EXPECT_TRUE(
       QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(&manager_));
@@ -1904,22 +1836,12 @@
 
 TEST_F(QuicSentPacketManagerTest,
        NegotiateIetfLossDetectionAdaptiveReorderingThreshold2) {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    EXPECT_EQ(kIetfLossDetection,
-              QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                  ->GetLossDetectionType());
-    EXPECT_TRUE(QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(
-        &manager_));
-    EXPECT_FALSE(
-        QuicSentPacketManagerPeer::AdaptiveTimeThresholdEnabled(&manager_));
-    EXPECT_EQ(kDefaultLossDelayShift,
-              QuicSentPacketManagerPeer::GetReorderingShift(&manager_));
-  } else {
-    EXPECT_EQ(kNack, QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                         ->GetLossDetectionType());
-    EXPECT_FALSE(QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(
-        &manager_));
-  }
+  EXPECT_TRUE(
+      QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(&manager_));
+  EXPECT_FALSE(
+      QuicSentPacketManagerPeer::AdaptiveTimeThresholdEnabled(&manager_));
+  EXPECT_EQ(kDefaultLossDelayShift,
+            QuicSentPacketManagerPeer::GetReorderingShift(&manager_));
 
   QuicConfig config;
   QuicTagVector options;
@@ -1928,9 +1850,6 @@
   EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
   EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
   manager_.SetFromConfig(config);
-  EXPECT_EQ(kIetfLossDetection,
-            QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                ->GetLossDetectionType());
   EXPECT_EQ(kDefaultLossDelayShift,
             QuicSentPacketManagerPeer::GetReorderingShift(&manager_));
   EXPECT_TRUE(
@@ -1939,24 +1858,12 @@
 
 TEST_F(QuicSentPacketManagerTest,
        NegotiateIetfLossDetectionAdaptiveReorderingAndTimeThreshold) {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    EXPECT_EQ(kIetfLossDetection,
-              QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                  ->GetLossDetectionType());
-    EXPECT_TRUE(QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(
-        &manager_));
-    EXPECT_FALSE(
-        QuicSentPacketManagerPeer::AdaptiveTimeThresholdEnabled(&manager_));
-    EXPECT_EQ(kDefaultLossDelayShift,
-              QuicSentPacketManagerPeer::GetReorderingShift(&manager_));
-  } else {
-    EXPECT_EQ(kNack, QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                         ->GetLossDetectionType());
-    EXPECT_FALSE(QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(
-        &manager_));
-    EXPECT_FALSE(
-        QuicSentPacketManagerPeer::AdaptiveTimeThresholdEnabled(&manager_));
-  }
+  EXPECT_TRUE(
+      QuicSentPacketManagerPeer::AdaptiveReorderingThresholdEnabled(&manager_));
+  EXPECT_FALSE(
+      QuicSentPacketManagerPeer::AdaptiveTimeThresholdEnabled(&manager_));
+  EXPECT_EQ(kDefaultLossDelayShift,
+            QuicSentPacketManagerPeer::GetReorderingShift(&manager_));
 
   QuicConfig config;
   QuicTagVector options;
@@ -1966,9 +1873,6 @@
   EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
   manager_.SetFromConfig(config);
 
-  EXPECT_EQ(kIetfLossDetection,
-            QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
-                ->GetLossDetectionType());
   EXPECT_EQ(kDefaultLossDelayShift,
             QuicSentPacketManagerPeer::GetReorderingShift(&manager_));
   EXPECT_TRUE(
diff --git a/quic/core/quic_types.h b/quic/core/quic_types.h
index 2c2c2d0..f096069 100644
--- a/quic/core/quic_types.h
+++ b/quic/core/quic_types.h
@@ -397,24 +397,6 @@
   kBBRv2,
 };
 
-enum LossDetectionType : uint8_t {
-  kNack,               // Used to mimic TCP's loss detection.
-  kTime,               // Time based loss detection.
-  kAdaptiveTime,       // Adaptive time based loss detection.
-  kLazyFack,           // Nack based but with FACK disabled for the first ack.
-  kIetfLossDetection,  // IETF style loss detection.
-};
-
-// TODO(fayang): Remove this when deprecating
-// quic_default_on_ietf_loss_detection.
-inline LossDetectionType GetDefaultLossDetectionType() {
-  if (GetQuicRestartFlag(quic_default_on_ietf_loss_detection)) {
-    QUIC_RESTART_FLAG_COUNT(quic_default_on_ietf_loss_detection);
-    return kIetfLossDetection;
-  }
-  return kNack;
-}
-
 // EncryptionLevel enumerates the stages of encryption that a QUIC connection
 // progresses through. When retransmitting a packet, the encryption level needs
 // to be specified so that it is retransmitted at a level which the peer can
diff --git a/quic/test_tools/quic_test_utils.h b/quic/test_tools/quic_test_utils.h
index 8eb117f..7ecac5b 100644
--- a/quic/test_tools/quic_test_utils.h
+++ b/quic/test_tools/quic_test_utils.h
@@ -969,7 +969,6 @@
   MockLossAlgorithm& operator=(const MockLossAlgorithm&) = delete;
   ~MockLossAlgorithm() override;
 
-  MOCK_CONST_METHOD0(GetLossDetectionType, LossDetectionType());
   MOCK_METHOD6(DetectLosses,
                void(const QuicUnackedPacketMap& unacked_packets,
                     QuicTime time,