| Index: net/quic/core/quic_protocol.h
|
| diff --git a/net/quic/core/quic_protocol.h b/net/quic/core/quic_protocol.h
|
| index 0ac0b334b5a0653ba252c2a73c98f739911055a5..bfe61f7c64f45f935fae7401e80c97f0f7eb006c 100644
|
| --- a/net/quic/core/quic_protocol.h
|
| +++ b/net/quic/core/quic_protocol.h
|
| @@ -387,13 +387,22 @@ static const QuicVersion kSupportedQuicVersions[] = {
|
| typedef std::vector<QuicVersion> QuicVersionVector;
|
|
|
| // Returns a vector of QUIC versions in kSupportedQuicVersions.
|
| -NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions();
|
| +NET_EXPORT_PRIVATE QuicVersionVector AllSupportedVersions();
|
| +
|
| +// Returns a vector of QUIC versions from kSupportedQuicVersions which exclude
|
| +// any versions which are disabled by flags.
|
| +NET_EXPORT_PRIVATE QuicVersionVector CurrentSupportedVersions();
|
|
|
| // Returns a vector of QUIC versions from |versions| which exclude any versions
|
| // which are disabled by flags.
|
| NET_EXPORT_PRIVATE QuicVersionVector
|
| FilterSupportedVersions(QuicVersionVector versions);
|
|
|
| +// Returns QUIC version of |index| in result of |versions|. Returns
|
| +// QUIC_VERSION_UNSUPPORTED if |index| is out of bounds.
|
| +NET_EXPORT_PRIVATE QuicVersionVector
|
| +VersionOfIndex(const QuicVersionVector& versions, int index);
|
| +
|
| // QuicTag is written to and read from the wire, but we prefer to use
|
| // the more readable QuicVersion at other levels.
|
| // Helper function which translates from a QuicVersion to a QuicTag. Returns 0
|
| @@ -1259,7 +1268,7 @@ typedef std::vector<QuicFrame> QuicFrames;
|
| class NET_EXPORT_PRIVATE QuicData {
|
| public:
|
| QuicData(const char* buffer, size_t length);
|
| - QuicData(char* buffer, size_t length, bool owns_buffer);
|
| + QuicData(const char* buffer, size_t length, bool owns_buffer);
|
| virtual ~QuicData();
|
|
|
| base::StringPiece AsStringPiece() const {
|
| @@ -1311,7 +1320,7 @@ class NET_EXPORT_PRIVATE QuicPacket : public QuicData {
|
| class NET_EXPORT_PRIVATE QuicEncryptedPacket : public QuicData {
|
| public:
|
| QuicEncryptedPacket(const char* buffer, size_t length);
|
| - QuicEncryptedPacket(char* buffer, size_t length, bool owns_buffer);
|
| + QuicEncryptedPacket(const char* buffer, size_t length, bool owns_buffer);
|
|
|
| // Clones the packet into a new packet which owns the buffer.
|
| QuicEncryptedPacket* Clone() const;
|
| @@ -1332,10 +1341,16 @@ class NET_EXPORT_PRIVATE QuicEncryptedPacket : public QuicData {
|
| class NET_EXPORT_PRIVATE QuicReceivedPacket : public QuicEncryptedPacket {
|
| public:
|
| QuicReceivedPacket(const char* buffer, size_t length, QuicTime receipt_time);
|
| - QuicReceivedPacket(char* buffer,
|
| + QuicReceivedPacket(const char* buffer,
|
| size_t length,
|
| QuicTime receipt_time,
|
| bool owns_buffer);
|
| + QuicReceivedPacket(const char* buffer,
|
| + size_t length,
|
| + QuicTime receipt_time,
|
| + bool owns_buffer,
|
| + int ttl,
|
| + bool ttl_valid);
|
|
|
| // Clones the packet into a new packet which owns the buffer.
|
| QuicReceivedPacket* Clone() const;
|
| @@ -1343,6 +1358,9 @@ class NET_EXPORT_PRIVATE QuicReceivedPacket : public QuicEncryptedPacket {
|
| // Returns the time at which the packet was received.
|
| QuicTime receipt_time() const { return receipt_time_; }
|
|
|
| + // This is the TTL of the packet, assuming ttl_vaild_ is true.
|
| + int ttl() const { return ttl_; }
|
| +
|
| // By default, gtest prints the raw bytes of an object. The bool data
|
| // member (in the base class QuicData) causes this object to have padding
|
| // bytes, which causes the default gtest object printer to read
|
| @@ -1353,6 +1371,7 @@ class NET_EXPORT_PRIVATE QuicReceivedPacket : public QuicEncryptedPacket {
|
|
|
| private:
|
| const QuicTime receipt_time_;
|
| + int ttl_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(QuicReceivedPacket);
|
| };
|
| @@ -1402,7 +1421,7 @@ class NET_EXPORT_PRIVATE QuicVersionManager {
|
| private:
|
| // FLAGS_quic_enable_version_35
|
| bool enable_quic_version_35_;
|
| - // FLAGS_quic_enable_version_36
|
| + // FLAGS_quic_enable_version_36_v2
|
| bool enable_quic_version_36_;
|
| // The list of versions that may be supported.
|
| QuicVersionVector allowed_supported_versions_;
|
|
|