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

Unified Diff: net/quic/quic_connection.cc

Issue 965873004: Deprecate FLAGS_quic_record_send_time_before_write. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@QuicConnection_no_longer_owns_debug_visitor_86801250
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 | « no previous file | net/quic/quic_connection_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.cc
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index f7dd621506652b61b19e78f30a307081653fd346..aca4d203b993f08ccae94da39319110ebf025d0d 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -1444,13 +1444,10 @@ bool QuicConnection::WritePacketInner(QueuedPacket* packet) {
DVLOG(2) << ENDPOINT << "packet(" << sequence_number << "): " << std::endl
<< QuicUtils::StringToHexASCIIDump(encrypted->AsStringPiece());
- QuicTime packet_send_time = QuicTime::Zero();
- if (FLAGS_quic_record_send_time_before_write) {
- // Measure the RTT from before the write begins to avoid underestimating the
- // min_rtt_, especially in cases where the thread blocks or gets swapped out
- // during the WritePacket below.
- packet_send_time = clock_->Now();
- }
+ // Measure the RTT from before the write begins to avoid underestimating the
+ // min_rtt_, especially in cases where the thread blocks or gets swapped out
+ // during the WritePacket below.
+ QuicTime packet_send_time = clock_->Now();
WriteResult result = writer_->WritePacket(encrypted->data(),
encrypted->length(),
self_address().address(),
@@ -1469,16 +1466,6 @@ bool QuicConnection::WritePacketInner(QueuedPacket* packet) {
return false;
}
}
- if (!FLAGS_quic_record_send_time_before_write) {
- packet_send_time = clock_->Now();
- }
- if (!packet_send_time.IsInitialized()) {
- // TODO(jokulik): This is only needed because of the two code paths for
- // initializing packet_send_time. Once "quic_record_send_time_before_write"
- // is deprecated, this check can be removed.
- LOG(DFATAL) << "The packet send time should never be zero. "
- << "This is a programming bug, please report it.";
- }
if (result.status != WRITE_STATUS_ERROR && debug_visitor_ != nullptr) {
// Pass the write result to the visitor.
debug_visitor_->OnPacketSent(packet->serialized_packet,
@@ -1493,10 +1480,7 @@ bool QuicConnection::WritePacketInner(QueuedPacket* packet) {
}
SetPingAlarm();
MaybeSetFecAlarm(sequence_number);
- DVLOG(1) << ENDPOINT << "time "
- << (FLAGS_quic_record_send_time_before_write ?
- "we began writing " : "we finished writing ")
- << "last sent packet: "
+ DVLOG(1) << ENDPOINT << "time we began writing last sent packet: "
<< packet_send_time.ToDebuggingValue();
// TODO(ianswett): Change the sequence number length and other packet creator
« no previous file with comments | « no previous file | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698