| Index: sync/engine/backoff_delay_provider.cc
|
| diff --git a/sync/engine/backoff_delay_provider.cc b/sync/engine/backoff_delay_provider.cc
|
| index ddd90ed8d6c5d4d38c7e84db5bddb22ff621f9f3..cb8b0f198c4488a1127d1452ff0b5f6f373a94f9 100644
|
| --- a/sync/engine/backoff_delay_provider.cc
|
| +++ b/sync/engine/backoff_delay_provider.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "sync/engine/backoff_delay_provider.h"
|
|
|
| +#include <stdint.h>
|
| +
|
| #include <algorithm>
|
|
|
| #include "base/rand_util.h"
|
| @@ -43,8 +45,8 @@ TimeDelta BackoffDelayProvider::GetDelay(const base::TimeDelta& last_delay) {
|
| return TimeDelta::FromSeconds(kMaxBackoffSeconds);
|
|
|
| // This calculates approx. base_delay_seconds * 2 +/- base_delay_seconds / 2
|
| - int64 backoff_s =
|
| - std::max(static_cast<int64>(1),
|
| + int64_t backoff_s =
|
| + std::max(static_cast<int64_t>(1),
|
| last_delay.InSeconds() * kBackoffRandomizationFactor);
|
|
|
| // Flip a coin to randomize backoff interval by +/- 50%.
|
| @@ -55,7 +57,7 @@ TimeDelta BackoffDelayProvider::GetDelay(const base::TimeDelta& last_delay) {
|
| (rand_sign * (last_delay.InSeconds() / kBackoffRandomizationFactor));
|
|
|
| // Cap the backoff interval.
|
| - backoff_s = std::max(static_cast<int64>(1),
|
| + backoff_s = std::max(static_cast<int64_t>(1),
|
| std::min(backoff_s, kMaxBackoffSeconds));
|
|
|
| return TimeDelta::FromSeconds(backoff_s);
|
|
|