chromium/third_party/blink/renderer/core/html/parser/preload_request.cc

// Copyright 2015 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/core/html/parser/preload_request.h"

#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_functions.h"
#include "services/network/public/mojom/attribution.mojom-blink.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/frame/attribution_src_loader.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/lcp_critical_path_predictor/lcp_critical_path_predictor.h"
#include "third_party/blink/renderer/core/loader/document_loader.h"
#include "third_party/blink/renderer/core/loader/preload_helper.h"
#include "third_party/blink/renderer/core/script/document_write_intervention.h"
#include "third_party/blink/renderer/core/script/script_loader.h"
#include "third_party/blink/renderer/platform/loader/fetch/cross_origin_attribute_value.h"
#include "third_party/blink/renderer/platform/loader/fetch/fetch_initiator_info.h"
#include "third_party/blink/renderer/platform/loader/fetch/fetch_parameters.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_loader_options.h"
#include "third_party/blink/renderer/platform/network/http_names.h"
#include "third_party/blink/renderer/platform/network/network_state_notifier.h"
#include "third_party/blink/renderer/platform/weborigin/security_policy.h"

namespace blink {

PreloadRequest::ExclusionInfo::ExclusionInfo(const KURL& document_url,
                                             HashSet<KURL> scopes,
                                             HashSet<KURL> resources)
    :{}

PreloadRequest::ExclusionInfo::~ExclusionInfo() = default;

bool PreloadRequest::ExclusionInfo::ShouldExclude(
    const KURL& base_url,
    const String& resource_url) const {}

KURL PreloadRequest::CompleteURL(Document* document) {}

// static
std::unique_ptr<PreloadRequest> PreloadRequest::CreateIfNeeded(
    const String& initiator_name,
    const String& resource_url,
    const KURL& base_url,
    ResourceType resource_type,
    const network::mojom::ReferrerPolicy referrer_policy,
    ResourceFetcher::IsImageSet is_image_set,
    const ExclusionInfo* exclusion_info,
    std::optional<float> resource_width,
    std::optional<float> resource_height,
    RequestType request_type) {}

Resource* PreloadRequest::Start(Document* document) {}

}  // namespace blink