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

Unified Diff: net/quic/quic_buffered_packet_store.cc

Issue 2132623002: Landing Recent QUIC changes until 2016-07-02 02:45 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing comment about RPCs Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_alarm_test.cc ('k') | net/quic/quic_buffered_packet_store_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_buffered_packet_store.cc
diff --git a/net/quic/quic_buffered_packet_store.cc b/net/quic/quic_buffered_packet_store.cc
index 5d6b880568445a6864889c084308e1a26f5b62a4..c5771def31d676788c02c618514acbe38034eab5 100644
--- a/net/quic/quic_buffered_packet_store.cc
+++ b/net/quic/quic_buffered_packet_store.cc
@@ -109,7 +109,7 @@ EnqueuePacketResult QuicBufferedPacketStore::EnqueuePacket(
queue.buffered_packets.push_back(std::move(new_entry));
if (!expiration_alarm_->IsSet()) {
- expiration_alarm_->Set(clock_->ApproximateNow().Add(connection_life_span_));
+ expiration_alarm_->Set(clock_->ApproximateNow() + connection_life_span_);
}
return SUCCESS;
}
@@ -131,8 +131,7 @@ list<BufferedPacket> QuicBufferedPacketStore::DeliverPackets(
}
void QuicBufferedPacketStore::OnExpirationTimeout() {
- QuicTime expiration_time =
- clock_->ApproximateNow().Subtract(connection_life_span_);
+ QuicTime expiration_time = clock_->ApproximateNow() - connection_life_span_;
while (!undecryptable_packets_.empty()) {
auto& entry = undecryptable_packets_.front();
if (entry.second.creation_time > expiration_time) {
@@ -142,7 +141,7 @@ void QuicBufferedPacketStore::OnExpirationTimeout() {
undecryptable_packets_.erase(undecryptable_packets_.begin());
}
if (!undecryptable_packets_.empty()) {
- expiration_alarm_->Set(clock_->ApproximateNow().Add(connection_life_span_));
+ expiration_alarm_->Set(clock_->ApproximateNow() + connection_life_span_);
}
}
« no previous file with comments | « net/quic/quic_alarm_test.cc ('k') | net/quic/quic_buffered_packet_store_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698