chromium/services/network/attribution/request_headers_internal.h

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

#ifndef SERVICES_NETWORK_ATTRIBUTION_REQUEST_HEADERS_INTERNAL_H_
#define SERVICES_NETWORK_ATTRIBUTION_REQUEST_HEADERS_INTERNAL_H_

#include <stdint.h>

#include <string>

#include "services/network/public/mojom/attribution.mojom-forward.h"

namespace network {

// Options controlling greasing during serialization of the
// Attribution-Reporting-Eligible and Attribution-Reportnig-Support headers,
// which contain structured dictionaries.
struct AttributionReportingHeaderGreaseOptions {};

// Must not be called with `mojom::AttributionReportingEligibility::kUnset`.
std::string SerializeAttributionReportingEligibleHeader(
    mojom::AttributionReportingEligibility,
    const AttributionReportingHeaderGreaseOptions&);

// Returns the value to be set for the `Attribution-Reporting-Support` request
// header.
std::string GetAttributionSupportHeader(
    mojom::AttributionSupport,
    const AttributionReportingHeaderGreaseOptions&);

}  // namespace network

#endif  // SERVICES_NETWORK_ATTRIBUTION_REQUEST_HEADERS_INTERNAL_H_