#include "components/domain_reliability/dispatcher.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/not_fatal_until.h"
#include "base/timer/timer.h"
#include "components/domain_reliability/util.h"
namespace domain_reliability {
struct DomainReliabilityDispatcher::Task { … };
DomainReliabilityDispatcher::Task::Task(
base::OnceClosure closure,
std::unique_ptr<MockableTime::Timer> timer,
base::TimeDelta min_delay,
base::TimeDelta max_delay)
: … { … }
DomainReliabilityDispatcher::Task::Task(Task&& other) = default;
DomainReliabilityDispatcher::Task& DomainReliabilityDispatcher::Task::operator=(
Task&& other) = default;
DomainReliabilityDispatcher::Task::~Task() = default;
DomainReliabilityDispatcher::DomainReliabilityDispatcher(MockableTime* time)
: … { … }
DomainReliabilityDispatcher::~DomainReliabilityDispatcher() = default;
void DomainReliabilityDispatcher::ScheduleTask(base::OnceClosure closure,
base::TimeDelta min_delay,
base::TimeDelta max_delay) { … }
void DomainReliabilityDispatcher::RunEligibleTasks() { … }
void DomainReliabilityDispatcher::RunAllTasksForTesting() { … }
void DomainReliabilityDispatcher::MakeTaskWaiting(Task* task) { … }
void
DomainReliabilityDispatcher::MakeTaskEligible(Task* task) { … }
void DomainReliabilityDispatcher::RunAndDeleteTask(Task* task) { … }
}