#include "services/network/public/cpp/client_hints.h"
#include <algorithm>
#include <optional>
#include <utility>
#include <vector>
#include "base/metrics/histogram_functions.h"
#include "base/no_destructor.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_tokenizer.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
#include "net/http/structured_headers.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace network {
const char kPrefersColorSchemeDark[] = …;
const char kPrefersColorSchemeLight[] = …;
const char kPrefersReducedMotionNoPreference[] = …;
const char kPrefersReducedMotionReduce[] = …;
const char kPrefersReducedTransparencyNoPreference[] = …;
const char kPrefersReducedTransparencyReduce[] = …;
const char* const kWebEffectiveConnectionTypeMapping[] = …;
const size_t kWebEffectiveConnectionTypeMappingCount = …;
ClientHintToNameMap MakeClientHintToNameMap() { … }
const ClientHintToNameMap& GetClientHintToNameMap() { … }
namespace {
struct ClientHintNameComparator { … };
DecodeMap;
DecodeMap MakeDecodeMap() { … }
const DecodeMap& GetDecodeMap() { … }
}
std::optional<std::vector<network::mojom::WebClientHintsType>>
ParseClientHintsHeader(const std::string& header) { … }
ClientHintToDelegatedThirdPartiesHeader::
ClientHintToDelegatedThirdPartiesHeader() = default;
ClientHintToDelegatedThirdPartiesHeader::
~ClientHintToDelegatedThirdPartiesHeader() = default;
ClientHintToDelegatedThirdPartiesHeader::
ClientHintToDelegatedThirdPartiesHeader(
const ClientHintToDelegatedThirdPartiesHeader&) = default;
const ClientHintToDelegatedThirdPartiesHeader
ParseClientHintToDelegatedThirdPartiesHeader(const std::string& header,
MetaCHType type) { … }
void LogClientHintsPersistenceMetrics(
const base::TimeTicks& persistence_started,
std::size_t hints_stored) { … }
}