#include "content/browser/background_fetch/storage/get_initialization_data_task.h"
#include "base/barrier_closure.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/task_traits.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/background_fetch_request_info.h"
#include "content/browser/background_fetch/storage/database_helpers.h"
#include "content/browser/background_fetch/storage/image_helpers.h"
#include "content/browser/background_fetch/storage/mark_registration_for_deletion_task.h"
#include "content/browser/service_worker/service_worker_context_wrapper.h"
#include "content/common/fetch/fetch_api_request_proto.h"
#include "third_party/blink/public/common/manifest/manifest.h"
#include "ui/gfx/image/image.h"
#include "url/origin.h"
namespace content {
namespace background_fetch {
namespace {
class InitializationSubTask : public DatabaseTask { … };
class GetUIOptionsTask : public InitializationSubTask { … };
class GetRequestsTask : public InitializationSubTask { … };
class FillFromMetadataTask : public InitializationSubTask { … };
class FillBackgroundFetchInitializationDataTask : public InitializationSubTask { … };
}
BackgroundFetchInitializationData::BackgroundFetchInitializationData() =
default;
BackgroundFetchInitializationData::BackgroundFetchInitializationData(
BackgroundFetchInitializationData&&) = default;
BackgroundFetchInitializationData::~BackgroundFetchInitializationData() =
default;
GetInitializationDataTask::GetInitializationDataTask(
DatabaseTaskHost* host,
GetInitializationDataCallback callback)
: … { … }
GetInitializationDataTask::~GetInitializationDataTask() = default;
void GetInitializationDataTask::Start() { … }
void GetInitializationDataTask::DidGetRegistrations(
const std::vector<std::pair<int64_t, std::string>>& user_data,
blink::ServiceWorkerStatusCode status) { … }
void GetInitializationDataTask::FinishWithError(
blink::mojom::BackgroundFetchError error) { … }
}
}