OLD | NEW |
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 #include "net/quic/quic_ack_notifier_manager.h" | 5 #include "net/quic/quic_ack_notifier_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <utility> | 10 #include <utility> |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 return; | 83 return; |
84 } | 84 } |
85 | 85 |
86 for (QuicFrames::const_iterator it = frames->frames().begin(); | 86 for (QuicFrames::const_iterator it = frames->frames().begin(); |
87 it != frames->frames().end(); ++it) { | 87 it != frames->frames().end(); ++it) { |
88 if (it->type == STREAM_FRAME && it->stream_frame->notifier != NULL) { | 88 if (it->type == STREAM_FRAME && it->stream_frame->notifier != NULL) { |
89 QuicAckNotifier* notifier = it->stream_frame->notifier; | 89 QuicAckNotifier* notifier = it->stream_frame->notifier; |
90 | 90 |
91 // The AckNotifier needs to know it is tracking this packet's sequence | 91 // The AckNotifier needs to know it is tracking this packet's sequence |
92 // number. | 92 // number. |
93 notifier->AddSequenceNumber(serialized_packet.sequence_number); | 93 notifier->AddSequenceNumber(serialized_packet.sequence_number, |
| 94 serialized_packet.packet->length()); |
94 | 95 |
95 // Update the mapping in the other direction, from sequence | 96 // Update the mapping in the other direction, from sequence |
96 // number to AckNotifier. | 97 // number to AckNotifier. |
97 ack_notifier_map_[serialized_packet.sequence_number].insert(notifier); | 98 ack_notifier_map_[serialized_packet.sequence_number].insert(notifier); |
98 | 99 |
99 // Take ownership of the AckNotifier. | 100 // Take ownership of the AckNotifier. |
100 ack_notifiers_.insert(notifier); | 101 ack_notifiers_.insert(notifier); |
101 } | 102 } |
102 } | 103 } |
103 } | 104 } |
104 | 105 |
105 } // namespace net | 106 } // namespace net |
OLD | NEW |