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

Unified Diff: net/quic/quic_received_packet_manager.cc

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_received_packet_manager.h ('k') | net/quic/quic_received_packet_manager_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_received_packet_manager.cc
diff --git a/net/quic/quic_received_packet_manager.cc b/net/quic/quic_received_packet_manager.cc
index 38ceec68bb466d25ef7fbe1f54cc4d07db2e76cb..dcc7823835e16884077f967ae24be9896f0cd892 100644
--- a/net/quic/quic_received_packet_manager.cc
+++ b/net/quic/quic_received_packet_manager.cc
@@ -13,7 +13,6 @@
#include "net/quic/crypto/crypto_protocol.h"
#include "net/quic/quic_connection_stats.h"
-using std::make_pair;
using std::max;
using std::min;
using std::numeric_limits;
@@ -81,13 +80,13 @@ void QuicReceivedPacketManager::EntropyTracker::RecordPacketEntropyHash(
if (sequence_number > largest_observed_) {
for (QuicPacketSequenceNumber i = 0;
i < (sequence_number - largest_observed_ - 1); ++i) {
- packets_entropy_.push_back(make_pair(0, false));
+ packets_entropy_.push_back(std::make_pair(0, false));
}
- packets_entropy_.push_back(make_pair(entropy_hash, true));
+ packets_entropy_.push_back(std::make_pair(entropy_hash, true));
largest_observed_ = sequence_number;
} else {
packets_entropy_[sequence_number - first_gap_] =
- make_pair(entropy_hash, true);
+ std::make_pair(entropy_hash, true);
AdvanceFirstGapAndGarbageCollectEntropyMap();
}
@@ -135,7 +134,6 @@ AdvanceFirstGapAndGarbageCollectEntropyMap() {
QuicReceivedPacketManager::QuicReceivedPacketManager(QuicConnectionStats* stats)
: peer_least_packet_awaiting_ack_(0),
time_largest_observed_(QuicTime::Zero()),
- receive_algorithm_(ReceiveAlgorithmInterface::Create()),
stats_(stats) {
ack_frame_.largest_observed = 0;
ack_frame_.entropy_hash = 0;
@@ -178,9 +176,6 @@ void QuicReceivedPacketManager::RecordPacketReceived(
entropy_tracker_.RecordPacketEntropyHash(sequence_number,
header.entropy_hash);
- receive_algorithm_->RecordIncomingPacket(
- bytes, sequence_number, receipt_time);
-
received_packet_times_.push_back(
std::make_pair(sequence_number, receipt_time));
@@ -237,8 +232,8 @@ void QuicReceivedPacketManager::UpdateReceivedPacketInfo(
// Remove all packets that are too far from largest_observed to express.
received_packet_times_.remove_if(isTooLarge(ack_frame_.largest_observed));
- ack_frame->received_packet_times = received_packet_times_;
- received_packet_times_.clear();
+ ack_frame->received_packet_times.clear();
+ ack_frame->received_packet_times.swap(received_packet_times_);
}
QuicPacketEntropyHash QuicReceivedPacketManager::EntropyHash(
« no previous file with comments | « net/quic/quic_received_packet_manager.h ('k') | net/quic/quic_received_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698