| Index: net/quic/quic_protocol.cc
|
| diff --git a/net/quic/quic_protocol.cc b/net/quic/quic_protocol.cc
|
| index 7de88d77abfbdbeacfcb7c1229bb71fd920033f2..60bd559a5a1d52d412041cfe08991b6db1b6ca44 100644
|
| --- a/net/quic/quic_protocol.cc
|
| +++ b/net/quic/quic_protocol.cc
|
| @@ -19,31 +19,20 @@ namespace net {
|
| const char* const kFinalOffsetHeaderKey = ":final-offset";
|
|
|
| size_t GetPacketHeaderSize(const QuicPacketHeader& header) {
|
| - return GetPacketHeaderSize(
|
| - header.public_header.connection_id_length,
|
| - header.public_header.version_flag, header.public_header.multipath_flag,
|
| - header.public_header.packet_number_length, header.is_in_fec_group);
|
| + return GetPacketHeaderSize(header.public_header.connection_id_length,
|
| + header.public_header.version_flag,
|
| + header.public_header.multipath_flag,
|
| + header.public_header.packet_number_length);
|
| }
|
|
|
| size_t GetPacketHeaderSize(QuicConnectionIdLength connection_id_length,
|
| bool include_version,
|
| bool include_path_id,
|
| - QuicPacketNumberLength packet_number_length,
|
| - InFecGroup is_in_fec_group) {
|
| + QuicPacketNumberLength packet_number_length) {
|
| return kPublicFlagsSize + connection_id_length +
|
| (include_version ? kQuicVersionSize : 0) +
|
| (include_path_id ? kQuicPathIdSize : 0) + packet_number_length +
|
| - kPrivateFlagsSize +
|
| - (is_in_fec_group == IN_FEC_GROUP ? kFecGroupSize : 0);
|
| -}
|
| -
|
| -size_t GetStartOfFecProtectedData(QuicConnectionIdLength connection_id_length,
|
| - bool include_version,
|
| - bool include_path_id,
|
| - QuicPacketNumberLength packet_number_length) {
|
| - return GetPacketHeaderSize(connection_id_length, include_version,
|
| - include_path_id, packet_number_length,
|
| - IN_FEC_GROUP);
|
| + kPrivateFlagsSize;
|
| }
|
|
|
| size_t GetStartOfEncryptedData(QuicConnectionIdLength connection_id_length,
|
| @@ -52,8 +41,7 @@ size_t GetStartOfEncryptedData(QuicConnectionIdLength connection_id_length,
|
| QuicPacketNumberLength packet_number_length) {
|
| // Don't include the fec size, since encryption starts before private flags.
|
| return GetPacketHeaderSize(connection_id_length, include_version,
|
| - include_path_id, packet_number_length,
|
| - NOT_IN_FEC_GROUP) -
|
| + include_path_id, packet_number_length) -
|
| kPrivateFlagsSize;
|
| }
|
|
|
| @@ -702,13 +690,6 @@ QuicEncryptedPacket::QuicEncryptedPacket(char* buffer,
|
| bool owns_buffer)
|
| : QuicData(buffer, length, owns_buffer) {}
|
|
|
| -StringPiece QuicPacket::FecProtectedData() const {
|
| - const size_t start_of_fec =
|
| - GetStartOfFecProtectedData(connection_id_length_, includes_version_,
|
| - includes_path_id_, packet_number_length_);
|
| - return StringPiece(data() + start_of_fec, length() - start_of_fec);
|
| -}
|
| -
|
| StringPiece QuicPacket::AssociatedData() const {
|
| return StringPiece(data(), GetStartOfEncryptedData(
|
| connection_id_length_, includes_version_,
|
|
|