Chromium Code Reviews| Index: net/base/backoff_entry.h |
| diff --git a/net/base/backoff_entry.h b/net/base/backoff_entry.h |
| index dbc7488b7a4bd8005b5d699da8158d3a5459685c..5511d041a70e987b36fa69408b0a8470ee7de44e 100644 |
| --- a/net/base/backoff_entry.h |
| +++ b/net/base/backoff_entry.h |
| @@ -22,7 +22,8 @@ namespace net { |
| // intended for reuse in various networking scenarios. |
| class NET_EXPORT BackoffEntry : NON_EXPORTED_BASE(public base::NonThreadSafe) { |
| public: |
| - // The set of parameters that define a back-off policy. |
| + // The set of parameters that define a back-off policy. If you change this, |
| + // increment SERIALIZATION_VERSION_NUMBER in backoff_entry_serializer.cc. |
| struct Policy { |
| // Number of initial errors (in sequence) to ignore before applying |
| // exponential back-off rules. |
| @@ -99,9 +100,15 @@ class NET_EXPORT BackoffEntry : NON_EXPORTED_BASE(public base::NonThreadSafe) { |
| int failure_count() const { return failure_count_; } |
| private: |
| + friend class BackoffEntrySerializer; |
| + |
| // Calculates when requests should again be allowed through. |
| base::TimeTicks CalculateReleaseTime() const; |
| + // Converts time_until_release to a release time, obeying maximum_backoff_ms. |
| + base::TimeTicks TimeUntilReleaseToReleaseTime( |
| + base::TimeDelta time_until_release) const; |
|
mmenke
2015/05/05 15:47:51
nit: Maybe time_until_release -> backoff (or back
johnme
2015/05/06 12:46:46
Ok, renamed time_until_release to backoff_duration
|
| + |
| // Equivalent to TimeTicks::Now(), using clock_ if provided. |
| base::TimeTicks GetTimeTicksNow() const; |