| # 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/chrome_build.gni") | 
 | import("//build/config/cronet/config.gni") | 
 | import("//build/config/features.gni") | 
 | import("//extensions/buildflags/buildflags.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: either, blink is not | 
 |   # used; or, Cronet is being built. | 
 |   enable_websockets = use_blink && !is_cronet_build | 
 |  | 
 |   # 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. | 
 |   # TODO: https://crbug.com/40282397 - Consider dropping once Cronet default enables zstd. | 
 |   disable_zstd_filter = false | 
 |  | 
 |   # Multicast DNS. Enabled on desktop Android for the chrome.mdns extension API. | 
 |   enable_mdns = is_win || is_linux || is_chromeos || is_fuchsia || is_apple || | 
 |                 enable_desktop_android_extensions | 
 |  | 
 |   # 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 = !is_cronet_build | 
 |  | 
 |   # Platforms for which certificate verification can be performed either using | 
 |   # the builtin cert verifier with the Chrome Root Store, or with the platform | 
 |   # verifier. | 
 |   # | 
 |   # Currently this is used only for Android because WebView does not use the | 
 |   # builtin cert verifier, but uses the Android cert verifier. | 
 |   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 | 
 |  | 
 |   # DBSC is only supported on Windows, Linux and Mac for now. | 
 |   enable_device_bound_sessions = is_win || is_linux || is_mac | 
 |  | 
 |   # Bracketed URIs parsing is only available for debug builds. | 
 |   # TODO(crbug.com/365771838): Ensure tests are updated if needed if this | 
 |   # feature is changed at all. | 
 |   enable_bracketed_proxy_uris = is_debug | 
 |  | 
 |   # General QUIC proxy support is only available for debug builds. | 
 |   # TODO(crbug.com/367400641): If flag is changed or removed, ensure all | 
 |   # TODOs for this bug are correctly modified. | 
 |   enable_quic_proxy_support = is_debug | 
 |  | 
 |   # The SQL disk cache backend is an experimental feature (crbug.com/422065015). | 
 |   # It is enabled only in specific build configurations to avoid increasing the | 
 |   # build size. | 
 |   enable_disk_cache_sql_backend = | 
 |       (is_linux && !is_castos) || | 
 |       (is_android && !is_cast_android && !is_cronet_build) || is_win || | 
 |       is_mac || 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 | 
 | } |