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

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

Issue 411823002: Land Recent QUIC Changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase TOT Created 6 years, 4 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_http_stream_test.cc ('k') | net/quic/quic_received_packet_manager_test.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_received_packet_manager.h" 5 #include "net/quic/quic_received_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/base/linked_hash_map.h" 9 #include "net/base/linked_hash_map.h"
10 #include "net/quic/quic_connection_stats.h" 10 #include "net/quic/quic_connection_stats.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 if (sequence_number > received_info_.largest_observed) { 172 if (sequence_number > received_info_.largest_observed) {
173 received_info_.largest_observed = sequence_number; 173 received_info_.largest_observed = sequence_number;
174 time_largest_observed_ = receipt_time; 174 time_largest_observed_ = receipt_time;
175 } 175 }
176 entropy_tracker_.RecordPacketEntropyHash(sequence_number, 176 entropy_tracker_.RecordPacketEntropyHash(sequence_number,
177 header.entropy_hash); 177 header.entropy_hash);
178 178
179 receive_algorithm_->RecordIncomingPacket( 179 receive_algorithm_->RecordIncomingPacket(
180 bytes, sequence_number, receipt_time); 180 bytes, sequence_number, receipt_time);
181
182 received_info_.revived_packets.erase(sequence_number);
181 } 183 }
182 184
183 void QuicReceivedPacketManager::RecordPacketRevived( 185 void QuicReceivedPacketManager::RecordPacketRevived(
184 QuicPacketSequenceNumber sequence_number) { 186 QuicPacketSequenceNumber sequence_number) {
185 LOG_IF(DFATAL, !IsAwaitingPacket(sequence_number)); 187 LOG_IF(DFATAL, !IsAwaitingPacket(sequence_number));
186 received_info_.revived_packets.insert(sequence_number); 188 received_info_.revived_packets.insert(sequence_number);
187 } 189 }
188 190
189 bool QuicReceivedPacketManager::IsMissing( 191 bool QuicReceivedPacketManager::IsMissing(
190 QuicPacketSequenceNumber sequence_number) { 192 QuicPacketSequenceNumber sequence_number) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 return !received_info_.missing_packets.empty(); 279 return !received_info_.missing_packets.empty();
278 } 280 }
279 281
280 bool QuicReceivedPacketManager::HasNewMissingPackets() { 282 bool QuicReceivedPacketManager::HasNewMissingPackets() {
281 return HasMissingPackets() && 283 return HasMissingPackets() &&
282 (received_info_.largest_observed - 284 (received_info_.largest_observed -
283 *received_info_.missing_packets.rbegin()) <= kMaxPacketsAfterNewMissing; 285 *received_info_.missing_packets.rbegin()) <= kMaxPacketsAfterNewMissing;
284 } 286 }
285 287
286 } // namespace net 288 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_http_stream_test.cc ('k') | net/quic/quic_received_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698