#include "content/browser/background_fetch/storage/delete_registration_task.h"
#include <utility>
#include "base/barrier_closure.h"
#include "base/functional/bind.h"
#include "base/trace_event/trace_event.h"
#include "content/browser/background_fetch/background_fetch.pb.h"
#include "content/browser/background_fetch/background_fetch_data_manager.h"
#include "content/browser/background_fetch/storage/database_helpers.h"
#include "content/browser/service_worker/service_worker_context_wrapper.h"
#include "third_party/blink/public/common/cache_storage/cache_storage_utils.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
namespace content {
namespace background_fetch {
namespace {
#if DCHECK_IS_ON()
void DCheckRegistrationNotActive(const std::string& unique_id,
const std::vector<std::string>& data,
blink::ServiceWorkerStatusCode status) { … }
#endif
}
DeleteRegistrationTask::DeleteRegistrationTask(
DatabaseTaskHost* host,
int64_t service_worker_registration_id,
const blink::StorageKey& storage_key,
const std::string& unique_id,
HandleBackgroundFetchErrorCallback callback)
: … { … }
DeleteRegistrationTask::~DeleteRegistrationTask() = default;
void DeleteRegistrationTask::Start() { … }
void DeleteRegistrationTask::DidGetRegistration(
base::OnceClosure done_closure,
const std::vector<std::string>& data,
blink::ServiceWorkerStatusCode status) { … }
void DeleteRegistrationTask::DidDeleteRegistration(
base::OnceClosure done_closure,
blink::ServiceWorkerStatusCode status) { … }
void DeleteRegistrationTask::DidDeleteCache(
base::OnceClosure done_closure,
int64_t trace_id,
blink::mojom::CacheStorageError error) { … }
void DeleteRegistrationTask::FinishWithError(
blink::mojom::BackgroundFetchError error) { … }
}
}