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

Unified Diff: net/quic/quic_unacked_packet_map.cc

Issue 188333003: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compilation error - added NET_EXPORT_PRIVATE to QuicFixedUint32 Created 6 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_unacked_packet_map.h ('k') | net/quic/reliable_quic_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c222ac91af966c666b3b9a32e3211fff3f7a9dbb..b89d73b98bbfcbad5100abe1eaf286cd3f1b76d8 100644
--- a/net/quic/quic_unacked_packet_map.cc
+++ b/net/quic/quic_unacked_packet_map.cc
@@ -13,8 +13,6 @@ using std::max;
namespace net {
-#define ENDPOINT (is_server_ ? "Server: " : " Client: ")
-
QuicUnackedPacketMap::TransmissionInfo::TransmissionInfo()
: retransmittable_frames(NULL),
sequence_number_length(PACKET_1BYTE_SEQUENCE_NUMBER),
@@ -53,10 +51,10 @@ QuicUnackedPacketMap::TransmissionInfo::TransmissionInfo(
all_transmissions->insert(sequence_number);
}
-QuicUnackedPacketMap::QuicUnackedPacketMap(bool is_server)
+QuicUnackedPacketMap::QuicUnackedPacketMap()
: largest_sent_packet_(0),
bytes_in_flight_(0),
- is_server_(is_server) {
+ pending_crypto_packet_count_(0) {
}
QuicUnackedPacketMap::~QuicUnackedPacketMap() {
@@ -87,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(
@@ -167,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);
@@ -282,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) {
« no previous file with comments | « net/quic/quic_unacked_packet_map.h ('k') | net/quic/reliable_quic_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698