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

Unified Diff: net/tools/quic/test_tools/packet_dropping_test_writer.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/tools/quic/stateless_rejector_test.cc ('k') | net/tools/quic/test_tools/quic_test_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/test_tools/packet_dropping_test_writer.cc
diff --git a/net/tools/quic/test_tools/packet_dropping_test_writer.cc b/net/tools/quic/test_tools/packet_dropping_test_writer.cc
index 4d85d5a85f9d7f40f307c7ac857c90857da350e3..8b2141cfc879fcccde9ab4117357ab06cbfc3695 100644
--- a/net/tools/quic/test_tools/packet_dropping_test_writer.cc
+++ b/net/tools/quic/test_tools/packet_dropping_test_writer.cc
@@ -118,14 +118,14 @@ WriteResult PacketDroppingTestWriter::WritePacket(
}
// Queue it to be sent.
- QuicTime send_time = clock_->ApproximateNow().Add(fake_packet_delay_);
+ QuicTime send_time = clock_->ApproximateNow() + fake_packet_delay_;
if (!fake_bandwidth_.IsZero()) {
// Calculate a time the bandwidth limit would impose.
QuicTime::Delta bandwidth_delay = QuicTime::Delta::FromMicroseconds(
(buf_len * kNumMicrosPerSecond) / fake_bandwidth_.ToBytesPerSecond());
send_time = delayed_packets_.empty()
- ? send_time.Add(bandwidth_delay)
- : delayed_packets_.back().send_time.Add(bandwidth_delay);
+ ? send_time + bandwidth_delay
+ : delayed_packets_.back().send_time + bandwidth_delay;
}
std::unique_ptr<PerPacketOptions> delayed_options;
if (options != nullptr) {
« no previous file with comments | « net/tools/quic/stateless_rejector_test.cc ('k') | net/tools/quic/test_tools/quic_test_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698