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

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

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_received_packet_manager.h ('k') | net/quic/quic_sent_packet_manager.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 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 <limits> 7 #include <limits>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 entropy_tracker_.SetCumulativeEntropyUpTo(stop_waiting.least_unacked, 277 entropy_tracker_.SetCumulativeEntropyUpTo(stop_waiting.least_unacked,
278 stop_waiting.entropy_hash); 278 stop_waiting.entropy_hash);
279 } 279 }
280 peer_least_packet_awaiting_ack_ = stop_waiting.least_unacked; 280 peer_least_packet_awaiting_ack_ = stop_waiting.least_unacked;
281 } 281 }
282 DCHECK(ack_frame_.missing_packets.empty() || 282 DCHECK(ack_frame_.missing_packets.empty() ||
283 *ack_frame_.missing_packets.begin() >= 283 *ack_frame_.missing_packets.begin() >=
284 peer_least_packet_awaiting_ack_); 284 peer_least_packet_awaiting_ack_);
285 } 285 }
286 286
287 bool QuicReceivedPacketManager::HasNewMissingPackets() { 287 bool QuicReceivedPacketManager::HasNewMissingPackets() const {
288 return !ack_frame_.missing_packets.empty() && 288 return !ack_frame_.missing_packets.empty() &&
289 (ack_frame_.largest_observed - 289 (ack_frame_.largest_observed -
290 *ack_frame_.missing_packets.rbegin()) <= kMaxPacketsAfterNewMissing; 290 *ack_frame_.missing_packets.rbegin()) <= kMaxPacketsAfterNewMissing;
291 } 291 }
292 292
293 size_t QuicReceivedPacketManager::NumTrackedPackets() const {
294 return entropy_tracker_.size();
295 }
296
293 } // namespace net 297 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_received_packet_manager.h ('k') | net/quic/quic_sent_packet_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698