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

Unified Diff: net/quic/quic_ack_notifier.h

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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/crypto/strike_register_test.cc ('k') | net/quic/quic_ack_notifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_ack_notifier.h
diff --git a/net/quic/quic_ack_notifier.h b/net/quic/quic_ack_notifier.h
index 160108ed41f1a409ebb80c68cf42c7dd8fd8da9a..602d86fefb8024184d4e3436ade27cd89c53ddb4 100644
--- a/net/quic/quic_ack_notifier.h
+++ b/net/quic/quic_ack_notifier.h
@@ -40,22 +40,22 @@ class NET_EXPORT_PRIVATE QuicAckNotifier {
explicit QuicAckNotifier(DelegateInterface* delegate);
virtual ~QuicAckNotifier();
- // Register a sequence number that this AckNotifier should be interested in.
- void AddSequenceNumber(const QuicPacketSequenceNumber& sequence_number,
- int packet_payload_size);
-
- // Called by the QuicConnection on receipt of new ACK frame, with the sequence
- // number referenced by the ACK frame.
- // Deletes the matching sequence number from the stored set of sequence
- // numbers. If this set is now empty, call the stored delegate's
- // OnAckNotification method.
+ // Register a serialized packet the notifier should track.
+ void OnSerializedPacket();
+
+ // Called on receipt of new ACK frame for an unacked packet.
+ // Decrements the number of unacked packets and if there are none left, calls
+ // the stored delegate's OnAckNotification method.
//
- // Returns true if the provided sequence_number caused the delegate to be
- // called, false otherwise.
- bool OnAck(QuicPacketSequenceNumber sequence_number,
- QuicTime::Delta delta_largest_observed);
+ // Returns true if the delegate was called, false otherwise.
+ bool OnAck(QuicTime::Delta delta_largest_observed);
+
+ // Called when we've given up waiting for a sequence number, typically when
+ // the connection is torn down.
+ // Returns true if there are no more unacked packets being tracked.
+ bool OnPacketAbandoned();
- bool IsEmpty() { return unacked_packets_ == 0; }
+ bool HasUnackedPackets() const { return unacked_packets_ > 0; }
// If a packet is retransmitted by the connection, it will be sent with a
// different sequence number.
« no previous file with comments | « net/quic/crypto/strike_register_test.cc ('k') | net/quic/quic_ack_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698