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

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

Issue 1245013003: QUIC - clean up changes to keep internal source and chromium code in sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Protect_against_QUIC_crash_bug_98506577
Patch Set: Merge with TOT Created 5 years, 5 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 | « no previous file | 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_connection.h" 5 #include "net/quic/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 if (!ValidateAckFrame(incoming_ack)) { 728 if (!ValidateAckFrame(incoming_ack)) {
729 SendConnectionClose(QUIC_INVALID_ACK_DATA); 729 SendConnectionClose(QUIC_INVALID_ACK_DATA);
730 return false; 730 return false;
731 } 731 }
732 732
733 if (FLAGS_quic_process_frames_inline) { 733 if (FLAGS_quic_process_frames_inline) {
734 ProcessAckFrame(incoming_ack); 734 ProcessAckFrame(incoming_ack);
735 if (incoming_ack.is_truncated) { 735 if (incoming_ack.is_truncated) {
736 should_last_packet_instigate_acks_ = true; 736 should_last_packet_instigate_acks_ = true;
737 } 737 }
738 QuicPacketSequenceNumber least_acked = GetLeastUnacked(); 738 if (!incoming_ack.missing_packets.empty() &&
739 if (least_acked > 0 && 739 GetLeastUnacked() > *incoming_ack.missing_packets.begin()) {
740 (incoming_ack.missing_packets.empty() ||
741 least_acked > *incoming_ack.missing_packets.begin())) {
742 ++stop_waiting_count_; 740 ++stop_waiting_count_;
743 } else { 741 } else {
744 stop_waiting_count_ = 0; 742 stop_waiting_count_ = 0;
745 } 743 }
746 } else { 744 } else {
747 last_ack_frames_.push_back(incoming_ack); 745 last_ack_frames_.push_back(incoming_ack);
748 } 746 }
749 return connected_; 747 return connected_;
750 } 748 }
751 749
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
2382 sequence_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1; 2380 sequence_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1;
2383 ++mtu_probe_count_; 2381 ++mtu_probe_count_;
2384 2382
2385 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_; 2383 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_;
2386 SendMtuDiscoveryPacket(mtu_discovery_target_); 2384 SendMtuDiscoveryPacket(mtu_discovery_target_);
2387 2385
2388 DCHECK(!mtu_discovery_alarm_->IsSet()); 2386 DCHECK(!mtu_discovery_alarm_->IsSet());
2389 } 2387 }
2390 2388
2391 } // namespace net 2389 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698