#include "components/sync/engine/backoff_delay_provider.h"
#include <algorithm>
#include "base/memory/ptr_util.h"
#include "base/rand_util.h"
#include "components/sync/engine/cycle/model_neutral_state.h"
#include "components/sync/engine/polling_constants.h"
#include "components/sync/engine/sync_protocol_error.h"
#include "components/sync/engine/syncer_error.h"
namespace syncer {
namespace {
base::TimeDelta GetDelayImpl(base::TimeDelta last_delay, int jitter_sign) { … }
}
std::unique_ptr<BackoffDelayProvider> BackoffDelayProvider::FromDefaults() { … }
std::unique_ptr<BackoffDelayProvider>
BackoffDelayProvider::WithShortInitialRetryOverride() { … }
BackoffDelayProvider::BackoffDelayProvider(
const base::TimeDelta& default_initial_backoff,
const base::TimeDelta& short_initial_backoff)
: … { … }
BackoffDelayProvider::~BackoffDelayProvider() = default;
base::TimeDelta BackoffDelayProvider::GetDelay(
const base::TimeDelta& last_delay) { … }
base::TimeDelta BackoffDelayProvider::GetInitialDelay(
const ModelNeutralState& state) const { … }
base::TimeDelta BackoffDelayProvider::GetDelayForTesting(
base::TimeDelta last_delay,
int jitter_sign) { … }
}