OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/quic/quic_protocol.h" | 5 #include "net/quic/quic_protocol.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "net/quic/quic_flags.h" | 8 #include "net/quic/quic_flags.h" |
9 #include "net/quic/quic_utils.h" | 9 #include "net/quic/quic_utils.h" |
10 | 10 |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 : entropy_hash(0), | 234 : entropy_hash(0), |
235 least_unacked(0) { | 235 least_unacked(0) { |
236 } | 236 } |
237 | 237 |
238 QuicStopWaitingFrame::~QuicStopWaitingFrame() {} | 238 QuicStopWaitingFrame::~QuicStopWaitingFrame() {} |
239 | 239 |
240 QuicAckFrame::QuicAckFrame() | 240 QuicAckFrame::QuicAckFrame() |
241 : entropy_hash(0), | 241 : entropy_hash(0), |
242 is_truncated(false), | 242 is_truncated(false), |
243 largest_observed(0), | 243 largest_observed(0), |
244 delta_time_largest_observed(QuicTime::Delta::Infinite()) {} | 244 delta_time_largest_observed(QuicTime::Delta::Infinite()), |
| 245 latest_revived_packet(0) {} |
245 | 246 |
246 QuicAckFrame::~QuicAckFrame() {} | 247 QuicAckFrame::~QuicAckFrame() {} |
247 | 248 |
248 QuicRstStreamErrorCode AdjustErrorForVersion(QuicRstStreamErrorCode error_code, | 249 QuicRstStreamErrorCode AdjustErrorForVersion(QuicRstStreamErrorCode error_code, |
249 QuicVersion /*version*/) { | 250 QuicVersion /*version*/) { |
250 return error_code; | 251 return error_code; |
251 } | 252 } |
252 | 253 |
253 QuicRstStreamFrame::QuicRstStreamFrame() | 254 QuicRstStreamFrame::QuicRstStreamFrame() |
254 : stream_id(0), error_code(QUIC_STREAM_NO_ERROR), byte_offset(0) {} | 255 : stream_id(0), error_code(QUIC_STREAM_NO_ERROR), byte_offset(0) {} |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 } | 468 } |
468 return os; | 469 return os; |
469 } | 470 } |
470 | 471 |
471 ostream& operator<<(ostream& os, const QuicAckFrame& ack_frame) { | 472 ostream& operator<<(ostream& os, const QuicAckFrame& ack_frame) { |
472 os << "entropy_hash: " << static_cast<int>(ack_frame.entropy_hash) | 473 os << "entropy_hash: " << static_cast<int>(ack_frame.entropy_hash) |
473 << " largest_observed: " << ack_frame.largest_observed | 474 << " largest_observed: " << ack_frame.largest_observed |
474 << " delta_time_largest_observed: " | 475 << " delta_time_largest_observed: " |
475 << ack_frame.delta_time_largest_observed.ToMicroseconds() | 476 << ack_frame.delta_time_largest_observed.ToMicroseconds() |
476 << " missing_packets: [ " << ack_frame.missing_packets | 477 << " missing_packets: [ " << ack_frame.missing_packets |
477 << " ] is_truncated: " << ack_frame.is_truncated; | 478 << " ] is_truncated: " << ack_frame.is_truncated |
478 os << " revived_packets: [ "; | 479 << " revived_packet: " << ack_frame.latest_revived_packet |
479 for (PacketNumberSet::const_iterator it = ack_frame.revived_packets.begin(); | 480 << " received_packets: [ "; |
480 it != ack_frame.revived_packets.end(); ++it) { | |
481 os << *it << " "; | |
482 } | |
483 os << " ] received_packets: [ "; | |
484 for (const std::pair<QuicPacketNumber, QuicTime>& p : | 481 for (const std::pair<QuicPacketNumber, QuicTime>& p : |
485 ack_frame.received_packet_times) { | 482 ack_frame.received_packet_times) { |
486 os << p.first << " at " << p.second.ToDebuggingValue() << " "; | 483 os << p.first << " at " << p.second.ToDebuggingValue() << " "; |
487 } | 484 } |
488 os << " ]"; | 485 os << " ]"; |
489 return os; | 486 return os; |
490 } | 487 } |
491 | 488 |
492 ostream& operator<<(ostream& os, const QuicFrame& frame) { | 489 ostream& operator<<(ostream& os, const QuicFrame& frame) { |
493 switch (frame.type) { | 490 switch (frame.type) { |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 sent_time(sent_time), | 837 sent_time(sent_time), |
841 transmission_type(transmission_type), | 838 transmission_type(transmission_type), |
842 in_flight(false), | 839 in_flight(false), |
843 is_unackable(false), | 840 is_unackable(false), |
844 is_fec_packet(is_fec_packet), | 841 is_fec_packet(is_fec_packet), |
845 all_transmissions(nullptr) {} | 842 all_transmissions(nullptr) {} |
846 | 843 |
847 TransmissionInfo::~TransmissionInfo() {} | 844 TransmissionInfo::~TransmissionInfo() {} |
848 | 845 |
849 } // namespace net | 846 } // namespace net |
OLD | NEW |