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

Unified Diff: net/quic/quic_protocol.cc

Issue 424003002: Inline the members of QUIC's ReceivedPacketInfo into QuicAckFrame now (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_FixRate_congestion_type_71746617
Patch Set: Created 6 years, 5 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_protocol_test.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 b9acec1243cf5af8779636289da67fefab6ddddb..3d5d2179f8df0d192259cd16902bccc455013cef 100644
--- a/net/quic/quic_protocol.cc
+++ b/net/quic/quic_protocol.cc
@@ -238,25 +238,17 @@ ostream& operator<<(ostream& os, const QuicPacketHeader& header) {
return os;
}
-ReceivedPacketInfo::ReceivedPacketInfo()
- : entropy_hash(0),
- largest_observed(0),
- delta_time_largest_observed(QuicTime::Delta::Infinite()),
- is_truncated(false) {}
-
-ReceivedPacketInfo::~ReceivedPacketInfo() {}
-
-bool IsAwaitingPacket(const ReceivedPacketInfo& received_info,
+bool IsAwaitingPacket(const QuicAckFrame& ack_frame,
QuicPacketSequenceNumber sequence_number) {
- return sequence_number > received_info.largest_observed ||
- ContainsKey(received_info.missing_packets, sequence_number);
+ return sequence_number > ack_frame.largest_observed ||
+ ContainsKey(ack_frame.missing_packets, sequence_number);
}
-void InsertMissingPacketsBetween(ReceivedPacketInfo* received_info,
+void InsertMissingPacketsBetween(QuicAckFrame* ack_frame,
QuicPacketSequenceNumber lower,
QuicPacketSequenceNumber higher) {
for (QuicPacketSequenceNumber i = lower; i < higher; ++i) {
- received_info->missing_packets.insert(i);
+ ack_frame->missing_packets.insert(i);
}
}
@@ -267,7 +259,13 @@ QuicStopWaitingFrame::QuicStopWaitingFrame()
QuicStopWaitingFrame::~QuicStopWaitingFrame() {}
-QuicAckFrame::QuicAckFrame() {}
+QuicAckFrame::QuicAckFrame()
+ : entropy_hash(0),
+ largest_observed(0),
+ delta_time_largest_observed(QuicTime::Delta::Infinite()),
+ is_truncated(false) {}
+
+QuicAckFrame::~QuicAckFrame() {}
CongestionFeedbackMessageTCP::CongestionFeedbackMessageTCP()
: receive_window(0) {
@@ -381,22 +379,20 @@ ostream& operator<<(ostream& os, const QuicStopWaitingFrame& sent_info) {
return os;
}
-ostream& operator<<(ostream& os, const ReceivedPacketInfo& received_info) {
- os << "entropy_hash: " << static_cast<int>(received_info.entropy_hash)
- << " is_truncated: " << received_info.is_truncated
- << " largest_observed: " << received_info.largest_observed
+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: "
- << received_info.delta_time_largest_observed.ToMicroseconds()
+ << ack_frame.delta_time_largest_observed.ToMicroseconds()
<< " missing_packets: [ ";
- for (SequenceNumberSet::const_iterator it =
- received_info.missing_packets.begin();
- it != received_info.missing_packets.end(); ++it) {
+ for (SequenceNumberSet::const_iterator it = ack_frame.missing_packets.begin();
+ it != ack_frame.missing_packets.end(); ++it) {
os << *it << " ";
}
os << " ] revived_packets: [ ";
- for (SequenceNumberSet::const_iterator it =
- received_info.revived_packets.begin();
- it != received_info.revived_packets.end(); ++it) {
+ for (SequenceNumberSet::const_iterator it = ack_frame.revived_packets.begin();
+ it != ack_frame.revived_packets.end(); ++it) {
os << *it << " ";
}
os << " ]";
@@ -498,11 +494,6 @@ ostream& operator<<(ostream& os, const QuicStreamFrame& stream_frame) {
return os;
}
-ostream& operator<<(ostream& os, const QuicAckFrame& ack_frame) {
- os << "received info { " << ack_frame.received_info << " }\n";
- return os;
-}
-
ostream& operator<<(ostream& os,
const QuicCongestionFeedbackFrame& congestion_frame) {
os << "type: " << congestion_frame.type;
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_protocol_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698