summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/platform/loader/fetch/trust_token_params_conversion.h
blob: 9ba5fe7780657fd9995024ccc8cf65ed0e01ac85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_FETCH_TRUST_TOKEN_PARAMS_CONVERSION_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_FETCH_TRUST_TOKEN_PARAMS_CONVERSION_H_

#include "base/optional.h"
#include "services/network/public/cpp/optional_trust_token_params.h"
#include "third_party/blink/public/platform/web_common.h"

namespace network {
namespace mojom {
namespace blink {
class TrustTokenParams;

}  // namespace blink
}  // namespace mojom
}  // namespace network

namespace blink {

// Converts a mojom::blink TrustTokenParams object to its non-Blink counterpart
// by directly copying all fields, converting types where necessary.
network::OptionalTrustTokenParams ConvertTrustTokenParams(
    const base::Optional<network::mojom::blink::TrustTokenParams>& maybe_in);

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_FETCH_TRUST_TOKEN_PARAMS_CONVERSION_H_