Index: net/quic/quic_packet_generator.cc |
diff --git a/net/quic/quic_packet_generator.cc b/net/quic/quic_packet_generator.cc |
index 75e1c5939f4b19e0bd24b6c0cabd0d6fc060adfc..f4b0243a9d9a7e92959db25be7c80c1224ed0c1d 100644 |
--- a/net/quic/quic_packet_generator.cc |
+++ b/net/quic/quic_packet_generator.cc |
@@ -6,7 +6,6 @@ |
#include "base/logging.h" |
#include "net/quic/quic_bug_tracker.h" |
-#include "net/quic/quic_fec_group.h" |
#include "net/quic/quic_flags.h" |
#include "net/quic/quic_utils.h" |
@@ -34,15 +33,6 @@ QuicPacketGenerator::~QuicPacketGenerator() { |
QuicUtils::DeleteFrames(&queued_control_frames_); |
} |
-void QuicPacketGenerator::OnCongestionWindowChange( |
- QuicPacketCount max_packets_in_flight) { |
- packet_creator_.OnCongestionWindowChange(max_packets_in_flight); |
-} |
- |
-void QuicPacketGenerator::OnRttChange(QuicTime::Delta rtt) { |
- packet_creator_.OnRttChange(rtt); |
-} |
- |
void QuicPacketGenerator::SetShouldSendAck(bool also_send_stop_waiting) { |
if (packet_creator_.has_ack()) { |
// Ack already queued, nothing to do. |
@@ -56,12 +46,12 @@ void QuicPacketGenerator::SetShouldSendAck(bool also_send_stop_waiting) { |
should_send_ack_ = true; |
should_send_stop_waiting_ = also_send_stop_waiting; |
- SendQueuedFrames(/*flush=*/false, /*is_fec_timeout=*/false); |
+ SendQueuedFrames(/*flush=*/false); |
} |
void QuicPacketGenerator::AddControlFrame(const QuicFrame& frame) { |
queued_control_frames_.push_back(frame); |
- SendQueuedFrames(/*flush=*/false, /*is_fec_timeout=*/false); |
+ SendQueuedFrames(/*flush=*/false); |
} |
QuicConsumedData QuicPacketGenerator::ConsumeData( |
@@ -69,14 +59,13 @@ QuicConsumedData QuicPacketGenerator::ConsumeData( |
QuicIOVector iov, |
QuicStreamOffset offset, |
bool fin, |
- FecProtection fec_protection, |
QuicAckListenerInterface* listener) { |
bool has_handshake = id == kCryptoStreamId; |
// To make reasoning about crypto frames easier, we don't combine them with |
// other retransmittable frames in a single packet. |
const bool flush = |
has_handshake && packet_creator_.HasPendingRetransmittableFrames(); |
- SendQueuedFrames(flush, /*is_fec_timeout=*/false); |
+ SendQueuedFrames(flush); |
size_t total_bytes_consumed = 0; |
bool fin_consumed = false; |
@@ -95,7 +84,7 @@ QuicConsumedData QuicPacketGenerator::ConsumeData( |
QuicFrame frame; |
if (!packet_creator_.ConsumeData(id, iov, total_bytes_consumed, |
offset + total_bytes_consumed, fin, |
- has_handshake, &frame, fec_protection)) { |
+ has_handshake, &frame)) { |
// The creator is always flushed if there's not enough room for a new |
// stream frame before ConsumeData, so ConsumeData should always succeed. |
QUIC_BUG << "Failed to ConsumeData, stream:" << id; |
@@ -113,9 +102,6 @@ QuicConsumedData QuicPacketGenerator::ConsumeData( |
(bytes_consumed > 0 && packet_creator_.HasPendingFrames())); |
if (!InBatchMode()) { |
- // TODO(rtenneti): remove MaybeSendFecPacketAndCloseGroup() from inside |
- // SerializeAndSendPacket() and make it an explicit call here (and |
- // elsewhere where we call SerializeAndSendPacket?). |
packet_creator_.Flush(); |
} |
@@ -131,14 +117,9 @@ QuicConsumedData QuicPacketGenerator::ConsumeData( |
// Don't allow the handshake to be bundled with other retransmittable frames. |
if (has_handshake) { |
- SendQueuedFrames(/*flush=*/true, /*is_fec_timeout=*/false); |
+ SendQueuedFrames(/*flush=*/true); |
} |
- // Try to close FEC group since we've either run out of data to send or we're |
- // blocked. |
- packet_creator_.MaybeSendFecPacketAndCloseGroup(/*force_send_fec=*/false, |
- /*is_fec_timeout=*/false); |
- |
DCHECK(InBatchMode() || !packet_creator_.HasPendingFrames()); |
return QuicConsumedData(total_bytes_consumed, fin_consumed); |
} |
@@ -182,7 +163,7 @@ bool QuicPacketGenerator::CanSendWithNextPendingFrameAddition() const { |
return delegate_->ShouldGeneratePacket(retransmittable, NOT_HANDSHAKE); |
} |
-void QuicPacketGenerator::SendQueuedFrames(bool flush, bool is_fec_timeout) { |
+void QuicPacketGenerator::SendQueuedFrames(bool flush) { |
// Only add pending frames if we are SURE we can then send the whole packet. |
while (HasPendingFrames() && |
(flush || CanSendWithNextPendingFrameAddition())) { |
@@ -191,23 +172,6 @@ void QuicPacketGenerator::SendQueuedFrames(bool flush, bool is_fec_timeout) { |
if (flush || !InBatchMode()) { |
packet_creator_.Flush(); |
} |
- packet_creator_.MaybeSendFecPacketAndCloseGroup(flush, is_fec_timeout); |
-} |
- |
-void QuicPacketGenerator::OnFecTimeout() { |
- DCHECK(!InBatchMode()); |
- if (!packet_creator_.ShouldSendFec(true)) { |
- QUIC_BUG << "No FEC packet to send on FEC timeout."; |
- return; |
- } |
- // Flush out any pending frames in the generator and the creator, and then |
- // send out FEC packet. |
- SendQueuedFrames(/*flush=*/true, /*is_fec_timeout=*/true); |
-} |
- |
-QuicTime::Delta QuicPacketGenerator::GetFecTimeout( |
- QuicPacketNumber packet_number) { |
- return packet_creator_.GetFecTimeout(packet_number); |
} |
bool QuicPacketGenerator::InBatchMode() { |
@@ -220,11 +184,11 @@ void QuicPacketGenerator::StartBatchOperations() { |
void QuicPacketGenerator::FinishBatchOperations() { |
batch_mode_ = false; |
- SendQueuedFrames(/*flush=*/false, /*is_fec_timeout=*/false); |
+ SendQueuedFrames(/*flush=*/false); |
} |
void QuicPacketGenerator::FlushAllQueuedFrames() { |
- SendQueuedFrames(/*flush=*/true, /*is_fec_timeout=*/false); |
+ SendQueuedFrames(/*flush=*/true); |
} |
bool QuicPacketGenerator::HasQueuedFrames() const { |
@@ -285,12 +249,9 @@ QuicByteCount QuicPacketGenerator::GetCurrentMaxPacketLength() const { |
void QuicPacketGenerator::SetMaxPacketLength(QuicByteCount length, bool force) { |
// If we cannot immediately set new maximum packet length, and the |force| |
- // flag is set, we have to flush the contents of the queue and close existing |
- // FEC group. |
+ // flag is set, we have to flush the contents of the queue. |
if (!packet_creator_.CanSetMaxPacketLength() && force) { |
- SendQueuedFrames(/*flush=*/true, /*is_fec_timeout=*/false); |
- packet_creator_.MaybeSendFecPacketAndCloseGroup(/*force_send_fec=*/true, |
- /*is_fec_timeout=*/false); |
+ SendQueuedFrames(/*flush=*/true); |
DCHECK(packet_creator_.CanSetMaxPacketLength()); |
} |
@@ -348,18 +309,4 @@ void QuicPacketGenerator::SetCurrentPath( |
max_packets_in_flight); |
} |
-void QuicPacketGenerator::set_rtt_multiplier_for_fec_timeout( |
- float rtt_multiplier_for_fec_timeout) { |
- packet_creator_.set_rtt_multiplier_for_fec_timeout( |
- rtt_multiplier_for_fec_timeout); |
-} |
- |
-FecSendPolicy QuicPacketGenerator::fec_send_policy() { |
- return packet_creator_.fec_send_policy(); |
-} |
- |
-void QuicPacketGenerator::set_fec_send_policy(FecSendPolicy fec_send_policy) { |
- packet_creator_.set_fec_send_policy(fec_send_policy); |
-} |
- |
} // namespace net |