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

Unified Diff: net/quic/quic_protocol.h

Issue 14083012: QUIC: retransmit packets with the correct encryption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved HandshakeMode enum to MockCryptoClientStream Created 7 years, 8 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
Index: net/quic/quic_protocol.h
diff --git a/net/quic/quic_protocol.h b/net/quic/quic_protocol.h
index d4f23ded364300a31c439470a5c443e3263c9c27..a48cba75b2b3838aeaa72e3e3bc215549f9fea01 100644
--- a/net/quic/quic_protocol.h
+++ b/net/quic/quic_protocol.h
@@ -461,6 +461,18 @@ struct NET_EXPORT_PRIVATE QuicGoAwayFrame {
std::string reason_phrase;
};
+// EncryptionLevel enumerates the stages of encryption that a QUIC connection
+// progresses through. When retransmitting a packet, the encryption level needs
+// to be specified so that it is retransmitted at a level which the peer can
+// understand.
+enum EncryptionLevel {
+ ENCRYPTION_NONE = 0,
+ ENCRYPTION_INITIAL = 1,
+ ENCRYPTION_FORWARD_SECURE = 2,
+
+ NUM_ENCRYPTION_LEVELS,
+};
+
struct NET_EXPORT_PRIVATE QuicFrame {
QuicFrame() {}
explicit QuicFrame(QuicPaddingFrame* padding_frame)
@@ -628,8 +640,14 @@ class NET_EXPORT_PRIVATE RetransmittableFrames {
const QuicFrame& AddNonStreamFrame(const QuicFrame& frame);
const QuicFrames& frames() const { return frames_; }
+ void set_encryption_level(EncryptionLevel level);
+ EncryptionLevel encryption_level() const {
+ return encryption_level_;
+ }
+
private:
QuicFrames frames_;
+ EncryptionLevel encryption_level_;
// Data referenced by the StringPiece of a QuicStreamFrame.
std::vector<std::string*> stream_data_;

Powered by Google App Engine
This is Rietveld 408576698