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

Side by Side Diff: net/quic/quic_ack_notifier_manager.cc

Issue 198353003: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/quic_ack_notifier.cc ('k') | net/quic/quic_ack_notifier_test.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 #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
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
OLDNEW
« no previous file with comments | « net/quic/quic_ack_notifier.cc ('k') | net/quic/quic_ack_notifier_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698