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

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

Issue 607983002: Merge QuicSentPacketManager::DebugDelegate's OnSentPacket, (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Remove_OnPacketRetransmitted_76084748
Patch Set: Created 6 years, 2 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_sent_packet_manager.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_SENT_PACKET_MANAGER_H_ 5 #ifndef NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_
6 #define NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ 6 #define NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 class NET_EXPORT_PRIVATE DebugDelegate { 45 class NET_EXPORT_PRIVATE DebugDelegate {
46 public: 46 public:
47 virtual ~DebugDelegate() {} 47 virtual ~DebugDelegate() {}
48 48
49 // Called when a spurious retransmission is detected. 49 // Called when a spurious retransmission is detected.
50 virtual void OnSpuriousPacketRetransmition( 50 virtual void OnSpuriousPacketRetransmition(
51 TransmissionType transmission_type, 51 TransmissionType transmission_type,
52 QuicByteCount byte_size) {} 52 QuicByteCount byte_size) {}
53 53
54 virtual void OnSentPacket( 54 virtual void OnSentPacket(
55 QuicPacketSequenceNumber sequence_number, 55 const SerializedPacket& packet,
56 QuicPacketSequenceNumber original_sequence_number,
56 QuicTime sent_time, 57 QuicTime sent_time,
57 QuicByteCount bytes, 58 QuicByteCount bytes,
58 TransmissionType transmission_type) {} 59 TransmissionType transmission_type) {}
59 60
60 virtual void OnRetransmittedPacket(
61 QuicPacketSequenceNumber old_sequence_number,
62 QuicPacketSequenceNumber new_sequence_number,
63 TransmissionType transmission_type,
64 QuicTime time) {}
65
66 virtual void OnIncomingAck( 61 virtual void OnIncomingAck(
67 const QuicAckFrame& ack_frame, 62 const QuicAckFrame& ack_frame,
68 QuicTime ack_receive_time, 63 QuicTime ack_receive_time,
69 QuicPacketSequenceNumber largest_observed, 64 QuicPacketSequenceNumber largest_observed,
70 bool largest_observed_acked, 65 bool largest_observed_acked,
71 QuicPacketSequenceNumber least_unacked_sent_packet) {} 66 QuicPacketSequenceNumber least_unacked_sent_packet) {}
72
73 virtual void OnSerializedPacket(
74 const SerializedPacket& packet) {}
75 }; 67 };
76 68
77 // Interface which gets callbacks from the QuicSentPacketManager when 69 // Interface which gets callbacks from the QuicSentPacketManager when
78 // network-related state changes. Implementations must not mutate the 70 // network-related state changes. Implementations must not mutate the
79 // state of the packet manager as a result of these callbacks. 71 // state of the packet manager as a result of these callbacks.
80 class NET_EXPORT_PRIVATE NetworkChangeVisitor { 72 class NET_EXPORT_PRIVATE NetworkChangeVisitor {
81 public: 73 public:
82 virtual ~NetworkChangeVisitor() {} 74 virtual ~NetworkChangeVisitor() {}
83 75
84 // Called when congestion window may have changed. 76 // Called when congestion window may have changed.
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // Retransmission of handshake packets prior to handshake completion. 242 // Retransmission of handshake packets prior to handshake completion.
251 HANDSHAKE_MODE, 243 HANDSHAKE_MODE,
252 // Re-invoke the loss detection when a packet is not acked before the 244 // Re-invoke the loss detection when a packet is not acked before the
253 // loss detection algorithm expects. 245 // loss detection algorithm expects.
254 LOSS_MODE, 246 LOSS_MODE,
255 }; 247 };
256 248
257 typedef linked_hash_map<QuicPacketSequenceNumber, 249 typedef linked_hash_map<QuicPacketSequenceNumber,
258 TransmissionType> PendingRetransmissionMap; 250 TransmissionType> PendingRetransmissionMap;
259 251
260 // Called when a new packet is serialized. If the packet contains
261 // retransmittable data, it will be added to the unacked packet map.
262 void OnSerializedPacket(const SerializedPacket& serialized_packet);
263
264 // Called when a packet is retransmitted with a new sequence number. 252 // Called when a packet is retransmitted with a new sequence number.
265 // Replaces the old entry in the unacked packet map with the new 253 // Replaces the old entry in the unacked packet map with the new
266 // sequence number. 254 // sequence number.
267 void OnRetransmittedPacket(QuicPacketSequenceNumber old_sequence_number, 255 void OnRetransmittedPacket(QuicPacketSequenceNumber old_sequence_number,
268 QuicPacketSequenceNumber new_sequence_number); 256 QuicPacketSequenceNumber new_sequence_number);
269 257
270 // Updates the least_packet_awaited_by_peer. 258 // Updates the least_packet_awaited_by_peer.
271 void UpdatePacketInformationReceivedByPeer(const QuicAckFrame& ack_frame); 259 void UpdatePacketInformationReceivedByPeer(const QuicAckFrame& ack_frame);
272 260
273 // Process the incoming ack looking for newly ack'd data packets. 261 // Process the incoming ack looking for newly ack'd data packets.
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 // Records bandwidth from server to client in normal operation, over periods 379 // Records bandwidth from server to client in normal operation, over periods
392 // of time with no loss events. 380 // of time with no loss events.
393 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_; 381 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_;
394 382
395 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); 383 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager);
396 }; 384 };
397 385
398 } // namespace net 386 } // namespace net
399 387
400 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ 388 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_sent_packet_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698