| Index: net/quic/quic_unacked_packet_map.cc
|
| diff --git a/net/quic/quic_unacked_packet_map.cc b/net/quic/quic_unacked_packet_map.cc
|
| index 2a978f41af8913c1ab17347816ceafbd255a70d1..b89d73b98bbfcbad5100abe1eaf286cd3f1b76d8 100644
|
| --- a/net/quic/quic_unacked_packet_map.cc
|
| +++ b/net/quic/quic_unacked_packet_map.cc
|
| @@ -53,7 +53,8 @@ QuicUnackedPacketMap::TransmissionInfo::TransmissionInfo(
|
|
|
| QuicUnackedPacketMap::QuicUnackedPacketMap()
|
| : largest_sent_packet_(0),
|
| - bytes_in_flight_(0) {
|
| + bytes_in_flight_(0),
|
| + pending_crypto_packet_count_(0) {
|
| }
|
|
|
| QuicUnackedPacketMap::~QuicUnackedPacketMap() {
|
| @@ -84,6 +85,11 @@ void QuicUnackedPacketMap::AddPacket(
|
| TransmissionInfo(serialized_packet.retransmittable_frames,
|
| serialized_packet.sequence_number,
|
| serialized_packet.sequence_number_length);
|
| + if (serialized_packet.retransmittable_frames != NULL &&
|
| + serialized_packet.retransmittable_frames->HasCryptoHandshake()
|
| + == IS_HANDSHAKE) {
|
| + ++pending_crypto_packet_count_;
|
| + }
|
| }
|
|
|
| void QuicUnackedPacketMap::OnRetransmittedPacket(
|
| @@ -164,6 +170,10 @@ void QuicUnackedPacketMap::RemovePacket(
|
| delete transmission_info.all_transmissions;
|
| }
|
| if (transmission_info.retransmittable_frames != NULL) {
|
| + if (transmission_info.retransmittable_frames->HasCryptoHandshake()
|
| + == IS_HANDSHAKE) {
|
| + --pending_crypto_packet_count_;
|
| + }
|
| delete transmission_info.retransmittable_frames;
|
| }
|
| unacked_packets_.erase(it);
|
| @@ -279,6 +289,10 @@ bool QuicUnackedPacketMap::HasMultiplePendingPackets() const {
|
| return false;
|
| }
|
|
|
| +bool QuicUnackedPacketMap::HasPendingCryptoPackets() const {
|
| + return pending_crypto_packet_count_ > 0;
|
| +}
|
| +
|
| bool QuicUnackedPacketMap::HasUnackedRetransmittableFrames() const {
|
| for (UnackedPacketMap::const_reverse_iterator it =
|
| unacked_packets_.rbegin(); it != unacked_packets_.rend(); ++it) {
|
|
|