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

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

Issue 2713963003: Simplify QuicReceivedPacketManager by combining DontWaitForPacketsBefore and UpdatePacketInformatio… (Closed)
Patch Set: Created 3 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
« no previous file with comments | « net/BUILD.gn ('k') | net/quic/core/quic_multipath_received_packet_manager.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 (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_connection.h" 5 #include "net/quic/core/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 CloseConnection(QUIC_INVALID_STOP_WAITING_DATA, error, 728 CloseConnection(QUIC_INVALID_STOP_WAITING_DATA, error,
729 ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); 729 ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
730 return false; 730 return false;
731 } 731 }
732 732
733 if (debug_visitor_ != nullptr) { 733 if (debug_visitor_ != nullptr) {
734 debug_visitor_->OnStopWaitingFrame(frame); 734 debug_visitor_->OnStopWaitingFrame(frame);
735 } 735 }
736 736
737 largest_seen_packet_with_stop_waiting_ = last_header_.packet_number; 737 largest_seen_packet_with_stop_waiting_ = last_header_.packet_number;
738 received_packet_manager_.UpdatePacketInformationSentByPeer(frame); 738 received_packet_manager_.DontWaitForPacketsBefore(frame.least_unacked);
739 return connected_; 739 return connected_;
740 } 740 }
741 741
742 bool QuicConnection::OnPaddingFrame(const QuicPaddingFrame& frame) { 742 bool QuicConnection::OnPaddingFrame(const QuicPaddingFrame& frame) {
743 DCHECK(connected_); 743 DCHECK(connected_);
744 if (debug_visitor_ != nullptr) { 744 if (debug_visitor_ != nullptr) {
745 debug_visitor_->OnPaddingFrame(frame); 745 debug_visitor_->OnPaddingFrame(frame);
746 } 746 }
747 return true; 747 return true;
748 } 748 }
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after
2383 2383
2384 void QuicConnection::CheckIfApplicationLimited() { 2384 void QuicConnection::CheckIfApplicationLimited() {
2385 if (queued_packets_.empty() && 2385 if (queued_packets_.empty() &&
2386 !sent_packet_manager_.HasPendingRetransmissions() && 2386 !sent_packet_manager_.HasPendingRetransmissions() &&
2387 !visitor_->WillingAndAbleToWrite()) { 2387 !visitor_->WillingAndAbleToWrite()) {
2388 sent_packet_manager_.OnApplicationLimited(); 2388 sent_packet_manager_.OnApplicationLimited();
2389 } 2389 }
2390 } 2390 }
2391 2391
2392 } // namespace net 2392 } // namespace net
OLDNEW
« no previous file with comments | « net/BUILD.gn ('k') | net/quic/core/quic_multipath_received_packet_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698