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

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

Issue 1417683003: Fix the semantics of QuicFecGroup::ProtectsPacketsBefore into IsWaitingForPacketBefore. Certain ed… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@105435253
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 | « no previous file | net/quic/quic_fec_group.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 2000 matching lines...) Expand 10 before | Expand all | Expand 10 after
2011 packet_generator_.AddControlFrame( 2011 packet_generator_.AddControlFrame(
2012 QuicFrame(new QuicGoAwayFrame(error, last_good_stream_id, reason))); 2012 QuicFrame(new QuicGoAwayFrame(error, last_good_stream_id, reason)));
2013 } 2013 }
2014 2014
2015 void QuicConnection::CloseFecGroupsBefore(QuicPacketNumber packet_number) { 2015 void QuicConnection::CloseFecGroupsBefore(QuicPacketNumber packet_number) {
2016 FecGroupMap::iterator it = group_map_.begin(); 2016 FecGroupMap::iterator it = group_map_.begin();
2017 while (it != group_map_.end()) { 2017 while (it != group_map_.end()) {
2018 // If this is the current group or the group doesn't protect this packet 2018 // If this is the current group or the group doesn't protect this packet
2019 // we can ignore it. 2019 // we can ignore it.
2020 if (last_header_.fec_group == it->first || 2020 if (last_header_.fec_group == it->first ||
2021 !it->second->ProtectsPacketsBefore(packet_number)) { 2021 !it->second->IsWaitingForPacketBefore(packet_number)) {
2022 ++it; 2022 ++it;
2023 continue; 2023 continue;
2024 } 2024 }
2025 QuicFecGroup* fec_group = it->second; 2025 QuicFecGroup* fec_group = it->second;
2026 DCHECK(!fec_group->CanRevive()); 2026 DCHECK(!fec_group->CanRevive());
2027 FecGroupMap::iterator next = it; 2027 FecGroupMap::iterator next = it;
2028 ++next; 2028 ++next;
2029 group_map_.erase(it); 2029 group_map_.erase(it);
2030 delete fec_group; 2030 delete fec_group;
2031 it = next; 2031 it = next;
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
2324 packet_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1; 2324 packet_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1;
2325 ++mtu_probe_count_; 2325 ++mtu_probe_count_;
2326 2326
2327 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_; 2327 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_;
2328 SendMtuDiscoveryPacket(mtu_discovery_target_); 2328 SendMtuDiscoveryPacket(mtu_discovery_target_);
2329 2329
2330 DCHECK(!mtu_discovery_alarm_->IsSet()); 2330 DCHECK(!mtu_discovery_alarm_->IsSet());
2331 } 2331 }
2332 2332
2333 } // namespace net 2333 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_fec_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698