| 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(
|
|
|