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

Unified Diff: net/quic/quic_protocol.cc

Issue 1421853006: Landing Recent QUIC changes until: Fri Oct 30 22:23:58 2015 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 5 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/quic_protocol.h ('k') | net/quic/quic_received_packet_manager.cc » ('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 c241f4e91918fbd7937ea98568b37314bd063366..762523a41b02f72491a3cb1bf892290f87178f2a 100644
--- a/net/quic/quic_protocol.cc
+++ b/net/quic/quic_protocol.cc
@@ -142,6 +142,10 @@ QuicTag QuicVersionToQuicTag(const QuicVersion version) {
return MakeQuicTag('Q', '0', '2', '7');
case QUIC_VERSION_28:
return MakeQuicTag('Q', '0', '2', '8');
+ case QUIC_VERSION_29:
+ return MakeQuicTag('Q', '0', '2', '9');
+ case QUIC_VERSION_30:
+ return MakeQuicTag('Q', '0', '3', '0');
default:
// This shold be an ERROR because we should never attempt to convert an
// invalid QuicVersion to be written to the wire.
@@ -172,6 +176,8 @@ string QuicVersionToString(const QuicVersion version) {
RETURN_STRING_LITERAL(QUIC_VERSION_26);
RETURN_STRING_LITERAL(QUIC_VERSION_27);
RETURN_STRING_LITERAL(QUIC_VERSION_28);
+ RETURN_STRING_LITERAL(QUIC_VERSION_29);
+ RETURN_STRING_LITERAL(QUIC_VERSION_30);
default:
return "QUIC_VERSION_UNSUPPORTED";
}
@@ -235,7 +241,8 @@ QuicAckFrame::QuicAckFrame()
: entropy_hash(0),
is_truncated(false),
largest_observed(0),
- delta_time_largest_observed(QuicTime::Delta::Infinite()) {}
+ delta_time_largest_observed(QuicTime::Delta::Infinite()),
+ latest_revived_packet(0) {}
QuicAckFrame::~QuicAckFrame() {}
@@ -468,13 +475,9 @@ ostream& operator<<(ostream& os, const QuicAckFrame& ack_frame) {
<< " delta_time_largest_observed: "
<< ack_frame.delta_time_largest_observed.ToMicroseconds()
<< " missing_packets: [ " << ack_frame.missing_packets
- << " ] is_truncated: " << ack_frame.is_truncated;
- os << " revived_packets: [ ";
- for (PacketNumberSet::const_iterator it = ack_frame.revived_packets.begin();
- it != ack_frame.revived_packets.end(); ++it) {
- os << *it << " ";
- }
- os << " ] received_packets: [ ";
+ << " ] is_truncated: " << ack_frame.is_truncated
+ << " revived_packet: " << ack_frame.latest_revived_packet
+ << " received_packets: [ ";
for (const std::pair<QuicPacketNumber, QuicTime>& p :
ack_frame.received_packet_times) {
os << p.first << " at " << p.second.ToDebuggingValue() << " ";
@@ -775,6 +778,26 @@ SerializedPacket::SerializedPacket(
has_ack(has_ack),
has_stop_waiting(has_stop_waiting) {}
+SerializedPacket::SerializedPacket(
+ QuicPacketNumber packet_number,
+ QuicPacketNumberLength packet_number_length,
+ char* encrypted_buffer,
+ size_t encrypted_length,
+ bool owns_buffer,
+ QuicPacketEntropyHash entropy_hash,
+ RetransmittableFrames* retransmittable_frames,
+ bool has_ack,
+ bool has_stop_waiting)
+ : SerializedPacket(packet_number,
+ packet_number_length,
+ new QuicEncryptedPacket(encrypted_buffer,
+ encrypted_length,
+ owns_buffer),
+ entropy_hash,
+ retransmittable_frames,
+ has_ack,
+ has_stop_waiting) {}
+
SerializedPacket::~SerializedPacket() {}
QuicEncryptedPacket* QuicEncryptedPacket::Clone() const {
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_received_packet_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698