chromium/content/browser/preloading/prerender/prerender_attributes.cc

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

#include "content/browser/preloading/prerender/prerender_attributes.h"

#include <optional>

#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"

namespace content {

void PrerenderAttributes::WriteIntoTrace(
    perfetto::TracedValue trace_context) const {}

PrerenderAttributes::PrerenderAttributes(
    const GURL& prerendering_url,
    PreloadingTriggerType trigger_type,
    const std::string& embedder_histogram_suffix,
    std::optional<blink::mojom::SpeculationTargetHint> target_hint,
    Referrer referrer,
    std::optional<blink::mojom::SpeculationEagerness> eagerness,
    std::optional<net::HttpNoVarySearchData> no_vary_search_expected,
    std::optional<url::Origin> initiator_origin,
    int initiator_process_id,
    base::WeakPtr<WebContents> initiator_web_contents,
    std::optional<blink::LocalFrameToken> initiator_frame_token,
    int initiator_frame_tree_node_id,
    ukm::SourceId initiator_ukm_id,
    ui::PageTransition transition_type,
    bool should_warm_up_compositor,
    base::RepeatingCallback<bool(const GURL&,
                                 const std::optional<UrlMatchType>&)>
        url_match_predicate,
    base::RepeatingCallback<void(NavigationHandle&)>
        prerender_navigation_handle_callback,
    const std::optional<base::UnguessableToken>&
        initiator_devtools_navigation_token)
    :{}

PrerenderAttributes::~PrerenderAttributes() = default;
PrerenderAttributes::PrerenderAttributes(const PrerenderAttributes&) = default;
PrerenderAttributes& PrerenderAttributes::operator=(
    const PrerenderAttributes&) = default;
PrerenderAttributes::PrerenderAttributes(PrerenderAttributes&&) = default;
PrerenderAttributes& PrerenderAttributes::operator=(PrerenderAttributes&&) =
    default;

}  // namespace content