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

Unified Diff: net/base/backoff_entry.cc

Issue 2390653002: Allow backoff entry serialization if clock is null. (Closed)
Patch Set: feedback Created 4 years, 2 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/base/backoff_entry.h ('k') | net/base/backoff_entry_serializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/backoff_entry.cc
diff --git a/net/base/backoff_entry.cc b/net/base/backoff_entry.cc
index 64125721c57f92f850b790b686986f6725825b63..a77c5251c9e647bba85748d36a4cb4fe9664c9c6 100644
--- a/net/base/backoff_entry.cc
+++ b/net/base/backoff_entry.cc
@@ -114,6 +114,10 @@ void BackoffEntry::Reset() {
exponential_backoff_release_time_ = base::TimeTicks();
}
+base::TimeTicks BackoffEntry::GetTimeTicksNow() const {
+ return clock_ ? clock_->NowTicks() : base::TimeTicks::Now();
+}
+
base::TimeTicks BackoffEntry::CalculateReleaseTime() const {
int effective_failure_count =
std::max(0, failure_count_ - policy_->num_errors_to_ignore);
@@ -179,8 +183,4 @@ base::TimeTicks BackoffEntry::BackoffDurationToReleaseTime(
return base::TimeTicks() + base::TimeDelta::FromMicroseconds(release_time_us);
}
-base::TimeTicks BackoffEntry::GetTimeTicksNow() const {
- return clock_ ? clock_->NowTicks() : base::TimeTicks::Now();
-}
-
} // namespace net
« no previous file with comments | « net/base/backoff_entry.h ('k') | net/base/backoff_entry_serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698