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

Unified Diff: net/quic/quic_connection.h

Issue 1814483002: Change QuicConnection's ScopedPacketBundler to use SEND_QUEUED_ACK instead of NO_ACK, to ensure a q… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@116589902
Patch Set: Created 4 years, 9 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.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.h
diff --git a/net/quic/quic_connection.h b/net/quic/quic_connection.h
index bf4e85cb2e489c071b22a20aae1c6880e81488a9..8de330bb81acd000d8f6f01eaeab2d5e65e81fd7 100644
--- a/net/quic/quic_connection.h
+++ b/net/quic/quic_connection.h
@@ -296,9 +296,12 @@ class NET_EXPORT_PRIVATE QuicConnection
public QuicSentPacketManager::NetworkChangeVisitor {
public:
enum AckBundling {
- NO_ACK = 0,
- SEND_ACK = 1,
- BUNDLE_PENDING_ACK = 2,
+ // Send an ack if it's already queued in the connection.
+ SEND_ACK_IF_QUEUED,
+ // Always send an ack.
+ SEND_ACK,
+ // Bundle an ack with outgoing data.
+ SEND_ACK_IF_PENDING,
};
enum AckMode { TCP_ACKING, ACK_DECIMATION, ACK_DECIMATION_WITH_REORDERING };
@@ -613,6 +616,8 @@ class NET_EXPORT_PRIVATE QuicConnection
~ScopedPacketBundler();
private:
+ bool ShouldSendAck(AckBundling ack_mode) const;
+
QuicConnection* connection_;
bool already_in_batch_mode_;
};
@@ -657,6 +662,8 @@ class NET_EXPORT_PRIVATE QuicConnection
return termination_packets_.get();
}
+ bool ack_queued() const { return ack_queued_; }
+
bool ack_frame_updated() const;
QuicConnectionHelperInterface* helper() { return helper_; }
@@ -847,7 +854,7 @@ class NET_EXPORT_PRIVATE QuicConnection
// True if the last packet has gotten far enough in the framer to be
// decrypted.
bool last_packet_decrypted_;
- QuicByteCount last_size_; // Size of the last received packet.
+ QuicByteCount last_size_; // Size of the last received packet.
// TODO(rch): remove this when b/27221014 is fixed.
const char* current_packet_data_; // UDP payload of packet currently being
// parsed or nullptr.
« no previous file with comments | « no previous file | net/quic/quic_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698