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

Side by Side Diff: net/quic/core/quic_packet_creator.cc

Issue 2649573002: Remove original_path_id from SerializedPacket and OnPacketSent. (Closed)
Patch Set: rebase Created 3 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/core/quic_connection_test.cc ('k') | net/quic/core/quic_packets.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/core/quic_packet_creator.h" 5 #include "net/quic/core/quic_packet_creator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstdint> 8 #include <cstdint>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 delegate_->OnSerializedPacket(&packet_); 331 delegate_->OnSerializedPacket(&packet_);
332 ClearPacket(); 332 ClearPacket();
333 } 333 }
334 334
335 void QuicPacketCreator::ClearPacket() { 335 void QuicPacketCreator::ClearPacket() {
336 packet_.has_ack = false; 336 packet_.has_ack = false;
337 packet_.has_stop_waiting = false; 337 packet_.has_stop_waiting = false;
338 packet_.has_crypto_handshake = NOT_HANDSHAKE; 338 packet_.has_crypto_handshake = NOT_HANDSHAKE;
339 packet_.num_padding_bytes = 0; 339 packet_.num_padding_bytes = 0;
340 packet_.original_path_id = kInvalidPathId;
341 packet_.original_packet_number = 0; 340 packet_.original_packet_number = 0;
342 packet_.transmission_type = NOT_RETRANSMISSION; 341 packet_.transmission_type = NOT_RETRANSMISSION;
343 packet_.encrypted_buffer = nullptr; 342 packet_.encrypted_buffer = nullptr;
344 packet_.encrypted_length = 0; 343 packet_.encrypted_length = 0;
345 DCHECK(packet_.retransmittable_frames.empty()); 344 DCHECK(packet_.retransmittable_frames.empty());
346 packet_.listeners.clear(); 345 packet_.listeners.clear();
347 } 346 }
348 347
349 void QuicPacketCreator::CreateAndSerializeStreamFrame( 348 void QuicPacketCreator::CreateAndSerializeStreamFrame(
350 QuicStreamId id, 349 QuicStreamId id,
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 // Switching path needs to update packet number length. 654 // Switching path needs to update packet number length.
656 UpdatePacketNumberLength(least_packet_awaited_by_peer, max_packets_in_flight); 655 UpdatePacketNumberLength(least_packet_awaited_by_peer, max_packets_in_flight);
657 } 656 }
658 657
659 bool QuicPacketCreator::IncludeNonceInPublicHeader() { 658 bool QuicPacketCreator::IncludeNonceInPublicHeader() {
660 return have_diversification_nonce_ && 659 return have_diversification_nonce_ &&
661 packet_.encryption_level == ENCRYPTION_INITIAL; 660 packet_.encryption_level == ENCRYPTION_INITIAL;
662 } 661 }
663 662
664 } // namespace net 663 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_connection_test.cc ('k') | net/quic/core/quic_packets.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698