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

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

Issue 612323013: QUIC - (no behavior change) s/NULL/nullptr/g in .../quic/... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 | « net/quic/iovector_test.cc ('k') | net/quic/quic_client_session.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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 RetransmittableFrames* frames = serialized_packet.retransmittable_frames; 80 RetransmittableFrames* frames = serialized_packet.retransmittable_frames;
81 81
82 // AckNotifiers can only be attached to retransmittable frames. 82 // AckNotifiers can only be attached to retransmittable frames.
83 if (!frames) { 83 if (!frames) {
84 return; 84 return;
85 } 85 }
86 86
87 for (QuicFrames::const_iterator it = frames->frames().begin(); 87 for (QuicFrames::const_iterator it = frames->frames().begin();
88 it != frames->frames().end(); ++it) { 88 it != frames->frames().end(); ++it) {
89 if (it->type == STREAM_FRAME && it->stream_frame->notifier != NULL) { 89 if (it->type == STREAM_FRAME && it->stream_frame->notifier != nullptr) {
90 QuicAckNotifier* notifier = it->stream_frame->notifier; 90 QuicAckNotifier* notifier = it->stream_frame->notifier;
91 91
92 // The AckNotifier needs to know it is tracking this packet's sequence 92 // The AckNotifier needs to know it is tracking this packet's sequence
93 // number. 93 // number.
94 notifier->AddSequenceNumber(serialized_packet.sequence_number, 94 notifier->AddSequenceNumber(serialized_packet.sequence_number,
95 serialized_packet.packet->length()); 95 serialized_packet.packet->length());
96 96
97 // Update the mapping in the other direction, from sequence 97 // Update the mapping in the other direction, from sequence
98 // number to AckNotifier. 98 // number to AckNotifier.
99 ack_notifier_map_[serialized_packet.sequence_number].insert(notifier); 99 ack_notifier_map_[serialized_packet.sequence_number].insert(notifier);
100 100
101 // Take ownership of the AckNotifier. 101 // Take ownership of the AckNotifier.
102 ack_notifiers_.insert(notifier); 102 ack_notifiers_.insert(notifier);
103 } 103 }
104 } 104 }
105 } 105 }
106 106
107 } // namespace net 107 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/iovector_test.cc ('k') | net/quic/quic_client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698