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

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

Issue 181433007: Minor optimizations to QuicUnackedPacketMap and QuicSentPacketManager to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: second try 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 | « no previous file | net/quic/quic_unacked_packet_map.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_sent_packet_manager.h" 5 #include "net/quic/quic_sent_packet_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "net/quic/congestion_control/pacing_sender.h" 9 #include "net/quic/congestion_control/pacing_sender.h"
10 #include "net/quic/crypto/crypto_protocol.h" 10 #include "net/quic/crypto/crypto_protocol.h"
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 if (consecutive_tlp_count_ < max_tail_loss_probes_) { 506 if (consecutive_tlp_count_ < max_tail_loss_probes_) {
507 if (unacked_packets_.HasUnackedRetransmittableFrames()) { 507 if (unacked_packets_.HasUnackedRetransmittableFrames()) {
508 return TLP_MODE; 508 return TLP_MODE;
509 } 509 }
510 } 510 }
511 return RTO_MODE; 511 return RTO_MODE;
512 } 512 }
513 513
514 void QuicSentPacketManager::OnPacketAbandoned( 514 void QuicSentPacketManager::OnPacketAbandoned(
515 QuicPacketSequenceNumber sequence_number) { 515 QuicPacketSequenceNumber sequence_number) {
516 if (unacked_packets_.IsPending(sequence_number)) { 516 const QuicUnackedPacketMap::TransmissionInfo& transmission_info =
517 LOG_IF(DFATAL, unacked_packets_.GetTransmissionInfo( 517 unacked_packets_.GetTransmissionInfo(sequence_number);
518 sequence_number).bytes_sent == 0); 518 if (transmission_info.pending) {
519 send_algorithm_->OnPacketAbandoned( 519 LOG_IF(DFATAL, transmission_info.bytes_sent == 0);
520 sequence_number, 520 send_algorithm_->OnPacketAbandoned(sequence_number,
521 unacked_packets_.GetTransmissionInfo(sequence_number).bytes_sent); 521 transmission_info.bytes_sent);
522 unacked_packets_.SetNotPending(sequence_number); 522 unacked_packets_.SetNotPending(sequence_number);
523 } 523 }
524 } 524 }
525 525
526 void QuicSentPacketManager::OnIncomingQuicCongestionFeedbackFrame( 526 void QuicSentPacketManager::OnIncomingQuicCongestionFeedbackFrame(
527 const QuicCongestionFeedbackFrame& frame, 527 const QuicCongestionFeedbackFrame& frame,
528 const QuicTime& feedback_receive_time) { 528 const QuicTime& feedback_receive_time) {
529 send_algorithm_->OnIncomingQuicCongestionFeedbackFrame( 529 send_algorithm_->OnIncomingQuicCongestionFeedbackFrame(
530 frame, feedback_receive_time); 530 frame, feedback_receive_time);
531 } 531 }
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 return; 739 return;
740 } 740 }
741 741
742 using_pacing_ = true; 742 using_pacing_ = true;
743 send_algorithm_.reset( 743 send_algorithm_.reset(
744 new PacingSender(send_algorithm_.release(), 744 new PacingSender(send_algorithm_.release(),
745 QuicTime::Delta::FromMicroseconds(1))); 745 QuicTime::Delta::FromMicroseconds(1)));
746 } 746 }
747 747
748 } // namespace net 748 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_unacked_packet_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698