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

Unified Diff: net/quic/quic_received_packet_manager.cc

Issue 157803006: Change the types of the arguments to two methods in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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_received_packet_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_received_packet_manager.cc
diff --git a/net/quic/quic_received_packet_manager.cc b/net/quic/quic_received_packet_manager.cc
index cea2b696f4d3a508dfd6702856ff3a44a179da96..2ebbd977f140f91c98e1e1a5d50bec9c0131943e 100644
--- a/net/quic/quic_received_packet_manager.cc
+++ b/net/quic/quic_received_packet_manager.cc
@@ -182,17 +182,15 @@ void QuicReceivedPacketManager::RecalculateEntropyHash(
}
void QuicReceivedPacketManager::UpdatePacketInformationReceivedByPeer(
- const QuicAckFrame& incoming_ack) {
+ const ReceivedPacketInfo& received_info) {
// ValidateAck should fail if largest_observed ever shrinks.
- DCHECK_LE(peer_largest_observed_packet_,
- incoming_ack.received_info.largest_observed);
- peer_largest_observed_packet_ = incoming_ack.received_info.largest_observed;
+ DCHECK_LE(peer_largest_observed_packet_, received_info.largest_observed);
+ peer_largest_observed_packet_ = received_info.largest_observed;
- if (incoming_ack.received_info.missing_packets.empty()) {
+ if (received_info.missing_packets.empty()) {
least_packet_awaited_by_peer_ = peer_largest_observed_packet_ + 1;
} else {
- least_packet_awaited_by_peer_ =
- *(incoming_ack.received_info.missing_packets.begin());
+ least_packet_awaited_by_peer_ = *(received_info.missing_packets.begin());
}
}
@@ -209,22 +207,19 @@ bool QuicReceivedPacketManager::DontWaitForPacketsBefore(
}
void QuicReceivedPacketManager::UpdatePacketInformationSentByPeer(
- const QuicAckFrame& incoming_ack) {
+ const SentPacketInfo& sent_info) {
// ValidateAck() should fail if peer_least_packet_awaiting_ack_ shrinks.
- DCHECK_LE(peer_least_packet_awaiting_ack_,
- incoming_ack.sent_info.least_unacked);
- if (incoming_ack.sent_info.least_unacked > peer_least_packet_awaiting_ack_) {
- bool missed_packets =
- DontWaitForPacketsBefore(incoming_ack.sent_info.least_unacked);
- if (missed_packets || incoming_ack.sent_info.least_unacked >
+ DCHECK_LE(peer_least_packet_awaiting_ack_, sent_info.least_unacked);
+ if (sent_info.least_unacked > peer_least_packet_awaiting_ack_) {
+ bool missed_packets = DontWaitForPacketsBefore(sent_info.least_unacked);
+ if (missed_packets || sent_info.least_unacked >
received_info_.largest_observed + 1) {
DVLOG(1) << "Updating entropy hashed since we missed packets";
// There were some missing packets that we won't ever get now. Recalculate
// the received entropy hash.
- RecalculateEntropyHash(incoming_ack.sent_info.least_unacked,
- incoming_ack.sent_info.entropy_hash);
+ RecalculateEntropyHash(sent_info.least_unacked, sent_info.entropy_hash);
}
- peer_least_packet_awaiting_ack_ = incoming_ack.sent_info.least_unacked;
+ peer_least_packet_awaiting_ack_ = sent_info.least_unacked;
}
DCHECK(received_info_.missing_packets.empty() ||
*received_info_.missing_packets.begin() >=
« no previous file with comments | « net/quic/quic_received_packet_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698