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

Unified Diff: net/quic/quic_connection.h

Issue 17302002: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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_clock.h ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.h
diff --git a/net/quic/quic_connection.h b/net/quic/quic_connection.h
index 3f27461ed56e8226cc88d922b00a5e6ef6208bff..e7a72a3908071c4e9075a03f08588a005f02605c 100644
--- a/net/quic/quic_connection.h
+++ b/net/quic/quic_connection.h
@@ -16,6 +16,7 @@
#ifndef NET_QUIC_QUIC_CONNECTION_H_
#define NET_QUIC_QUIC_CONNECTION_H_
+#include <deque>
#include <list>
#include <map>
#include <queue>
@@ -511,7 +512,8 @@ class NET_EXPORT_PRIVATE QuicConnection
// Sends a version negotiation packet to the peer.
void SendVersionNegotiationPacket();
- void SetupRetransmission(QuicPacketSequenceNumber sequence_number);
+ void SetupRetransmission(QuicPacketSequenceNumber sequence_number,
+ EncryptionLevel level);
bool IsRetransmission(QuicPacketSequenceNumber sequence_number);
void SetupAbandonFecTimer(QuicPacketSequenceNumber sequence_number);
@@ -526,6 +528,13 @@ class NET_EXPORT_PRIVATE QuicConnection
// blocked when this is called.
bool WriteQueuedPackets();
+ // Queues |packet| in the hopes that it can be decrypted in the
+ // future, when a new key is installed.
+ void QueueUndecryptablePacket(const QuicEncryptedPacket& packet);
+
+ // Attempts to process any queued undecryptable packets.
+ void MaybeProcessUndecryptablePackets();
+
// If a packet can be revived from the current FEC group, then
// revive and process the packet.
void MaybeProcessRevivedPacket();
@@ -597,6 +606,12 @@ class NET_EXPORT_PRIVATE QuicConnection
// Ask: What should be the timeout for these packets?
UnackedPacketMap unacked_fec_packets_;
+ // Collection of packets which were received before encryption was
+ // established, but which could not be decrypted. We buffer these on
+ // the assumption that they could not be processed because they were
+ // sent with the INITIAL encryption and the CHLO message was lost.
+ std::deque<QuicEncryptedPacket*> undecryptable_packets_;
+
// Heap of packets that we might need to retransmit, and the time at
// which we should retransmit them. Every time a packet is sent it is added
// to this heap which is O(log(number of pending packets to be retransmitted))
« no previous file with comments | « net/quic/quic_clock.h ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698