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

Unified Diff: net/quic/core/quic_protocol.cc

Issue 2515613002: deprecate FLAGS_quic_disable_pre_34 (Closed)
Patch Set: Created 4 years, 1 month 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/core/quic_protocol.h ('k') | net/quic/core/quic_protocol_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_protocol.cc
diff --git a/net/quic/core/quic_protocol.cc b/net/quic/core/quic_protocol.cc
index eadd8102beccddd6e2c9c5e4b52386c11aaeef65..946ad05b69a3ed2fdd389a26770fc4c517c6a157 100644
--- a/net/quic/core/quic_protocol.cc
+++ b/net/quic/core/quic_protocol.cc
@@ -36,14 +36,12 @@ size_t GetPacketHeaderSize(QuicVersion version,
return kPublicFlagsSize + connection_id_length +
(include_version ? kQuicVersionSize : 0) +
(include_path_id ? kQuicPathIdSize : 0) + packet_number_length +
- (include_diversification_nonce ? kDiversificationNonceSize : 0) +
- (version <= QUIC_VERSION_33 ? kPrivateFlagsSize : 0);
+ (include_diversification_nonce ? kDiversificationNonceSize : 0);
}
size_t GetStartOfEncryptedData(QuicVersion version,
const QuicPacketHeader& header) {
- return GetPacketHeaderSize(version, header) -
- (version <= QUIC_VERSION_33 ? kPrivateFlagsSize : 0);
+ return GetPacketHeaderSize(version, header);
}
size_t GetStartOfEncryptedData(QuicVersion version,
@@ -55,8 +53,7 @@ size_t GetStartOfEncryptedData(QuicVersion version,
// Encryption starts before private flags.
return GetPacketHeaderSize(version, connection_id_length, include_version,
include_path_id, include_diversification_nonce,
- packet_number_length) -
- (version <= QUIC_VERSION_33 ? kPrivateFlagsSize : 0);
+ packet_number_length);
}
QuicPacketPublicHeader::QuicPacketPublicHeader()
@@ -74,17 +71,10 @@ QuicPacketPublicHeader::QuicPacketPublicHeader(
QuicPacketPublicHeader::~QuicPacketPublicHeader() {}
QuicPacketHeader::QuicPacketHeader()
- : packet_number(0),
- path_id(kDefaultPathId),
- entropy_flag(false),
- entropy_hash(0) {}
+ : packet_number(0), path_id(kDefaultPathId) {}
QuicPacketHeader::QuicPacketHeader(const QuicPacketPublicHeader& header)
- : public_header(header),
- packet_number(0),
- path_id(kDefaultPathId),
- entropy_flag(false),
- entropy_hash(0) {}
+ : public_header(header), packet_number(0), path_id(kDefaultPathId) {}
QuicPacketHeader::QuicPacketHeader(const QuicPacketHeader& other) = default;
@@ -185,9 +175,7 @@ ostream& operator<<(ostream& os, const QuicPacketHeader& header) {
<< QuicUtils::HexEncode(StringPiece(header.public_header.nonce->data(),
header.public_header.nonce->size()));
}
- os << ", entropy_flag: " << header.entropy_flag
- << ", entropy hash: " << static_cast<int>(header.entropy_hash)
- << ", path_id: " << static_cast<int>(header.path_id)
+ os << ", path_id: " << static_cast<int>(header.path_id)
<< ", packet_number: " << header.packet_number << " }\n";
return os;
}
@@ -195,26 +183,19 @@ ostream& operator<<(ostream& os, const QuicPacketHeader& header) {
bool IsAwaitingPacket(const QuicAckFrame& ack_frame,
QuicPacketNumber packet_number,
QuicPacketNumber peer_least_packet_awaiting_ack) {
- if (ack_frame.missing) {
- return packet_number > ack_frame.largest_observed ||
- ack_frame.packets.Contains(packet_number);
- }
return packet_number >= peer_least_packet_awaiting_ack &&
!ack_frame.packets.Contains(packet_number);
}
QuicStopWaitingFrame::QuicStopWaitingFrame()
- : path_id(kDefaultPathId), entropy_hash(0), least_unacked(0) {}
+ : path_id(kDefaultPathId), least_unacked(0) {}
QuicStopWaitingFrame::~QuicStopWaitingFrame() {}
QuicAckFrame::QuicAckFrame()
: largest_observed(0),
ack_delay_time(QuicTime::Delta::Infinite()),
- path_id(kDefaultPathId),
- entropy_hash(0),
- is_truncated(false),
- missing(true) {}
+ path_id(kDefaultPathId) {}
QuicAckFrame::QuicAckFrame(const QuicAckFrame& other) = default;
@@ -271,8 +252,7 @@ QuicFrame::QuicFrame(QuicPathCloseFrame* frame)
: type(PATH_CLOSE_FRAME), path_close_frame(frame) {}
ostream& operator<<(ostream& os, const QuicStopWaitingFrame& sent_info) {
- os << "{ entropy_hash: " << static_cast<int>(sent_info.entropy_hash)
- << ", least_unacked: " << sent_info.least_unacked << " }\n";
+ os << "{ least_unacked: " << sent_info.least_unacked << " }\n";
return os;
}
@@ -400,11 +380,9 @@ ostream& operator<<(ostream& os, const PacketNumberQueue& q) {
}
ostream& operator<<(ostream& os, const QuicAckFrame& ack_frame) {
- os << "{ entropy_hash: " << static_cast<int>(ack_frame.entropy_hash)
- << ", largest_observed: " << ack_frame.largest_observed
+ os << "{ largest_observed: " << ack_frame.largest_observed
<< ", ack_delay_time: " << ack_frame.ack_delay_time.ToMicroseconds()
<< ", packets: [ " << ack_frame.packets << " ]"
- << ", is_truncated: " << ack_frame.is_truncated
<< ", received_packets: [ ";
for (const std::pair<QuicPacketNumber, QuicTime>& p :
ack_frame.received_packet_times) {
@@ -642,8 +620,7 @@ StringPiece QuicPacket::Plaintext(QuicVersion version) const {
}
QuicVersionManager::QuicVersionManager(QuicVersionVector supported_versions)
- : disable_pre_34_(FLAGS_quic_disable_pre_34),
- enable_version_35_(FLAGS_quic_enable_version_35),
+ : enable_version_35_(FLAGS_quic_enable_version_35),
enable_version_36_(FLAGS_quic_enable_version_36_v2),
allowed_supported_versions_(supported_versions),
filtered_supported_versions_(
@@ -652,10 +629,8 @@ QuicVersionManager::QuicVersionManager(QuicVersionVector supported_versions)
QuicVersionManager::~QuicVersionManager() {}
const QuicVersionVector& QuicVersionManager::GetSupportedVersions() {
- if (disable_pre_34_ != FLAGS_quic_disable_pre_34 ||
- enable_version_35_ != FLAGS_quic_enable_version_35 ||
+ if (enable_version_35_ != FLAGS_quic_enable_version_35 ||
enable_version_36_ != FLAGS_quic_enable_version_36_v2) {
- disable_pre_34_ = FLAGS_quic_disable_pre_34;
enable_version_35_ = FLAGS_quic_enable_version_35;
enable_version_36_ = FLAGS_quic_enable_version_36_v2;
filtered_supported_versions_ =
@@ -680,7 +655,6 @@ SerializedPacket::SerializedPacket(QuicPathId path_id,
QuicPacketNumberLength packet_number_length,
const char* encrypted_buffer,
QuicPacketLength encrypted_length,
- QuicPacketEntropyHash entropy_hash,
bool has_ack,
bool has_stop_waiting)
: encrypted_buffer(encrypted_buffer),
@@ -691,7 +665,6 @@ SerializedPacket::SerializedPacket(QuicPathId path_id,
packet_number(packet_number),
packet_number_length(packet_number_length),
encryption_level(ENCRYPTION_NONE),
- entropy_hash(entropy_hash),
has_ack(has_ack),
has_stop_waiting(has_stop_waiting),
transmission_type(NOT_RETRANSMISSION),
« no previous file with comments | « net/quic/core/quic_protocol.h ('k') | net/quic/core/quic_protocol_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698