#include "services/network/attribution/request_headers_internal.h"
#include <stdint.h>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include "base/check.h"
#include "base/notreached.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/types/cxx23_to_underlying.h"
#include "net/http/structured_headers.h"
#include "services/network/public/mojom/attribution.mojom.h"
namespace network {
namespace {
GreaseContext;
AttributionReportingEligibility;
void AddTrueValuedDictMember(
std::vector<net::structured_headers::DictionaryMember>& dict,
std::string key) { … }
void ApplyGreaseContext(
std::vector<net::structured_headers::DictionaryMember>& dict,
GreaseContext context,
bool use_front,
const char* grease) { … }
void ApplyGrease(std::vector<net::structured_headers::DictionaryMember>& dict,
const AttributionReportingHeaderGreaseOptions& options,
const char* grease1,
const char* grease2) { … }
}
AttributionReportingHeaderGreaseOptions
AttributionReportingHeaderGreaseOptions::FromBits(uint8_t bits) { … }
std::string SerializeAttributionReportingEligibleHeader(
const AttributionReportingEligibility eligibility,
const AttributionReportingHeaderGreaseOptions& options) { … }
std::string GetAttributionSupportHeader(
mojom::AttributionSupport attribution_support,
const AttributionReportingHeaderGreaseOptions& options) { … }
}