#include "components/download/public/task/task_manager_impl.h"
namespace download {
namespace {
bool HasDuplicateParams(
const std::map<DownloadTaskType, TaskManager::TaskParams>& map,
DownloadTaskType task_type,
const TaskManager::TaskParams& params) { … }
}
TaskManagerImpl::TaskManagerImpl(std::unique_ptr<TaskScheduler> task_scheduler)
: … { … }
TaskManagerImpl::~TaskManagerImpl() = default;
void TaskManagerImpl::ScheduleTask(DownloadTaskType task_type,
const TaskParams& params) { … }
void TaskManagerImpl::UnscheduleTask(DownloadTaskType task_type) { … }
void TaskManagerImpl::OnStartScheduledTask(DownloadTaskType task_type,
TaskFinishedCallback callback) { … }
void TaskManagerImpl::OnStopScheduledTask(DownloadTaskType task_type) { … }
bool TaskManagerImpl::IsRunningTask(DownloadTaskType task_type) const { … }
void TaskManagerImpl::NotifyTaskFinished(DownloadTaskType task_type,
bool needs_reschedule) { … }
}