chromium/net/dns/public/host_resolver_source.h

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

#ifndef NET_DNS_PUBLIC_HOST_RESOLVER_SOURCE_H_
#define NET_DNS_PUBLIC_HOST_RESOLVER_SOURCE_H_

#include <iterator>
#include <optional>

#include "base/values.h"

namespace net {

// Enumeration to specify the allowed results source for HostResolver
// requests.
//
// Integer values used for (de)serialization. Do not renumber.
enum class HostResolverSource {};

base::Value ToValue(HostResolverSource source);

// std::nullopt if `value` is malformed for deserialization.
std::optional<HostResolverSource> HostResolverSourceFromValue(
    const base::Value& value);

const HostResolverSource kHostResolverSources[] =;

static_assert;

}  // namespace net

#endif  // NET_DNS_PUBLIC_HOST_RESOLVER_SOURCE_H_