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

Unified Diff: net/quic/quic_connection.cc

Issue 1330973002: relnote: Refactor QuicAckFrame::missing_packets to support a change to a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Tidy_up_DLOG_messages_101773586
Patch Set: Created 5 years, 3 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 | « no previous file | net/quic/quic_connection_logger.cc » ('j') | net/quic/quic_connection_logger.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.cc
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index 73ffbc4219ee09493417f48b4ff591ba8c61b492..a5469596a32ad8b07c9eb5ccfd61f0fe9f061d4d 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -748,8 +748,8 @@ bool QuicConnection::OnAckFrame(const QuicAckFrame& incoming_ack) {
if (incoming_ack.is_truncated) {
should_last_packet_instigate_acks_ = true;
}
- if (!incoming_ack.missing_packets.empty() &&
- GetLeastUnacked() > *incoming_ack.missing_packets.begin()) {
+ if (!incoming_ack.missing_packets.Empty() &&
+ GetLeastUnacked() > incoming_ack.missing_packets.Min()) {
++stop_waiting_count_;
} else {
stop_waiting_count_ = 0;
@@ -833,20 +833,20 @@ bool QuicConnection::ValidateAckFrame(const QuicAckFrame& incoming_ack) {
return false;
}
- if (!incoming_ack.missing_packets.empty() &&
- *incoming_ack.missing_packets.rbegin() > incoming_ack.largest_observed) {
+ if (!incoming_ack.missing_packets.Empty() &&
+ incoming_ack.missing_packets.Max() > incoming_ack.largest_observed) {
DLOG(ERROR) << ENDPOINT << "Peer sent missing packet: "
- << *incoming_ack.missing_packets.rbegin()
+ << incoming_ack.missing_packets.Max()
<< " which is greater than largest observed: "
<< incoming_ack.largest_observed;
return false;
}
- if (!incoming_ack.missing_packets.empty() &&
- *incoming_ack.missing_packets.begin() <
+ if (!incoming_ack.missing_packets.Empty() &&
+ incoming_ack.missing_packets.Min() <
sent_packet_manager_.least_packet_awaited_by_peer()) {
DLOG(ERROR) << ENDPOINT << "Peer sent missing packet: "
- << *incoming_ack.missing_packets.begin()
+ << incoming_ack.missing_packets.Min()
<< " which is smaller than least_packet_awaited_by_peer_: "
<< sent_packet_manager_.least_packet_awaited_by_peer();
return false;
@@ -861,7 +861,7 @@ bool QuicConnection::ValidateAckFrame(const QuicAckFrame& incoming_ack) {
}
for (QuicPacketNumber revived_packet : incoming_ack.revived_packets) {
- if (!ContainsKey(incoming_ack.missing_packets, revived_packet)) {
+ if (!incoming_ack.missing_packets.Contains(revived_packet)) {
DLOG(ERROR) << ENDPOINT
<< "Peer specified revived packet which was not missing.";
return false;
@@ -1197,8 +1197,8 @@ void QuicConnection::UpdateStopWaitingCount() {
// If the peer is still waiting for a packet that we are no longer planning to
// send, send an ack to raise the high water mark.
- if (!last_ack_frames_.back().missing_packets.empty() &&
- GetLeastUnacked() > *last_ack_frames_.back().missing_packets.begin()) {
+ if (!last_ack_frames_.back().missing_packets.Empty() &&
+ GetLeastUnacked() > last_ack_frames_.back().missing_packets.Min()) {
++stop_waiting_count_;
} else {
stop_waiting_count_ = 0;
« no previous file with comments | « no previous file | net/quic/quic_connection_logger.cc » ('j') | net/quic/quic_connection_logger.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698