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

Unified Diff: net/quic/quic_connection.cc

Issue 604163002: Change the return type of QuicConnection::CheckForTimeout from bool to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Remove_calls_to_OnSerializedPacket_75716236
Patch Set: Created 6 years, 3 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_connection.h ('k') | no next file » | 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 093f9bb12f9d8cb5bbf96d8e8538675215b564dd..3084e17aaa1ce771f0e74719c0f098752121d23d 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -1902,7 +1902,7 @@ void QuicConnection::SetOverallConnectionTimeout(QuicTime::Delta timeout) {
}
}
-bool QuicConnection::CheckForTimeout() {
+void QuicConnection::CheckForTimeout() {
QuicTime now = clock_->ApproximateNow();
QuicTime time_of_last_packet = max(time_of_last_received_packet_,
time_of_last_sent_new_packet_);
@@ -1912,7 +1912,7 @@ bool QuicConnection::CheckForTimeout() {
!time_of_last_packet.IsInitialized()) {
timeout_alarm_->Cancel();
timeout_alarm_->Set(now.Add(idle_network_timeout_));
- return false;
+ return;
}
// |delta| can be < 0 as |now| is approximate time but |time_of_last_packet|
@@ -1927,7 +1927,7 @@ bool QuicConnection::CheckForTimeout() {
if (delta >= idle_network_timeout_) {
DVLOG(1) << ENDPOINT << "Connection timedout due to no network activity.";
SendConnectionClose(QUIC_CONNECTION_TIMED_OUT);
- return true;
+ return;
}
// Next timeout delta.
@@ -1943,7 +1943,7 @@ bool QuicConnection::CheckForTimeout() {
DVLOG(1) << ENDPOINT <<
"Connection timedout due to overall connection timeout.";
SendConnectionClose(QUIC_CONNECTION_OVERALL_TIMED_OUT);
- return true;
+ return;
}
// Take the min timeout.
@@ -1956,7 +1956,6 @@ bool QuicConnection::CheckForTimeout() {
timeout_alarm_->Cancel();
timeout_alarm_->Set(now.Add(timeout));
- return false;
}
void QuicConnection::SetPingAlarm() {
« no previous file with comments | « net/quic/quic_connection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698