#include "net/dns/serial_worker.h"
#include <memory>
#include <utility>
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/location.h"
#include "base/notreached.h"
#include "base/task/thread_pool.h"
#include "base/timer/timer.h"
#include "net/base/backoff_entry.h"
namespace net {
namespace {
constexpr BackoffEntry::Policy kDefaultBackoffPolicy = …;
}
namespace {
std::unique_ptr<SerialWorker::WorkItem> DoWork(
std::unique_ptr<SerialWorker::WorkItem> work_item) { … }
}
void SerialWorker::WorkItem::FollowupWork(base::OnceClosure closure) { … }
SerialWorker::SerialWorker(int max_number_of_retries,
const net::BackoffEntry::Policy* backoff_policy)
: … { … }
SerialWorker::~SerialWorker() = default;
void SerialWorker::WorkNow() { … }
void SerialWorker::WorkNowInternal() { … }
void SerialWorker::Cancel() { … }
void SerialWorker::OnDoWorkFinished(std::unique_ptr<WorkItem> work_item) { … }
void SerialWorker::OnFollowupWorkFinished(std::unique_ptr<WorkItem> work_item) { … }
void SerialWorker::RerunWork(std::unique_ptr<WorkItem> work_item) { … }
const BackoffEntry& SerialWorker::GetBackoffEntryForTesting() const { … }
const base::OneShotTimer& SerialWorker::GetRetryTimerForTesting() const { … }
int SerialWorker::GetFailureCount() const { … }
base::WeakPtr<SerialWorker> SerialWorker::AsWeakPtr() { … }
}