chromium/services/network/public/mojom/web_client_hints_types.mojom

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

module network.mojom;

enum WebClientHintsType {
  // Enumerator values are logged in UMA histograms and must not be changed.
  // Hints may be removed from this list, so if you need the total count call
  // network::GetClientHintToNameMap().size() and don't use kMaxValue.

  // Warning: The list of client hints to be persisted for a given origin are
  // sent by the renderer process to the browser process. This makes it possible
  // for a malicious renderer to change the list of client hints to be sent to
  // arbitrary origins. As such, this list should not include any client hint
  // that provides user identification information, or anything that can be
  // considered as privacy sensitive information.
  // Additionally, all client hints headers are considered as CORS-safelisted
  // headers, and as such should not include any user identification or
  // privacy sensitive information.
  kDeviceMemory_DEPRECATED = 0,
  kDpr_DEPRECATED = 1,
  kResourceWidth_DEPRECATED = 2,
  kViewportWidth_DEPRECATED = 3,
  kRtt_DEPRECATED = 4,
  kDownlink_DEPRECATED = 5,
  kEct_DEPRECATED = 6,
  // kLang = 7, Removed in M96
  kUA = 8,
  kUAArch = 9,
  kUAPlatform = 10,
  kUAModel = 11,
  kUAMobile = 12,
  // Sec-CH-UA-Full-Version is soon to be deprecated,
  // prefer Sec-CH-UA-Full-Version-List instead.
  kUAFullVersion = 13,
  kUAPlatformVersion = 14,
  kPrefersColorScheme = 15,
  kUABitness = 16,
  // A client hint which, if set, signifies to the origin that the User-Agent
  // header contains the reduced user agent string.
  // kUAReduced = 17, Removed in M116.
  kViewportHeight = 18,
  kDeviceMemory = 19, // The `sec-ch-` variant of kDeviceMemory_DEPRECATED
  kDpr = 20, // The `sec-ch-` variant of kDpr_DEPRECATED
  kResourceWidth = 21, // The `sec-ch-` variant of kResourceWidth_DEPRECATED
  kViewportWidth = 22, // The `sec-ch-` variant of kViewportWidth_DEPRECATED
  // A new client hint to deprecate `sec-ch-ua-full-version`
  kUAFullVersionList = 23,
  // A client hint which, if set, signifies to the origin that the User-Agent
  // header contains the full user agent string.
  // kFullUserAgent = 24, Removed in M116.
  kUAWoW64 = 25,
  // kPartitionedCookies = 26, Removed in M103.
  // Indicates the client wants to minimize data transfer if set to 'on'.
  kSaveData = 27,
  // Indicates the client wants to minimize the amount of animation or motion
  // it uses if set to 'reduce'.
  kPrefersReducedMotion = 28,
  // The form factors of the user-agent device.
  kUAFormFactors = 29,
  // Indicates the client wants to minimize the amount of transparency
  // it uses if set to 'reduce'.
  kPrefersReducedTransparency = 30,

  // Warning: Before adding a new client hint, read the warning at the top.
};