chromium/third_party/blink/renderer/platform/loader/fetch/url_loader/code_cache_fetcher.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/platform/loader/fetch/url_loader/code_cache_fetcher.h"

#include "base/memory/scoped_refptr.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/renderer/platform/loader/fetch/code_cache_host.h"
#include "third_party/blink/renderer/platform/weborigin/scheme_registry.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"

namespace blink {

namespace {

bool ShouldUseIsolatedCodeCache(
    const network::mojom::URLResponseHead& response_head,
    const KURL& initial_url,
    const KURL& current_url,
    base::Time code_cache_response_time) {}

bool ShouldFetchCodeCache(const network::ResourceRequest& request) {}

mojom::blink::CodeCacheType GetCodeCacheType(
    network::mojom::RequestDestination destination) {}

}  // namespace

// static
scoped_refptr<CodeCacheFetcher> CodeCacheFetcher::TryCreateAndStart(
    const network::ResourceRequest& request,
    CodeCacheHost& code_cache_host,
    base::OnceClosure done_closure) {}

CodeCacheFetcher::CodeCacheFetcher(CodeCacheHost& code_cache_host,
                                   mojom::blink::CodeCacheType code_cache_type,
                                   const KURL& url,
                                   base::OnceClosure done_closure)
    :{}

void CodeCacheFetcher::Start() {}

void CodeCacheFetcher::DidReceiveCachedMetadataFromUrlLoader() {}

std::optional<mojo_base::BigBuffer> CodeCacheFetcher::TakeCodeCacheForResponse(
    const network::mojom::URLResponseHead& response_head) {}

void CodeCacheFetcher::DidReceiveCachedCode(base::Time response_time,
                                            mojo_base::BigBuffer data) {}

void CodeCacheFetcher::ClearCodeCacheEntryIfPresent() {}

}  // namespace blink