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/quic_packet_creator.cc

Issue 1413443005: Remove QuicFecGroup::MinProtectedPacket which is no longer needed. No behavior change expected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@105506241
Patch Set: Created 5 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/quic_fec_group_interface.h ('k') | no next file » | 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_creator.h" 5 #include "net/quic/quic_packet_creator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 return NoPacket(); 524 return NoPacket();
525 } 525 }
526 DCHECK_EQ(0u, queued_frames_.size()); 526 DCHECK_EQ(0u, queued_frames_.size());
527 QuicPacketHeader header; 527 QuicPacketHeader header;
528 FillPacketHeader(fec_group_number_, true, &header); 528 FillPacketHeader(fec_group_number_, true, &header);
529 scoped_ptr<QuicPacket> packet( 529 scoped_ptr<QuicPacket> packet(
530 framer_->BuildFecPacket(header, fec_group_->PayloadParity())); 530 framer_->BuildFecPacket(header, fec_group_->PayloadParity()));
531 fec_group_.reset(nullptr); 531 fec_group_.reset(nullptr);
532 packet_size_ = 0; 532 packet_size_ = 0;
533 LOG_IF(DFATAL, packet == nullptr) 533 LOG_IF(DFATAL, packet == nullptr)
534 << "Failed to serialize fec packet for group:" 534 << "Failed to serialize fec packet for group:" << fec_group_number_;
535 << fec_group_->MinProtectedPacket();
536 DCHECK_GE(max_packet_length_, packet->length()); 535 DCHECK_GE(max_packet_length_, packet->length());
537 // Immediately encrypt the packet, to ensure we don't encrypt the same packet 536 // Immediately encrypt the packet, to ensure we don't encrypt the same packet
538 // packet number multiple times. 537 // packet number multiple times.
539 QuicEncryptedPacket* encrypted = framer_->EncryptPayload( 538 QuicEncryptedPacket* encrypted = framer_->EncryptPayload(
540 encryption_level_, packet_number_, *packet, buffer, buffer_len); 539 encryption_level_, packet_number_, *packet, buffer, buffer_len);
541 if (encrypted == nullptr) { 540 if (encrypted == nullptr) {
542 LOG(DFATAL) << "Failed to encrypt packet number " << packet_number_; 541 LOG(DFATAL) << "Failed to encrypt packet number " << packet_number_;
543 return NoPacket(); 542 return NoPacket();
544 } 543 }
545 SerializedPacket serialized( 544 SerializedPacket serialized(
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 if (BytesFree() == 0) { 638 if (BytesFree() == 0) {
640 // Don't pad full packets. 639 // Don't pad full packets.
641 return; 640 return;
642 } 641 }
643 642
644 bool success = AddFrame(QuicFrame(QuicPaddingFrame()), false, false, nullptr); 643 bool success = AddFrame(QuicFrame(QuicPaddingFrame()), false, false, nullptr);
645 DCHECK(success); 644 DCHECK(success);
646 } 645 }
647 646
648 } // namespace net 647 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_fec_group_interface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698