chromium/services/network/public/cpp/request_destination.cc

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

#include "services/network/public/cpp/request_destination.h"

#include <string_view>

#include "base/containers/fixed_flat_map.h"

namespace network {

namespace {

// These strings are used in histograms, so do not change the values without
// updating/deprecating histograms which use RequestDestination.
//
// When updating this, consider also updating RequestDestination in
// third_party/blink/renderer/core/fetch/request.idl.

// LINT.IfChange
constexpr char kEmpty[] =;
constexpr char kAudio[] =;
constexpr char kAudioWorklet[] =;
constexpr char kDocument[] =;
constexpr char kEmbed[] =;
constexpr char kFont[] =;
constexpr char kFrame[] =;
constexpr char kIframe[] =;
constexpr char kImage[] =;
constexpr char kJson[] =;
constexpr char kManifest[] =;
constexpr char kObject[] =;
constexpr char kPaintWorklet[] =;
constexpr char kReport[] =;
constexpr char kScript[] =;
constexpr char kServiceWorker[] =;
constexpr char kSharedWorker[] =;
constexpr char kStyle[] =;
constexpr char kTrack[] =;
constexpr char kVideo[] =;
constexpr char kWebBundle[] =;
constexpr char kWorker[] =;
constexpr char kXslt[] =;
constexpr char kFencedframe[] =;
constexpr char kWebIdentity[] =;
constexpr char kDictionary[] =;
constexpr char kSpeculationRules[] =;
constexpr char kSharedStorageWorklet[] =;

constexpr auto kRequestDestinationToStringMap =;

constexpr auto kRequestDestinationFromStringMap =;
// LINT.ThenChange(/third_party/blink/renderer/core/fetch/request.idl)

static_assert;
static_assert;

constexpr char kFiveCharEmptyString[] =;

}  // namespace

const char* RequestDestinationToString(network::mojom::RequestDestination dest,
                                       EmptyRequestDestinationOption option) {}

std::optional<network::mojom::RequestDestination> RequestDestinationFromString(
    std::string_view dest_str,
    EmptyRequestDestinationOption option) {}

const char* RequestDestinationToStringForHistogram(
    network::mojom::RequestDestination dest) {}

bool IsRequestDestinationEmbeddedFrame(
    network::mojom::RequestDestination dest) {}

}  // namespace network