chromium/content/browser/attribution_reporting/interop/parser.h

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

#ifndef CONTENT_BROWSER_ATTRIBUTION_REPORTING_INTEROP_PARSER_H_
#define CONTENT_BROWSER_ATTRIBUTION_REPORTING_INTEROP_PARSER_H_

#include <stdint.h>

#include <iosfwd>
#include <optional>
#include <string>
#include <vector>

#include "base/containers/flat_set.h"
#include "base/memory/scoped_refptr.h"
#include "base/time/time.h"
#include "base/types/expected.h"
#include "base/values.h"
#include "components/attribution_reporting/privacy_math.h"
#include "components/attribution_reporting/suitable_origin.h"
#include "content/browser/attribution_reporting/attribution_config.h"
#include "services/network/public/mojom/attribution.mojom-forward.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "url/gurl.h"

namespace net {
class HttpResponseHeaders;
}  // namespace net

namespace url {
class Origin;
}  // namespace url

namespace content {

struct AttributionSimulationEvent {};

// See //content/test/data/attribution_reporting/interop/README.md for the
// schema.

base::expected<std::vector<AttributionSimulationEvent>, std::string>
    ParseAttributionInteropInput(base::Value::Dict);

struct AttributionInteropConfig {};

base::expected<AttributionInteropConfig, std::string>
    ParseAttributionInteropConfig(base::Value::Dict);

base::expected<void, std::string> MergeAttributionInteropConfig(
    base::Value::Dict,
    AttributionInteropConfig&);

struct AttributionInteropOutput {};

std::ostream& operator<<(std::ostream&,
                         const AttributionInteropOutput::Report&);

std::ostream& operator<<(std::ostream&, const AttributionInteropOutput&);

struct AttributionInteropRun {};

}  // namespace content

#endif  // CONTENT_BROWSER_ATTRIBUTION_REPORTING_INTEROP_PARSER_H_