| Index: net/quic/quic_packet_creator.cc
|
| diff --git a/net/quic/quic_packet_creator.cc b/net/quic/quic_packet_creator.cc
|
| index 4ad38bb729556d47125f99de48c4170600e0effe..1c3a1a82725d54c632fea0918ee647ce32ff231b 100644
|
| --- a/net/quic/quic_packet_creator.cc
|
| +++ b/net/quic/quic_packet_creator.cc
|
| @@ -502,25 +502,16 @@ bool QuicPacketCreator::AddFrame(const QuicFrame& frame,
|
| }
|
|
|
| void QuicPacketCreator::MaybeAddPadding() {
|
| - if (BytesFree() == 0) {
|
| - // Don't pad full packets.
|
| + if (queued_retransmittable_frames_.get() == NULL) {
|
| return;
|
| }
|
| -
|
| - // If any of the frames in the current packet are on the crypto stream
|
| - // then they contain handshake messagses, and we should pad them.
|
| - bool is_handshake = false;
|
| - for (size_t i = 0; i < queued_frames_.size(); ++i) {
|
| - if (queued_frames_[i].type == STREAM_FRAME &&
|
| - queued_frames_[i].stream_frame->stream_id == kCryptoStreamId) {
|
| - is_handshake = true;
|
| - break;
|
| - }
|
| + if (!queued_retransmittable_frames_->HasCryptoHandshake()) {
|
| + return;
|
| }
|
| - if (!is_handshake) {
|
| + if (BytesFree() == 0) {
|
| + // Don't pad full packets.
|
| return;
|
| }
|
| -
|
| QuicPaddingFrame padding;
|
| bool success = AddFrame(QuicFrame(&padding), false);
|
| DCHECK(success);
|
|
|