summaryrefslogtreecommitdiff
path: root/net/features.gni
blob: 8027cbae175e8c74f0cabd2fda6da864fe8026cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/cronet/config.gni")
import("//build/config/features.gni")

declare_args() {
  # Disables support for file URLs.  File URL support requires use of icu.
  # Cronet does not support file URLs.
  disable_file_support = is_cronet_build

  # WebSockets and socket stream code are not used when blink is not used
  # and are optional in cronet.
  enable_websockets = use_blink

  # Enable Kerberos authentication. It is disabled by default on iOS, Fuchsia
  # and Chromecast, at least for now. This feature needs configuration
  # (krb5.conf and so on).
  # TODO(fuchsia): Enable kerberos on Fuchsia when it's implemented there.
  use_kerberos = !is_ios && !is_fuchsia && !is_castos && !is_cast_android

  # Do not disable brotli filter by default.
  disable_brotli_filter = false

  # Do not disable zstd filter by default, except for Cronet builds.
  disable_zstd_filter = is_cronet_build

  # Multicast DNS.
  enable_mdns = is_win || is_linux || is_chromeos || is_fuchsia || is_apple

  # Reporting not used on iOS.
  enable_reporting = !is_ios

  # Includes the transport security state preload list. This list includes
  # mechanisms (e.g. HSTS, HPKP) to enforce trusted connections to a significant
  # set of hardcoded domains. While this list has a several hundred KB of binary
  # size footprint, this flag should not be disabled unless the embedder is
  # willing to take the responsibility to make sure that all important
  # connections use HTTPS.
  include_transport_security_state_preload_list = true

  # Platforms for which certificate verification can be performed using the
  # builtin cert verifier with the Chrome Root Store, and this can be
  # configured using the ChromeRootStoreUsed feature flag. When the feature
  # flag is false, verification may be done with the platform verifier or the
  # builtin verifier using platform roots, depending on the platform.
  # See https://crbug.com/1216547 for status.
  chrome_root_store_optional = is_android && !is_cronet_build

  # Platforms for which certificate verification can only be performed using
  # the builtin cert verifier with the Chrome Root Store.
  chrome_root_store_only = is_win || is_mac || is_linux || is_chromeos
}

assert(!chrome_root_store_optional || !chrome_root_store_only,
       "at most one of chrome_root_store_optional and chrome_root_store_only " +
           "may be true")

# Needs to be in a separate declare_args since it refers to args set in the
# previous declare_args block.
declare_args() {
  # All platforms for which certificate verification can be performed using the
  # builtin cert verifier with the Chrome Root Store. This includes both
  # platforms where use of the Chrome Root Store is optional and platforms
  # where it is the only supported method.
  chrome_root_store_supported =
      chrome_root_store_optional || chrome_root_store_only
}