Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(743)

Unified Diff: net/quic/quic_packet_generator.cc

Issue 1777423002: Remove max_packet_length from QuicPacketGenerator, because it is no longer necessary with FEC gone.… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@116277228
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_packet_generator.h ('k') | net/quic/quic_packet_generator_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_generator.cc
diff --git a/net/quic/quic_packet_generator.cc b/net/quic/quic_packet_generator.cc
index 992ebc582bd70c4a0e056768563108ff94f65769..908872e05503a09f3e3ee60b025e7022eae7953a 100644
--- a/net/quic/quic_packet_generator.cc
+++ b/net/quic/quic_packet_generator.cc
@@ -26,8 +26,7 @@ QuicPacketGenerator::QuicPacketGenerator(QuicConnectionId connection_id,
delegate),
batch_mode_(false),
should_send_ack_(false),
- should_send_stop_waiting_(false),
- max_packet_length_(kDefaultMaxPacketSize) {}
+ should_send_stop_waiting_(false) {}
QuicPacketGenerator::~QuicPacketGenerator() {
QuicUtils::DeleteFrames(&queued_control_frames_);
@@ -133,7 +132,7 @@ void QuicPacketGenerator::GenerateMtuDiscoveryPacket(
<< "frames needs to be sent.";
return;
}
- const QuicByteCount current_mtu = GetMaxPacketLength();
+ const QuicByteCount current_mtu = GetCurrentMaxPacketLength();
// The MTU discovery frame is allocated on the stack, since it is going to be
// serialized within this function.
@@ -243,19 +242,13 @@ QuicPacketNumber QuicPacketGenerator::packet_number() const {
return packet_creator_.packet_number();
}
-QuicByteCount QuicPacketGenerator::GetMaxPacketLength() const {
- return max_packet_length_;
-}
-
QuicByteCount QuicPacketGenerator::GetCurrentMaxPacketLength() const {
return packet_creator_.max_packet_length();
}
void QuicPacketGenerator::SetMaxPacketLength(QuicByteCount length) {
- max_packet_length_ = length;
- if (packet_creator_.CanSetMaxPacketLength()) {
- packet_creator_.SetMaxPacketLength(length);
- }
+ DCHECK(packet_creator_.CanSetMaxPacketLength());
+ packet_creator_.SetMaxPacketLength(length);
}
QuicEncryptedPacket* QuicPacketGenerator::SerializeVersionNegotiationPacket(
« no previous file with comments | « net/quic/quic_packet_generator.h ('k') | net/quic/quic_packet_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698