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

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

Issue 870733002: Change some of QUIC's AckNotifier datastructures from maps to hashmaps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Add_new_RTO_connection_option_84036848
Patch Set: Created 5 years, 11 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/quic_packet_generator.h ('k') | net/quic/quic_protocol.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_packet_generator.h" 5 #include "net/quic/quic_packet_generator.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "net/quic/quic_ack_notifier.h" 9 #include "net/quic/quic_ack_notifier.h"
10 #include "net/quic/quic_fec_group.h" 10 #include "net/quic/quic_fec_group.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA, 170 NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA,
171 has_handshake ? IS_HANDSHAKE : NOT_HANDSHAKE)) { 171 has_handshake ? IS_HANDSHAKE : NOT_HANDSHAKE)) {
172 QuicFrame frame; 172 QuicFrame frame;
173 size_t bytes_consumed = packet_creator_.CreateStreamFrame( 173 size_t bytes_consumed = packet_creator_.CreateStreamFrame(
174 id, data, offset + total_bytes_consumed, fin, &frame); 174 id, data, offset + total_bytes_consumed, fin, &frame);
175 ++frames_created; 175 ++frames_created;
176 176
177 // We want to track which packet this stream frame ends up in. 177 // We want to track which packet this stream frame ends up in.
178 if (FLAGS_quic_attach_ack_notifiers_to_packets) { 178 if (FLAGS_quic_attach_ack_notifiers_to_packets) {
179 if (notifier != nullptr) { 179 if (notifier != nullptr) {
180 ack_notifiers_.insert(notifier); 180 ack_notifiers_.push_back(notifier);
181 } 181 }
182 } else { 182 } else {
183 frame.stream_frame->notifier = notifier; 183 frame.stream_frame->notifier = notifier;
184 } 184 }
185 185
186 if (!AddFrame(frame)) { 186 if (!AddFrame(frame)) {
187 LOG(DFATAL) << "Failed to add stream frame."; 187 LOG(DFATAL) << "Failed to add stream frame.";
188 // Inability to add a STREAM frame creates an unrecoverable hole in a 188 // Inability to add a STREAM frame creates an unrecoverable hole in a
189 // the stream, so it's best to close the connection. 189 // the stream, so it's best to close the connection.
190 delegate_->CloseConnection(QUIC_INTERNAL_ERROR, false); 190 delegate_->CloseConnection(QUIC_INTERNAL_ERROR, false);
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 packet_creator_.set_connection_id_length(PACKET_8BYTE_CONNECTION_ID); 459 packet_creator_.set_connection_id_length(PACKET_8BYTE_CONNECTION_ID);
460 } 460 }
461 } 461 }
462 462
463 463
464 void QuicPacketGenerator::set_encryption_level(EncryptionLevel level) { 464 void QuicPacketGenerator::set_encryption_level(EncryptionLevel level) {
465 packet_creator_.set_encryption_level(level); 465 packet_creator_.set_encryption_level(level);
466 } 466 }
467 467
468 } // namespace net 468 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_packet_generator.h ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698