#include "components/offline_pages/core/background/cleanup_task.h"
#include "base/functional/bind.h"
#include "base/notreached.h"
#include "components/offline_pages/core/background/offliner_policy.h"
#include "components/offline_pages/core/background/offliner_policy_utils.h"
#include "components/offline_pages/core/background/request_coordinator_event_logger.h"
#include "components/offline_pages/core/background/request_notifier.h"
#include "components/offline_pages/core/background/request_queue_store.h"
#include "components/offline_pages/core/background/save_page_request.h"
namespace offline_pages {
namespace {
RequestNotifier::BackgroundSavePageResult ToBackgroundSavePageResult(
OfflinerPolicyUtils::RequestExpirationStatus expiration_status) { … }
}
CleanupTask::CleanupTask(RequestQueueStore* store,
OfflinerPolicy* policy,
RequestNotifier* notifier,
RequestCoordinatorEventLogger* event_logger)
: … { … }
CleanupTask::~CleanupTask() { … }
void CleanupTask::Run() { … }
void CleanupTask::GetRequests() { … }
void CleanupTask::Prune(
bool success,
std::vector<std::unique_ptr<SavePageRequest>> requests) { … }
void CleanupTask::OnRequestsExpired(UpdateRequestsResult result) { … }
void CleanupTask::PopulateExpiredRequestIdsAndReasons(
std::vector<std::unique_ptr<SavePageRequest>> requests) { … }
}