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

Unified Diff: net/quic/core/quic_connection.cc

Issue 2709503004: Inline QUIC ack and stop waiting processing, because it's only called from one location each. (Closed)
Patch Set: Created 3 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/core/quic_connection.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_connection.cc
diff --git a/net/quic/core/quic_connection.cc b/net/quic/core/quic_connection.cc
index 7bb88eee08e0f31904453e1e4df855d6528a7b99..88d333122501d8d60462b37012d24f113b99c1c4 100644
--- a/net/quic/core/quic_connection.cc
+++ b/net/quic/core/quic_connection.cc
@@ -691,7 +691,13 @@ bool QuicConnection::OnAckFrame(const QuicAckFrame& incoming_ack) {
if (send_alarm_->IsSet()) {
send_alarm_->Cancel();
}
- ProcessAckFrame(incoming_ack);
+ largest_seen_packet_with_ack_ = last_header_.packet_number;
+ sent_packet_manager_.OnIncomingAck(incoming_ack,
+ time_of_last_received_packet_);
+ // Always reset the retransmission alarm when an ack comes in, since we now
+ // have a better estimate of the current rtt than when it was set.
+ SetRetransmissionAlarm();
+
// If the incoming ack's packets set expresses missing packets: peer is still
// waiting for a packet lower than a packet that we are no longer planning to
// send.
@@ -708,21 +714,6 @@ bool QuicConnection::OnAckFrame(const QuicAckFrame& incoming_ack) {
return connected_;
}
-void QuicConnection::ProcessAckFrame(const QuicAckFrame& incoming_ack) {
- largest_seen_packet_with_ack_ = last_header_.packet_number;
- sent_packet_manager_.OnIncomingAck(incoming_ack,
- time_of_last_received_packet_);
- // Always reset the retransmission alarm when an ack comes in, since we now
- // have a better estimate of the current rtt than when it was set.
- SetRetransmissionAlarm();
-}
-
-void QuicConnection::ProcessStopWaitingFrame(
- const QuicStopWaitingFrame& stop_waiting) {
- largest_seen_packet_with_stop_waiting_ = last_header_.packet_number;
- received_packet_manager_.UpdatePacketInformationSentByPeer(stop_waiting);
-}
-
bool QuicConnection::OnStopWaitingFrame(const QuicStopWaitingFrame& frame) {
DCHECK(connected_);
@@ -743,7 +734,8 @@ bool QuicConnection::OnStopWaitingFrame(const QuicStopWaitingFrame& frame) {
debug_visitor_->OnStopWaitingFrame(frame);
}
- ProcessStopWaitingFrame(frame);
+ largest_seen_packet_with_stop_waiting_ = last_header_.packet_number;
+ received_packet_manager_.UpdatePacketInformationSentByPeer(frame);
return connected_;
}
« no previous file with comments | « net/quic/core/quic_connection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698