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

Unified Diff: net/quic/quic_protocol.cc

Issue 478153003: Change the wire format of the ack frame to include a compressed version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase TOT and pass clock to QuicTestPacketMaker and use it in AckPacket Created 6 years, 4 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_protocol.h ('k') | net/quic/quic_received_packet_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_protocol.cc
diff --git a/net/quic/quic_protocol.cc b/net/quic/quic_protocol.cc
index 66925ba1a15e041c59f5b894265ba80da63835fa..314f0ff43b6d65c60400522b7d99ac9016c62d04 100644
--- a/net/quic/quic_protocol.cc
+++ b/net/quic/quic_protocol.cc
@@ -171,6 +171,8 @@ QuicTag QuicVersionToQuicTag(const QuicVersion version) {
return MakeQuicTag('Q', '0', '2', '1');
case QUIC_VERSION_22:
return MakeQuicTag('Q', '0', '2', '2');
+ case QUIC_VERSION_23:
+ return MakeQuicTag('Q', '0', '2', '3');
default:
// This shold be an ERROR because we should never attempt to convert an
// invalid QuicVersion to be written to the wire.
@@ -203,6 +205,7 @@ string QuicVersionToString(const QuicVersion version) {
RETURN_STRING_LITERAL(QUIC_VERSION_20);
RETURN_STRING_LITERAL(QUIC_VERSION_21);
RETURN_STRING_LITERAL(QUIC_VERSION_22);
+ RETURN_STRING_LITERAL(QUIC_VERSION_23);
default:
return "QUIC_VERSION_UNSUPPORTED";
}
@@ -274,11 +277,6 @@ CongestionFeedbackMessageTCP::CongestionFeedbackMessageTCP()
: receive_window(0) {
}
-CongestionFeedbackMessageTimestamp::CongestionFeedbackMessageTimestamp() {
-}
-
-CongestionFeedbackMessageTimestamp::~CongestionFeedbackMessageTimestamp() {}
-
QuicCongestionFeedbackFrame::QuicCongestionFeedbackFrame() : type(kTCP) {}
QuicCongestionFeedbackFrame::~QuicCongestionFeedbackFrame() {}
@@ -383,7 +381,6 @@ ostream& operator<<(ostream& os, const QuicStopWaitingFrame& sent_info) {
ostream& operator<<(ostream& os, const QuicAckFrame& ack_frame) {
os << "entropy_hash: " << static_cast<int>(ack_frame.entropy_hash)
- << " is_truncated: " << ack_frame.is_truncated
<< " largest_observed: " << ack_frame.largest_observed
<< " delta_time_largest_observed: "
<< ack_frame.delta_time_largest_observed.ToMicroseconds()
@@ -392,11 +389,18 @@ ostream& operator<<(ostream& os, const QuicAckFrame& ack_frame) {
it != ack_frame.missing_packets.end(); ++it) {
os << *it << " ";
}
- os << " ] revived_packets: [ ";
+ os << " ] is_truncated: " << ack_frame.is_truncated;
+ os << " revived_packets: [ ";
for (SequenceNumberSet::const_iterator it = ack_frame.revived_packets.begin();
it != ack_frame.revived_packets.end(); ++it) {
os << *it << " ";
}
+ os << " ] received_packets: [ ";
+ for (PacketTimeList::const_iterator it =
+ ack_frame.received_packet_times.begin();
+ it != ack_frame.received_packet_times.end(); ++it) {
+ os << it->first << " at " << it->second.ToDebuggingValue() << " ";
+ }
os << " ]";
return os;
}
@@ -504,17 +508,6 @@ ostream& operator<<(ostream& os,
const QuicCongestionFeedbackFrame& congestion_frame) {
os << "type: " << congestion_frame.type;
switch (congestion_frame.type) {
- case kTimestamp: {
- const CongestionFeedbackMessageTimestamp& timestamp =
- congestion_frame.timestamp;
- os << " received packets: [ ";
- for (TimeMap::const_iterator it = timestamp.received_packet_times.begin();
- it != timestamp.received_packet_times.end(); ++it) {
- os << it->first << "@" << it->second.ToDebuggingValue() << " ";
- }
- os << "]";
- break;
- }
case kTCP: {
const CongestionFeedbackMessageTCP& tcp = congestion_frame.tcp;
os << " receive_window: " << tcp.receive_window;
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_received_packet_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698