#include "content/browser/service_worker/service_worker_cache_storage_matcher.h"
#include "base/functional/bind.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/trace_event/trace_event.h"
#include "components/services/storage/public/cpp/buckets/bucket_locator.h"
#include "components/services/storage/public/mojom/cache_storage_control.mojom.h"
#include "content/browser/service_worker/service_worker_context_core.h"
#include "content/browser/service_worker/service_worker_context_wrapper.h"
#include "content/browser/service_worker/service_worker_installed_scripts_sender.h"
#include "content/browser/service_worker/service_worker_version.h"
#include "content/browser/storage_partition_impl.h"
#include "third_party/blink/public/common/cache_storage/cache_storage_utils.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_fetch_response_callback.mojom.h"
namespace content {
ServiceWorkerCacheStorageMatcher::ServiceWorkerCacheStorageMatcher(
std::optional<std::string> cache_name,
blink::mojom::FetchAPIRequestPtr request,
scoped_refptr<ServiceWorkerVersion> version,
ServiceWorkerFetchDispatcher::FetchCallback fetch_callback)
: … { … }
ServiceWorkerCacheStorageMatcher::~ServiceWorkerCacheStorageMatcher() { … }
void ServiceWorkerCacheStorageMatcher::Run() { … }
void ServiceWorkerCacheStorageMatcher::DidMatch(
blink::mojom::MatchResultPtr result) { … }
void ServiceWorkerCacheStorageMatcher::FailFallback() { … }
void ServiceWorkerCacheStorageMatcher::RunCallback(
blink::ServiceWorkerStatusCode status,
ServiceWorkerFetchDispatcher::FetchEventResult fetch_result,
blink::mojom::FetchAPIResponsePtr response,
blink::mojom::ServiceWorkerStreamHandlePtr body_as_stream,
blink::mojom::ServiceWorkerFetchEventTimingPtr timing) { … }
}