chromium/third_party/blink/renderer/platform/loader/fetch/fetch_utils.cc

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

#include "third_party/blink/renderer/platform/loader/fetch/fetch_utils.h"

#include <string_view>

#include "base/metrics/histogram_functions.h"
#include "base/strings/strcat.h"
#include "services/network/public/cpp/cors/cors.h"
#include "services/network/public/cpp/resource_request.h"
#include "third_party/blink/public/mojom/loader/resource_load_info.mojom-blink.h"
#include "third_party/blink/renderer/platform/network/http_header_map.h"
#include "third_party/blink/renderer/platform/network/http_names.h"
#include "third_party/blink/renderer/platform/network/http_parsers.h"
#include "third_party/blink/renderer/platform/wtf/hash_set.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/blink/renderer/platform/wtf/threading.h"

namespace blink {

namespace {

// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
//
// Must remain in sync with FetchKeepAliveRequestMetricType in
// tools/metrics/histograms/enums.xml.
// LINT.IfChange
enum class FetchKeepAliveRequestMetricType {};
// LINT.ThenChange(//content/browser/loader/keep_alive_url_loader.h)

bool IsHTTPWhitespace(UChar chr) {}

}  // namespace

bool FetchUtils::IsForbiddenMethod(const String& method) {}

bool FetchUtils::IsForbiddenResponseHeaderName(const String& name) {}

AtomicString FetchUtils::NormalizeMethod(const AtomicString& method) {}

String FetchUtils::NormalizeHeaderValue(const String& value) {}

// static
// We have this function at the bottom of this file because it confuses
// syntax highliting.
// TODO(kinuko): Deprecate this, we basically need to know the destination
// and if it's for favicon or not.
net::NetworkTrafficAnnotationTag FetchUtils::GetTrafficAnnotationTag(
    const network::ResourceRequest& request) {}

// static
void FetchUtils::LogFetchKeepAliveRequestMetric(
    const mojom::blink::RequestContextType& request_context_type,
    const FetchKeepAliveRequestState& request_state,
    bool is_context_detached) {}

void FetchUtils::LogFetchKeepAliveRequestSentToServiceMetric(
    const network::ResourceRequest& resource_request) {}

}  // namespace blink