Index: net/quic/core/quic_framer.h |
diff --git a/net/quic/core/quic_framer.h b/net/quic/core/quic_framer.h |
index 1f160f7c3c1d1593edd0609e91241acfac881627..0eb341a2f9fc2b0830c65fee697876d2afe1a3dd 100644 |
--- a/net/quic/core/quic_framer.h |
+++ b/net/quic/core/quic_framer.h |
@@ -46,8 +46,6 @@ const size_t kQuicMaxStreamOffsetSize = 8; |
// Number of bytes reserved to store payload length in stream frame. |
const size_t kQuicStreamPayloadLengthSize = 2; |
-// Size in bytes of the entropy hash sent in ack frames. |
-const size_t kQuicEntropyHashSize = 1; |
// Size in bytes reserved for the delta time of the largest observed |
// packet number in ack frames. |
const size_t kQuicDeltaTimeLargestObservedSize = 2; |
@@ -148,21 +146,6 @@ class NET_EXPORT_PRIVATE QuicFramerVisitorInterface { |
virtual void OnPacketComplete() = 0; |
}; |
-// This class calculates the received entropy of the ack packet being |
-// framed, should it get truncated. |
-class NET_EXPORT_PRIVATE QuicReceivedEntropyHashCalculatorInterface { |
- public: |
- virtual ~QuicReceivedEntropyHashCalculatorInterface() {} |
- |
- // When an ack frame gets truncated while being framed the received |
- // entropy of the ack frame needs to be calculated since the some of the |
- // missing packets are not added and the largest observed might be lowered. |
- // This should return the received entropy hash of the packets received up to |
- // and including |packet_number|. |
- virtual QuicPacketEntropyHash EntropyHash( |
- QuicPacketNumber packet_number) const = 0; |
-}; |
- |
// Class for parsing and constructing QUIC packets. It has a |
// QuicFramerVisitorInterface that is called when packets are parsed. |
class NET_EXPORT_PRIVATE QuicFramer { |
@@ -200,15 +183,6 @@ class NET_EXPORT_PRIVATE QuicFramer { |
quic_version_ = version; |
} |
- // Set entropy calculator to be called from the framer when it needs the |
- // entropy of a truncated ack frame. An entropy calculator must be set or else |
- // the framer will likely crash. If this is called multiple times, only the |
- // last calculator will be used. |
- void set_received_entropy_calculator( |
- QuicReceivedEntropyHashCalculatorInterface* entropy_calculator) { |
- entropy_calculator_ = entropy_calculator; |
- } |
- |
QuicErrorCode error() const { return error_; } |
// Pass a UDP packet into the framer for parsing. |
@@ -363,9 +337,6 @@ class NET_EXPORT_PRIVATE QuicFramer { |
Perspective perspective() const { return perspective_; } |
- static QuicPacketEntropyHash GetPacketEntropyHash( |
- const QuicPacketHeader& header); |
- |
// Called when a PATH_CLOSED frame has been sent/received on |path_id|. |
void OnPathClosed(QuicPathId path_id); |
@@ -376,28 +347,7 @@ class NET_EXPORT_PRIVATE QuicFramer { |
typedef std::map<QuicPacketNumber, uint8_t> NackRangeMap; |
- struct AckFrameInfo { |
- AckFrameInfo(); |
- AckFrameInfo(const AckFrameInfo& other); |
- ~AckFrameInfo(); |
- |
- // The maximum delta between ranges. |
- QuicPacketNumber max_delta; |
- // Nack ranges starting with start packet numbers and lengths. |
- NackRangeMap nack_ranges; |
- }; |
- |
- struct AckBlock { |
- AckBlock(uint8_t gap, QuicPacketNumber length); |
- AckBlock(const AckBlock& other); |
- ~AckBlock(); |
- |
- // Gap to the next ack block. |
- uint8_t gap; |
- // Length of this ack block. |
- QuicPacketNumber length; |
- }; |
- |
+ // TODO(rch): Rename this to remove "New" from the name here, and elsewhere. |
struct NewAckFrameInfo { |
NewAckFrameInfo(); |
NewAckFrameInfo(const NewAckFrameInfo& other); |
@@ -431,11 +381,6 @@ class NET_EXPORT_PRIVATE QuicFramer { |
bool ProcessUnauthenticatedHeader(QuicDataReader* encrypted_reader, |
QuicPacketHeader* header); |
- // Processes the authenticated portion of the header into |header| from |
- // the current QuicDataReader. Returns true on success, false on failure. |
- bool ProcessAuthenticatedHeader(QuicDataReader* reader, |
- QuicPacketHeader* header); |
- |
bool ProcessPathId(QuicDataReader* reader, QuicPathId* path_id); |
bool ProcessPacketSequenceNumber(QuicDataReader* reader, |
QuicPacketNumberLength packet_number_length, |
@@ -445,9 +390,6 @@ class NET_EXPORT_PRIVATE QuicFramer { |
bool ProcessStreamFrame(QuicDataReader* reader, |
uint8_t frame_type, |
QuicStreamFrame* frame); |
- bool ProcessAckFrame(QuicDataReader* reader, |
- uint8_t frame_type, |
- QuicAckFrame* frame); |
bool ProcessNewAckFrame(QuicDataReader* reader, |
uint8_t frame_type, |
QuicAckFrame* frame); |
@@ -495,7 +437,7 @@ class NET_EXPORT_PRIVATE QuicFramer { |
// Computes the wire size in bytes of time stamps in |ack|. |
size_t GetAckFrameTimeStampSize(const QuicAckFrame& ack); |
- // Computes the wire size in bytes of the |ack| frame, assuming no truncation. |
+ // Computes the wire size in bytes of the |ack| frame. |
size_t GetAckFrameSize(const QuicAckFrame& ack, |
QuicPacketNumberLength packet_number_length); |
@@ -522,16 +464,11 @@ class NET_EXPORT_PRIVATE QuicFramer { |
static uint8_t GetSequenceNumberFlags( |
QuicPacketNumberLength packet_number_length); |
- static AckFrameInfo GetAckFrameInfo(const QuicAckFrame& frame); |
- |
static NewAckFrameInfo GetNewAckFrameInfo(const QuicAckFrame& frame); |
// The Append* methods attempt to write the provided header or frame using the |
// |writer|, and return true if successful. |
- bool AppendAckFrameAndTypeByte(const QuicPacketHeader& header, |
- const QuicAckFrame& frame, |
- QuicDataWriter* builder); |
bool AppendNewAckFrameAndTypeByte(const QuicAckFrame& frame, |
QuicDataWriter* builder); |
bool AppendTimestampToAckFrame(const QuicAckFrame& frame, |
@@ -559,7 +496,6 @@ class NET_EXPORT_PRIVATE QuicFramer { |
std::string detailed_error_; |
QuicFramerVisitorInterface* visitor_; |
- QuicReceivedEntropyHashCalculatorInterface* entropy_calculator_; |
QuicErrorCode error_; |
// Set of closed paths. A path is considered as closed if a PATH_CLOSED frame |
// has been sent/received. |