// 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.
module network.mojom;
// Indicates whether web or OS-level Attribution Reporting is supported.
// See https://github.com/WICG/attribution-reporting-api/blob/main/app_to_web.md.
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
//
// LINT.IfChange(AttributionSupport)
enum AttributionSupport {
kWeb = 0,
kWebAndOs = 1,
kOs = 2,
// Neither web nor OS is supported.
kNone = 3,
// The support value is unknown, e.g. within service worker.
kUnset = 4,
};
// LINT.ThenChange(//tools/metrics/histograms/enums.xml:ConversionRequestSupportHeader)
// Controls the value of the Attribution-Reporting-Eligible request header, if
// any. This header controls which registrations a response is allowed to
// register. In most contexts, by default, a response is allowed to register
// triggers when the header is omitted.
enum AttributionReportingEligibility {
// The header is not set.
kUnset,
// The header is set to the empty string.
kEmpty,
// The header contains `event-source`.
kEventSource,
// The header contains `navigation-source`.
kNavigationSource,
// The header contains `trigger`.
kTrigger,
// The header contains `event-source, trigger`.
kEventSourceOrTrigger,
};