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

Unified Diff: net/quic/quic_protocol.h

Issue 1918953003: Landing Recent QUIC changes until 4/22/2016 14:55 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deleted SpdyFramerTests missed while mergeing 120451808 Created 4 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
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_protocol.h
diff --git a/net/quic/quic_protocol.h b/net/quic/quic_protocol.h
index 9f2936481a2563a68291422faf324b8ed7c20aa7..4d4c051213bc39f5d3ef729645320d5f611d15b8 100644
--- a/net/quic/quic_protocol.h
+++ b/net/quic/quic_protocol.h
@@ -766,7 +766,15 @@ enum QuicVersionNegotiationState {
typedef QuicPacketPublicHeader QuicVersionNegotiationPacket;
// A padding frame contains no payload.
-struct NET_EXPORT_PRIVATE QuicPaddingFrame {};
+struct NET_EXPORT_PRIVATE QuicPaddingFrame {
+ QuicPaddingFrame() : num_padding_bytes(-1) {}
+ explicit QuicPaddingFrame(int num_padding_bytes)
+ : num_padding_bytes(num_padding_bytes) {}
+
+ // -1: full padding to the end of a max-sized packet
+ // otherwise: only pad up to num_padding_bytes bytes
+ int num_padding_bytes;
+};
// A ping frame contains no payload, though it is retransmittable,
// and ACK'd just like other normal frames.
@@ -1357,7 +1365,10 @@ struct NET_EXPORT_PRIVATE SerializedPacket {
QuicPacketLength encrypted_length;
QuicFrames retransmittable_frames;
IsHandshake has_crypto_handshake;
- bool needs_padding;
+ // -1: full padding to the end of a max-sized packet
+ // 0: no padding
+ // otherwise: only pad up to num_padding_bytes bytes
+ int num_padding_bytes;
QuicPathId path_id;
QuicPacketNumber packet_number;
QuicPacketNumberLength packet_number_length;
@@ -1384,7 +1395,7 @@ struct NET_EXPORT_PRIVATE TransmissionInfo {
QuicTime sent_time,
QuicPacketLength bytes_sent,
bool has_crypto_handshake,
- bool needs_padding);
+ int num_padding_bytes);
TransmissionInfo(const TransmissionInfo& other);
@@ -1404,8 +1415,8 @@ struct NET_EXPORT_PRIVATE TransmissionInfo {
bool is_unackable;
// True if the packet contains stream data from the crypto stream.
bool has_crypto_handshake;
- // True if the packet needs padding if it's retransmitted.
- bool needs_padding;
+ // Non-zero if the packet needs padding if it's retransmitted.
+ int num_padding_bytes;
// Stores the packet number of the next retransmission of this packet.
// Zero if the packet has not been retransmitted.
QuicPacketNumber retransmission;
@@ -1420,7 +1431,7 @@ struct PendingRetransmission {
TransmissionType transmission_type,
const QuicFrames& retransmittable_frames,
bool has_crypto_handshake,
- bool needs_padding,
+ int num_padding_bytes,
EncryptionLevel encryption_level,
QuicPacketNumberLength packet_number_length)
: packet_number(packet_number),
@@ -1428,7 +1439,7 @@ struct PendingRetransmission {
transmission_type(transmission_type),
path_id(path_id),
has_crypto_handshake(has_crypto_handshake),
- needs_padding(needs_padding),
+ num_padding_bytes(num_padding_bytes),
encryption_level(encryption_level),
packet_number_length(packet_number_length) {}
@@ -1437,7 +1448,7 @@ struct PendingRetransmission {
TransmissionType transmission_type;
QuicPathId path_id;
bool has_crypto_handshake;
- bool needs_padding;
+ int num_padding_bytes;
EncryptionLevel encryption_level;
QuicPacketNumberLength packet_number_length;
};
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698