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

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

Issue 242593002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix. Use uint32 instead of int Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_test.cc ('k') | 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 12 matching lines...) Expand all
23 DelegateInterface(); 23 DelegateInterface();
24 // Args: 24 // Args:
25 // num_original_packets - Number of packets in the original transmission. 25 // num_original_packets - Number of packets in the original transmission.
26 // num_original_bytes - Number of packets in the original transmission. 26 // num_original_bytes - Number of packets in the original transmission.
27 // num_retransmitted_packets - Number of packets that had to be 27 // num_retransmitted_packets - Number of packets that had to be
28 // retransmitted. 28 // retransmitted.
29 // num_retransmitted_bytes - Number of bytes that had to be retransmitted. 29 // num_retransmitted_bytes - Number of bytes that had to be retransmitted.
30 virtual void OnAckNotification(int num_original_packets, 30 virtual void OnAckNotification(int num_original_packets,
31 int num_original_bytes, 31 int num_original_bytes,
32 int num_retransmitted_packets, 32 int num_retransmitted_packets,
33 int num_retransmitted_bytes) = 0; 33 int num_retransmitted_bytes,
34 QuicTime::Delta delta_largest_observed) = 0;
34 protected: 35 protected:
35 friend class base::RefCounted<DelegateInterface>; 36 friend class base::RefCounted<DelegateInterface>;
36 37
37 // Delegates are ref counted. 38 // Delegates are ref counted.
38 virtual ~DelegateInterface(); 39 virtual ~DelegateInterface();
39 }; 40 };
40 41
41 // QuicAckNotifier is expected to keep its own reference to the delegate. 42 // QuicAckNotifier is expected to keep its own reference to the delegate.
42 explicit QuicAckNotifier(DelegateInterface* delegate); 43 explicit QuicAckNotifier(DelegateInterface* delegate);
43 virtual ~QuicAckNotifier(); 44 virtual ~QuicAckNotifier();
44 45
45 // Register a sequence number that this AckNotifier should be interested in. 46 // Register a sequence number that this AckNotifier should be interested in.
46 void AddSequenceNumber(const QuicPacketSequenceNumber& sequence_number, 47 void AddSequenceNumber(const QuicPacketSequenceNumber& sequence_number,
47 int packet_payload_size); 48 int packet_payload_size);
48 49
49 // Called by the QuicConnection on receipt of new ACK frame, with the sequence 50 // Called by the QuicConnection on receipt of new ACK frame, with the sequence
50 // number referenced by the ACK frame. 51 // number referenced by the ACK frame.
51 // Deletes the matching sequence number from the stored set of sequence 52 // Deletes the matching sequence number from the stored set of sequence
52 // numbers. If this set is now empty, call the stored delegate's 53 // numbers. If this set is now empty, call the stored delegate's
53 // OnAckNotification method. 54 // OnAckNotification method.
54 // 55 //
55 // Returns true if the provided sequence_number caused the delegate to be 56 // Returns true if the provided sequence_number caused the delegate to be
56 // called, false otherwise. 57 // called, false otherwise.
57 bool OnAck(QuicPacketSequenceNumber sequence_number); 58 bool OnAck(QuicPacketSequenceNumber sequence_number,
59 QuicTime::Delta delta_largest_observed);
58 60
59 bool IsEmpty() { return sequence_numbers_.empty(); } 61 bool IsEmpty() { return sequence_numbers_.empty(); }
60 62
61 // If a packet is retransmitted by the connection it will be sent with a 63 // If a packet is retransmitted by the connection it will be sent with a
62 // different sequence number. Updates our internal set of sequence_numbers to 64 // different sequence number. Updates our internal set of sequence_numbers to
63 // track the latest number. 65 // track the latest number.
64 void UpdateSequenceNumber(QuicPacketSequenceNumber old_sequence_number, 66 void UpdateSequenceNumber(QuicPacketSequenceNumber old_sequence_number,
65 QuicPacketSequenceNumber new_sequence_number); 67 QuicPacketSequenceNumber new_sequence_number);
66 68
67 private: 69 private:
(...skipping 20 matching lines...) Expand all
88 int original_byte_count_; 90 int original_byte_count_;
89 // Number of packets that had to be retransmitted. 91 // Number of packets that had to be retransmitted.
90 int retransmitted_packet_count_; 92 int retransmitted_packet_count_;
91 // Number of bytes that had to be retransmitted. 93 // Number of bytes that had to be retransmitted.
92 int retransmitted_byte_count_; 94 int retransmitted_byte_count_;
93 }; 95 };
94 96
95 }; // namespace net 97 }; // namespace net
96 98
97 #endif // NET_QUIC_QUIC_ACK_NOTIFIER_H_ 99 #endif // NET_QUIC_QUIC_ACK_NOTIFIER_H_
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_test.cc ('k') | net/quic/quic_ack_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698