#include "chrome/browser/sync/test/integration/exponential_backoff_helper.h"
#include <algorithm>
#include <ostream>
#include "components/sync/engine/cycle/model_neutral_state.h"
#include "components/sync/engine/cycle/sync_cycle_snapshot.h"
#include "components/sync/engine/polling_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace exponential_backoff_helper {
namespace {
constexpr size_t kMaxRetriesToVerify = …;
constexpr base::TimeDelta kMinExtraUnexpectedDelayForWarning = …;
bool DidLastSyncCycleFail(syncer::SyncService* sync_service) { … }
base::TimeDelta ClampBackoffDelay(base::TimeDelta delay) { … }
}
ExponentialBackoffChecker::DelayRange
ExponentialBackoffChecker::CalculateDelayRange(base::TimeDelta current_delay) { … }
std::vector<ExponentialBackoffChecker::DelayRange>
ExponentialBackoffChecker::BuildExpectedDelayTable() { … }
ExponentialBackoffChecker::ExponentialBackoffChecker(
syncer::SyncServiceImpl* sync_service)
: … { … }
ExponentialBackoffChecker::~ExponentialBackoffChecker() = default;
void ExponentialBackoffChecker::OnSyncCycleCompleted(
syncer::SyncService* sync_service) { … }
bool ExponentialBackoffChecker::IsExitConditionSatisfied(std::ostream* os) { … }
}