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

Side by Side Diff: net/quic/quic_ack_notifier.h

Issue 880403006: Further cleanup to QuicAckNotifier and QuicAckNotifierManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Remove_unneeded_hash_set_84637544
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 unified diff | Download patch
« no previous file with comments | « no previous file | net/quic/quic_ack_notifier.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_QUIC_QUIC_ACK_NOTIFIER_H_ 5 #ifndef NET_QUIC_QUIC_ACK_NOTIFIER_H_
6 #define NET_QUIC_QUIC_ACK_NOTIFIER_H_ 6 #define NET_QUIC_QUIC_ACK_NOTIFIER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "net/quic/quic_protocol.h" 9 #include "net/quic/quic_protocol.h"
10 10
(...skipping 25 matching lines...) Expand all
36 virtual ~DelegateInterface(); 36 virtual ~DelegateInterface();
37 }; 37 };
38 38
39 // QuicAckNotifier is expected to keep its own reference to the delegate. 39 // QuicAckNotifier is expected to keep its own reference to the delegate.
40 explicit QuicAckNotifier(DelegateInterface* delegate); 40 explicit QuicAckNotifier(DelegateInterface* delegate);
41 virtual ~QuicAckNotifier(); 41 virtual ~QuicAckNotifier();
42 42
43 // Register a serialized packet the notifier should track. 43 // Register a serialized packet the notifier should track.
44 void OnSerializedPacket(); 44 void OnSerializedPacket();
45 45
46 // Called by the QuicConnection on receipt of new ACK frame, with the sequence 46 // Called on receipt of new ACK frame for an unacked packet.
47 // number referenced by the ACK frame. 47 // Decrements the number of unacked packets and if there are none left, calls
48 // Deletes the matching sequence number from the stored set of sequence 48 // the stored delegate's OnAckNotification method.
49 // numbers. If this set is now empty, call the stored delegate's
50 // OnAckNotification method.
51 // 49 //
52 // Returns true if the provided sequence_number caused the delegate to be 50 // Returns true if the delegate was called, false otherwise.
53 // called, false otherwise. 51 bool OnAck(QuicTime::Delta delta_largest_observed);
54 bool OnAck(QuicPacketSequenceNumber sequence_number,
55 QuicTime::Delta delta_largest_observed);
56 52
57 // Called when we've given up waiting for a sequence number, typically when 53 // Called when we've given up waiting for a sequence number, typically when
58 // the connection is torn down. 54 // the connection is torn down.
59 // Returns true if there are no more unacked packets being tracked. 55 // Returns true if there are no more unacked packets being tracked.
60 bool OnPacketAbandoned(); 56 bool OnPacketAbandoned();
61 57
62 bool HasUnackedPackets() const { return unacked_packets_ > 0; } 58 bool HasUnackedPackets() const { return unacked_packets_ > 0; }
63 59
64 // If a packet is retransmitted by the connection, it will be sent with a 60 // If a packet is retransmitted by the connection, it will be sent with a
65 // different sequence number. 61 // different sequence number.
(...skipping 12 matching lines...) Expand all
78 int retransmitted_packet_count_; 74 int retransmitted_packet_count_;
79 // Number of bytes that had to be retransmitted. 75 // Number of bytes that had to be retransmitted.
80 int retransmitted_byte_count_; 76 int retransmitted_byte_count_;
81 77
82 DISALLOW_COPY_AND_ASSIGN(QuicAckNotifier); 78 DISALLOW_COPY_AND_ASSIGN(QuicAckNotifier);
83 }; 79 };
84 80
85 } // namespace net 81 } // namespace net
86 82
87 #endif // NET_QUIC_QUIC_ACK_NOTIFIER_H_ 83 #endif // NET_QUIC_QUIC_ACK_NOTIFIER_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_ack_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698