blob: 5e4ca1bcb77f909b2fbe7668def38e64fd335577 [file] [log] [blame]
# Copyright 2013 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/buildflag_header.gni")
import("//build/config/cast.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/compiler/compiler.gni")
import("//build/config/cronet/config.gni")
import("//build/config/features.gni")
import("//crypto/features.gni")
import("//net/features.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
import("//third_party/icu/config.gni")
import("//third_party/protobuf/proto_library.gni")
import("//tools/grit/grit_rule.gni")
import("//url/features.gni")
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
import("//third_party/jni_zero/jni_zero.gni")
} else if (is_mac) {
import("//build/config/mac/mac_sdk.gni")
} else if (is_ios) {
import("//build/config/ios/bundle_data_from_filelist.gni")
}
# Android:
# The way the cache uses mmap() is inefficient on some Android devices. If
# this flag is set, we hackily avoid using mmap() in the disk cache. We are
# pretty confident that mmap-ing the index would not hurt any existing x86
# android devices, but we cannot be so sure about the variety of ARM devices.
# So enable it for x86 only for now.
# Fuchsia:
# Writable mmap isn't supported on Fuchsia, so it should be bypassed.
posix_bypass_mmap = (is_android && current_cpu != "x86") || is_fuchsia
enable_built_in_dns = use_blink
# TODO(droger): Support client auth on iOS. See http://crbug.com/145954).
#
# Historically this was disabled because client auth required
# platform-specific code deep in //net. Nowadays, this is abstracted away and
# we could enable the interfaces on iOS for platform-independence. However,
# merely enabling them changes our behavior from automatically proceeding
# with no client certificate to raising
# `URLRequest::Delegate::OnCertificateRequested`. Callers would need to be
# updated to apply that behavior manually.
#
# If fixing this, re-enable the tests in ssl_client_socket_unittest.cc and
# ssl_server_socket_unittest.cc which are disabled on iOS.
enable_client_certificates = !is_ios || (use_blink && !is_cronet_build)
# Unix sockets are not supported on iOS.
enable_unix_sockets = is_posix && !is_ios
# x86/x64 cast_shell builds run on regular trybots and can use python runtime
# and remote test server. ARM cast_shell builds don't have python runtime.
is_arm_cast_shell_build = (is_castos || is_cast_android) &&
(current_cpu == "arm" || current_cpu == "arm64")
# Python works only on Linux, MacOS and Windows so exclude the others,
# chromecast, android, fuchsia, ios.
enable_python_utils =
!is_arm_cast_shell_build && !is_android && !is_fuchsia && !is_ios
# Platforms that cannot use python_utils (like Android but see full
# list above) will instead use a remote server.
use_remote_test_server =
!enable_python_utils && (enable_websockets || (is_cronet_build && !is_ios))
# Whether //net should use an external GSSAPI library for implementing HTTP
# Negotiate authentication. All platforms for which use_kerberos is true should
# have some external implementation since //net doesn't have intrinsic support
# for Kerberos. This implementation is an external GSSAPI library on all
# platforms except on:
#
# Windows : Uses SSPI for Negotiate authentication.
#
# Android : Uses an external authenticator. See
# https://www.chromium.org/developers/design-documents/http-authentication/writing-a-spnego-authenticator-for-chrome-on-android
use_external_gssapi = use_kerberos && !is_android && !is_win
config("net_test_config") {
if (use_remote_test_server) {
defines = [ "USE_REMOTE_TEST_SERVER" ]
}
}
buildflag_header("buildflags") {
header = "net_buildflags.h"
flags = [
"POSIX_BYPASS_MMAP=$posix_bypass_mmap",
"DISABLE_FILE_SUPPORT=$disable_file_support",
"ENABLE_MDNS=$enable_mdns",
"ENABLE_REPORTING=$enable_reporting",
"ENABLE_WEBSOCKETS=$enable_websockets",
"ENABLE_CLIENT_CERTIFICATES=$enable_client_certificates",
"INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST=$include_transport_security_state_preload_list",
"USE_KERBEROS=$use_kerberos",
"USE_EXTERNAL_GSSAPI=$use_external_gssapi",
"CHROME_ROOT_STORE_OPTIONAL=$chrome_root_store_optional",
"CHROME_ROOT_STORE_ONLY=$chrome_root_store_only",
"CHROME_ROOT_STORE_SUPPORTED=$chrome_root_store_supported",
"ENABLE_DEVICE_BOUND_SESSIONS=$enable_device_bound_sessions",
]
}
config("net_internal_config") {
defines = [ "NET_IMPLEMENTATION" ]
if (enable_built_in_dns) {
defines += [ "ENABLE_BUILT_IN_DNS" ]
}
}
net_configs = [
":net_internal_config",
"//build/config:precompiled_headers",
"//build/config/compiler:wexit_time_destructors",
]
if (is_linux || is_chromeos) {
net_configs += [ "//build/config/linux:libresolv" ]
}
source_set("constants") {
sources = [ "base/trace_constants.h" ]
deps = [ "//base" ]
}
buildflag_header("cronet_buildflags") {
header = "cronet_buildflags.h"
header_dir = "net/base"
flags = [ "CRONET_BUILD=$is_cronet_build" ]
}
component("net") {
sources = [
"base/address_family.cc",
"base/address_family.h",
"base/address_list.cc",
"base/address_list.h",
"base/auth.cc",
"base/auth.h",
"base/backoff_entry.cc",
"base/backoff_entry.h",
"base/backoff_entry_serializer.cc",
"base/backoff_entry_serializer.h",
"base/cache_type.h",
"base/chunked_upload_data_stream.cc",
"base/chunked_upload_data_stream.h",
"base/completion_once_callback.h",
"base/completion_repeating_callback.h",
"base/connection_endpoint_metadata.cc",
"base/connection_endpoint_metadata.h",
"base/data_url.cc",
"base/data_url.h",
"base/datagram_buffer.cc",
"base/datagram_buffer.h",
"base/elements_upload_data_stream.cc",
"base/elements_upload_data_stream.h",
"base/expiring_cache.h",
"base/features.cc",
"base/features.h",
"base/file_stream.cc",
"base/file_stream.h",
"base/file_stream_context.cc",
"base/file_stream_context.h",
"base/filename_util.cc",
"base/filename_util.h",
"base/filename_util_internal.cc",
"base/filename_util_internal.h",
"base/hash_value.cc",
"base/hash_value.h",
"base/hex_utils.cc",
"base/hex_utils.h",
"base/host_mapping_rules.cc",
"base/host_mapping_rules.h",
"base/host_port_pair.cc",
"base/host_port_pair.h",
"base/http_user_agent_settings.h",
"base/idempotency.h",
"base/interval.h",
"base/io_buffer.cc",
"base/io_buffer.h",
"base/ip_address.cc",
"base/ip_address.h",
"base/ip_endpoint.cc",
"base/ip_endpoint.h",
"base/isolation_info.cc",
"base/isolation_info.h",
"base/load_flags.h",
"base/load_flags_list.h",
"base/load_states.h",
"base/load_states_list.h",
"base/load_timing_info.cc",
"base/load_timing_info.h",
"base/logging_network_change_observer.cc",
"base/logging_network_change_observer.h",
"base/lookup_string_in_fixed_set.cc",
"base/lookup_string_in_fixed_set.h",
"base/mime_sniffer.cc",
"base/mime_sniffer.h",
"base/mime_util.cc",
"base/mime_util.h",
"base/net_error_details.h",
"base/net_error_list.h",
"base/net_errors.cc",
"base/net_errors.h",
"base/net_info_source_list.h",
"base/net_module.cc",
"base/net_module.h",
"base/net_string_util.h",
"base/network_activity_monitor.cc",
"base/network_activity_monitor.h",
"base/network_anonymization_key.cc",
"base/network_anonymization_key.h",
"base/network_change_notifier.cc",
"base/network_change_notifier.h",
"base/network_change_notifier_factory.h",
"base/network_delegate.cc",
"base/network_delegate.h",
"base/network_delegate_impl.cc",
"base/network_delegate_impl.h",
"base/network_handle.h",
"base/network_interfaces.cc",
"base/network_interfaces.h",
"base/network_isolation_key.cc",
"base/network_isolation_key.h",
"base/parse_number.cc",
"base/parse_number.h",
"base/platform_mime_util.h",
"base/port_util.cc",
"base/port_util.h",
"base/prioritized_dispatcher.cc",
"base/prioritized_dispatcher.h",
"base/prioritized_task_runner.cc",
"base/prioritized_task_runner.h",
"base/priority_queue.h",
"base/privacy_mode.cc",
"base/privacy_mode.h",
"base/proxy_chain.cc",
"base/proxy_chain.h",
"base/proxy_delegate.h",
"base/proxy_server.cc",
"base/proxy_server.h",
"base/proxy_string_util.cc",
"base/proxy_string_util.h",
"base/rand_callback.h",
"base/registry_controlled_domains/registry_controlled_domain.cc",
"base/registry_controlled_domains/registry_controlled_domain.h",
"base/request_priority.cc",
"base/request_priority.h",
"base/scheme_host_port_matcher.cc",
"base/scheme_host_port_matcher.h",
"base/scheme_host_port_matcher_result.h",
"base/scheme_host_port_matcher_rule.cc",
"base/scheme_host_port_matcher_rule.h",
"base/schemeful_site.cc",
"base/schemeful_site.h",
"base/session_usage.h",
"base/sockaddr_storage.cc",
"base/sockaddr_storage.h",
"base/sys_addrinfo.h",
"base/trace_event_stub.h",
"base/tracing.h",
"base/transport_info.cc",
"base/transport_info.h",
"base/upload_bytes_element_reader.cc",
"base/upload_bytes_element_reader.h",
"base/upload_data_stream.cc",
"base/upload_data_stream.h",
"base/upload_element_reader.cc",
"base/upload_element_reader.h",
"base/upload_file_element_reader.cc",
"base/upload_file_element_reader.h",
"base/upload_progress.h",
"base/url_search_params.cc",
"base/url_search_params.h",
"base/url_util.cc",
"base/url_util.h",
"cert/asn1_util.cc",
"cert/asn1_util.h",
"cert/caching_cert_verifier.cc",
"cert/caching_cert_verifier.h",
"cert/cert_database.cc",
"cert/cert_database.h",
"cert/cert_net_fetcher.h",
"cert/cert_status_flags.cc",
"cert/cert_status_flags.h",
"cert/cert_status_flags_list.h",
"cert/cert_verifier.cc",
"cert/cert_verifier.h",
"cert/cert_verify_proc.cc",
"cert/cert_verify_proc.h",
"cert/cert_verify_proc_blocklist.inc",
"cert/cert_verify_proc_builtin.cc",
"cert/cert_verify_proc_builtin.h",
"cert/cert_verify_result.cc",
"cert/cert_verify_result.h",
"cert/client_cert_verifier.h",
"cert/coalescing_cert_verifier.cc",
"cert/coalescing_cert_verifier.h",
"cert/crl_set.cc",
"cert/crl_set.h",
"cert/ct_log_response_parser.cc",
"cert/ct_log_response_parser.h",
"cert/ct_log_verifier.cc",
"cert/ct_log_verifier.h",
"cert/ct_log_verifier_util.cc",
"cert/ct_log_verifier_util.h",
"cert/ct_objects_extractor.cc",
"cert/ct_objects_extractor.h",
"cert/ct_policy_enforcer.cc",
"cert/ct_policy_enforcer.h",
"cert/ct_policy_status.cc",
"cert/ct_policy_status.h",
"cert/ct_sct_to_string.cc",
"cert/ct_sct_to_string.h",
"cert/ct_serialization.cc",
"cert/ct_serialization.h",
"cert/ct_signed_certificate_timestamp_log_param.cc",
"cert/ct_signed_certificate_timestamp_log_param.h",
"cert/ct_verifier.h",
"cert/do_nothing_ct_verifier.cc",
"cert/do_nothing_ct_verifier.h",
"cert/ev_root_ca_metadata.cc",
"cert/ev_root_ca_metadata.h",
"cert/internal/cert_issuer_source_aia.cc",
"cert/internal/cert_issuer_source_aia.h",
"cert/internal/revocation_checker.cc",
"cert/internal/revocation_checker.h",
"cert/internal/system_trust_store.cc",
"cert/internal/system_trust_store.h",
"cert/internal/trust_store_features.cc",
"cert/internal/trust_store_features.h",
"cert/known_roots.cc",
"cert/known_roots.h",
"cert/merkle_audit_proof.cc",
"cert/merkle_audit_proof.h",
"cert/merkle_consistency_proof.cc",
"cert/merkle_consistency_proof.h",
"cert/merkle_tree_leaf.cc",
"cert/merkle_tree_leaf.h",
"cert/multi_log_ct_verifier.cc",
"cert/multi_log_ct_verifier.h",
"cert/multi_threaded_cert_verifier.cc",
"cert/multi_threaded_cert_verifier.h",
"cert/root_cert_list_generated.h",
"cert/sct_auditing_delegate.h",
"cert/sct_status_flags.cc",
"cert/sct_status_flags.h",
"cert/signed_certificate_timestamp.cc",
"cert/signed_certificate_timestamp.h",
"cert/signed_certificate_timestamp_and_status.cc",
"cert/signed_certificate_timestamp_and_status.h",
"cert/signed_tree_head.cc",
"cert/signed_tree_head.h",
"cert/symantec_certs.cc",
"cert/symantec_certs.h",
"cert/test_root_certs.cc",
"cert/test_root_certs.h",
"cert/time_conversions.cc",
"cert/time_conversions.h",
"cert/x509_cert_types.cc",
"cert/x509_cert_types.h",
"cert/x509_certificate.cc",
"cert/x509_certificate.h",
"cert/x509_certificate_net_log_param.cc",
"cert/x509_certificate_net_log_param.h",
"cert/x509_util.cc",
"cert/x509_util.h",
"cert_net/cert_net_fetcher_url_request.cc",
"cert_net/cert_net_fetcher_url_request.h",
"cookies/canonical_cookie.cc",
"cookies/canonical_cookie.h",
"cookies/cookie_access_delegate.cc",
"cookies/cookie_access_delegate.h",
"cookies/cookie_access_params.h",
"cookies/cookie_access_result.cc",
"cookies/cookie_access_result.h",
"cookies/cookie_base.cc",
"cookies/cookie_base.h",
"cookies/cookie_change_dispatcher.cc",
"cookies/cookie_change_dispatcher.h",
"cookies/cookie_constants.cc",
"cookies/cookie_constants.h",
"cookies/cookie_deletion_info.cc",
"cookies/cookie_deletion_info.h",
"cookies/cookie_inclusion_status.cc",
"cookies/cookie_inclusion_status.h",
"cookies/cookie_monster.cc",
"cookies/cookie_monster.h",
"cookies/cookie_monster_change_dispatcher.cc",
"cookies/cookie_monster_change_dispatcher.h",
"cookies/cookie_monster_netlog_params.cc",
"cookies/cookie_monster_netlog_params.h",
"cookies/cookie_options.cc",
"cookies/cookie_options.h",
"cookies/cookie_partition_key.cc",
"cookies/cookie_partition_key.h",
"cookies/cookie_partition_key_collection.cc",
"cookies/cookie_partition_key_collection.h",
"cookies/cookie_setting_override.h",
"cookies/cookie_store.cc",
"cookies/cookie_store.h",
"cookies/cookie_util.cc",
"cookies/cookie_util.h",
"cookies/parsed_cookie.cc",
"cookies/parsed_cookie.h",
"cookies/site_for_cookies.cc",
"cookies/site_for_cookies.h",
"cookies/static_cookie_policy.cc",
"cookies/static_cookie_policy.h",
"disk_cache/backend_cleanup_tracker.cc",
"disk_cache/backend_cleanup_tracker.h",
"disk_cache/blockfile/addr.cc",
"disk_cache/blockfile/addr.h",
"disk_cache/blockfile/backend_impl.cc",
"disk_cache/blockfile/backend_impl.h",
"disk_cache/blockfile/bitmap.cc",
"disk_cache/blockfile/bitmap.h",
"disk_cache/blockfile/block_files.cc",
"disk_cache/blockfile/block_files.h",
"disk_cache/blockfile/disk_format.cc",
"disk_cache/blockfile/disk_format.h",
"disk_cache/blockfile/disk_format_base.h",
"disk_cache/blockfile/entry_impl.cc",
"disk_cache/blockfile/entry_impl.h",
"disk_cache/blockfile/errors.h",
"disk_cache/blockfile/eviction.cc",
"disk_cache/blockfile/eviction.h",
"disk_cache/blockfile/experiments.h",
"disk_cache/blockfile/file.cc",
"disk_cache/blockfile/file.h",
"disk_cache/blockfile/file_block.h",
"disk_cache/blockfile/file_lock.cc",
"disk_cache/blockfile/file_lock.h",
"disk_cache/blockfile/in_flight_backend_io.cc",
"disk_cache/blockfile/in_flight_backend_io.h",
"disk_cache/blockfile/in_flight_io.cc",
"disk_cache/blockfile/in_flight_io.h",
"disk_cache/blockfile/mapped_file.cc",
"disk_cache/blockfile/mapped_file.h",
"disk_cache/blockfile/rankings.cc",
"disk_cache/blockfile/rankings.h",
"disk_cache/blockfile/sparse_control.cc",
"disk_cache/blockfile/sparse_control.h",
"disk_cache/blockfile/stats.cc",
"disk_cache/blockfile/stats.h",
"disk_cache/blockfile/storage_block-inl.h",
"disk_cache/blockfile/storage_block.h",
"disk_cache/blockfile/stress_support.h",
"disk_cache/cache_util.cc",
"disk_cache/cache_util.h",
"disk_cache/disk_cache.cc",
"disk_cache/disk_cache.h",
"disk_cache/memory/mem_backend_impl.cc",
"disk_cache/memory/mem_backend_impl.h",
"disk_cache/memory/mem_entry_impl.cc",
"disk_cache/memory/mem_entry_impl.h",
"disk_cache/net_log_parameters.cc",
"disk_cache/net_log_parameters.h",
"disk_cache/simple/post_operation_waiter.cc",
"disk_cache/simple/post_operation_waiter.h",
"disk_cache/simple/simple_backend_impl.cc",
"disk_cache/simple/simple_backend_impl.h",
"disk_cache/simple/simple_backend_version.h",
"disk_cache/simple/simple_entry_format.cc",
"disk_cache/simple/simple_entry_format.h",
"disk_cache/simple/simple_entry_format_history.h",
"disk_cache/simple/simple_entry_impl.cc",
"disk_cache/simple/simple_entry_impl.h",
"disk_cache/simple/simple_entry_operation.cc",
"disk_cache/simple/simple_entry_operation.h",
"disk_cache/simple/simple_file_enumerator.cc",
"disk_cache/simple/simple_file_enumerator.h",
"disk_cache/simple/simple_file_tracker.cc",
"disk_cache/simple/simple_file_tracker.h",
"disk_cache/simple/simple_histogram_macros.h",
"disk_cache/simple/simple_index.cc",
"disk_cache/simple/simple_index.h",
"disk_cache/simple/simple_index_delegate.h",
"disk_cache/simple/simple_index_file.cc",
"disk_cache/simple/simple_index_file.h",
"disk_cache/simple/simple_net_log_parameters.cc",
"disk_cache/simple/simple_net_log_parameters.h",
"disk_cache/simple/simple_synchronous_entry.cc",
"disk_cache/simple/simple_synchronous_entry.h",
"disk_cache/simple/simple_util.cc",
"disk_cache/simple/simple_util.h",
"disk_cache/simple/simple_version_upgrade.cc",
"disk_cache/simple/simple_version_upgrade.h",
"filter/filter_source_stream.cc",
"filter/filter_source_stream.h",
"filter/gzip_header.cc",
"filter/gzip_header.h",
"filter/gzip_source_stream.cc",
"filter/gzip_source_stream.h",
"filter/source_stream.cc",
"filter/source_stream.h",
"first_party_sets/addition_overlaps_union_find.cc",
"first_party_sets/addition_overlaps_union_find.h",
"first_party_sets/first_party_set_entry.cc",
"first_party_sets/first_party_set_entry.h",
"first_party_sets/first_party_set_entry_override.cc",
"first_party_sets/first_party_set_entry_override.h",
"first_party_sets/first_party_set_metadata.cc",
"first_party_sets/first_party_set_metadata.h",
"first_party_sets/first_party_sets_cache_filter.cc",
"first_party_sets/first_party_sets_cache_filter.h",
"first_party_sets/first_party_sets_context_config.cc",
"first_party_sets/first_party_sets_context_config.h",
"first_party_sets/global_first_party_sets.cc",
"first_party_sets/global_first_party_sets.h",
"first_party_sets/local_set_declaration.cc",
"first_party_sets/local_set_declaration.h",
"first_party_sets/sets_mutation.cc",
"first_party_sets/sets_mutation.h",
"http/alternative_service.cc",
"http/alternative_service.h",
"http/bidirectional_stream.cc",
"http/bidirectional_stream.h",
"http/bidirectional_stream_impl.cc",
"http/bidirectional_stream_impl.h",
"http/bidirectional_stream_request_info.cc",
"http/bidirectional_stream_request_info.h",
"http/broken_alternative_services.cc",
"http/broken_alternative_services.h",
"http/http_auth.cc",
"http/http_auth.h",
"http/http_auth_cache.cc",
"http/http_auth_cache.h",
"http/http_auth_challenge_tokenizer.cc",
"http/http_auth_challenge_tokenizer.h",
"http/http_auth_controller.cc",
"http/http_auth_controller.h",
"http/http_auth_filter.cc",
"http/http_auth_filter.h",
"http/http_auth_handler.cc",
"http/http_auth_handler.h",
"http/http_auth_handler_basic.cc",
"http/http_auth_handler_basic.h",
"http/http_auth_handler_digest.cc",
"http/http_auth_handler_digest.h",
"http/http_auth_handler_factory.cc",
"http/http_auth_handler_factory.h",
"http/http_auth_handler_ntlm.cc",
"http/http_auth_handler_ntlm.h",
"http/http_auth_mechanism.h",
"http/http_auth_multi_round_parse.cc",
"http/http_auth_multi_round_parse.h",
"http/http_auth_preferences.cc",
"http/http_auth_preferences.h",
"http/http_auth_scheme.cc",
"http/http_auth_scheme.h",
"http/http_basic_state.cc",
"http/http_basic_state.h",
"http/http_basic_stream.cc",
"http/http_basic_stream.h",
"http/http_byte_range.cc",
"http/http_byte_range.h",
"http/http_cache.cc",
"http/http_cache.h",
"http/http_cache_transaction.cc",
"http/http_cache_transaction.h",
"http/http_cache_writers.cc",
"http/http_cache_writers.h",
"http/http_chunked_decoder.cc",
"http/http_chunked_decoder.h",
"http/http_connection_info.cc",
"http/http_connection_info.h",
"http/http_content_disposition.cc",
"http/http_content_disposition.h",
"http/http_cookie_indices.cc",
"http/http_cookie_indices.h",
"http/http_log_util.cc",
"http/http_log_util.h",
"http/http_network_layer.cc",
"http/http_network_layer.h",
"http/http_network_session.cc",
"http/http_network_session.h",
"http/http_network_session_peer.cc",
"http/http_network_session_peer.h",
"http/http_network_transaction.cc",
"http/http_network_transaction.h",
"http/http_no_vary_search_data.cc",
"http/http_no_vary_search_data.h",
"http/http_proxy_client_socket.cc",
"http/http_proxy_client_socket.h",
"http/http_proxy_connect_job.cc",
"http/http_proxy_connect_job.h",
"http/http_raw_request_headers.cc",
"http/http_raw_request_headers.h",
"http/http_request_headers.cc",
"http/http_request_headers.h",
"http/http_request_info.cc",
"http/http_request_info.h",
"http/http_response_body_drainer.cc",
"http/http_response_body_drainer.h",
"http/http_response_headers.cc",
"http/http_response_headers.h",
"http/http_response_info.cc",
"http/http_response_info.h",
"http/http_security_headers.cc",
"http/http_security_headers.h",
"http/http_server_properties.cc",
"http/http_server_properties.h",
"http/http_server_properties_manager.cc",
"http/http_server_properties_manager.h",
"http/http_status_code.cc",
"http/http_status_code.h",
"http/http_status_code_list.h",
"http/http_stream.cc",
"http/http_stream.h",
"http/http_stream_factory.cc",
"http/http_stream_factory.h",
"http/http_stream_factory_job.cc",
"http/http_stream_factory_job.h",
"http/http_stream_factory_job_controller.cc",
"http/http_stream_factory_job_controller.h",
"http/http_stream_parser.cc",
"http/http_stream_parser.h",
"http/http_stream_request.cc",
"http/http_stream_request.h",
"http/http_transaction.h",
"http/http_transaction_factory.h",
"http/http_util.cc",
"http/http_util.h",
"http/http_vary_data.cc",
"http/http_vary_data.h",
"http/http_version.h",
"http/partial_data.cc",
"http/partial_data.h",
"http/proxy_client_socket.cc",
"http/proxy_client_socket.h",
"http/proxy_fallback.cc",
"http/proxy_fallback.h",
"http/structured_headers.h",
"http/transport_security_persister.cc",
"http/transport_security_persister.h",
"http/transport_security_state.h",
"http/transport_security_state_source.cc",
"http/transport_security_state_source.h",
"http/url_security_manager.cc",
"http/url_security_manager.h",
"log/file_net_log_observer.cc",
"log/file_net_log_observer.h",
"log/net_log.cc",
"log/net_log.h",
"log/net_log_capture_mode.cc",
"log/net_log_capture_mode.h",
"log/net_log_entry.cc",
"log/net_log_entry.h",
"log/net_log_event_type.cc",
"log/net_log_event_type.h",
"log/net_log_event_type_list.h",
"log/net_log_source.cc",
"log/net_log_source.h",
"log/net_log_source_type.h",
"log/net_log_source_type_list.h",
"log/net_log_util.cc",
"log/net_log_util.h",
"log/net_log_values.cc",
"log/net_log_values.h",
"log/net_log_with_source.cc",
"log/net_log_with_source.h",
"log/trace_net_log_observer.cc",
"log/trace_net_log_observer.h",
"nqe/cached_network_quality.cc",
"nqe/cached_network_quality.h",
"nqe/effective_connection_type.cc",
"nqe/effective_connection_type.h",
"nqe/effective_connection_type_observer.h",
"nqe/event_creator.cc",
"nqe/event_creator.h",
"nqe/network_id.cc",
"nqe/network_id.h",
"nqe/network_qualities_prefs_manager.cc",
"nqe/network_qualities_prefs_manager.h",
"nqe/network_quality.cc",
"nqe/network_quality.h",
"nqe/network_quality_estimator.cc",
"nqe/network_quality_estimator.h",
"nqe/network_quality_estimator_params.cc",
"nqe/network_quality_estimator_params.h",
"nqe/network_quality_estimator_util.cc",
"nqe/network_quality_estimator_util.h",
"nqe/network_quality_observation.cc",
"nqe/network_quality_observation.h",
"nqe/network_quality_observation_source.h",
"nqe/network_quality_store.cc",
"nqe/network_quality_store.h",
"nqe/observation_buffer.cc",
"nqe/observation_buffer.h",
"nqe/peer_to_peer_connections_count_observer.h",
"nqe/pref_names.cc",
"nqe/pref_names.h",
"nqe/rtt_throughput_estimates_observer.h",
"nqe/socket_watcher.cc",
"nqe/socket_watcher.h",
"nqe/socket_watcher_factory.cc",
"nqe/socket_watcher_factory.h",
"nqe/throughput_analyzer.cc",
"nqe/throughput_analyzer.h",
"nqe/weighted_observation.h",
"proxy_resolution/configured_proxy_resolution_request.cc",
"proxy_resolution/configured_proxy_resolution_request.h",
"proxy_resolution/configured_proxy_resolution_service.cc",
"proxy_resolution/configured_proxy_resolution_service.h",
"proxy_resolution/dhcp_pac_file_fetcher.cc",
"proxy_resolution/dhcp_pac_file_fetcher.h",
"proxy_resolution/multi_threaded_proxy_resolver.cc",
"proxy_resolution/multi_threaded_proxy_resolver.h",
"proxy_resolution/network_delegate_error_observer.cc",
"proxy_resolution/network_delegate_error_observer.h",
"proxy_resolution/pac_file_data.cc",
"proxy_resolution/pac_file_data.h",
"proxy_resolution/pac_file_decider.cc",
"proxy_resolution/pac_file_decider.h",
"proxy_resolution/pac_file_fetcher.cc",
"proxy_resolution/pac_file_fetcher.h",
"proxy_resolution/pac_file_fetcher_impl.cc",
"proxy_resolution/pac_file_fetcher_impl.h",
"proxy_resolution/polling_proxy_config_service.cc",
"proxy_resolution/polling_proxy_config_service.h",
"proxy_resolution/proxy_bypass_rules.cc",
"proxy_resolution/proxy_bypass_rules.h",
"proxy_resolution/proxy_config.cc",
"proxy_resolution/proxy_config.h",
"proxy_resolution/proxy_config_service.cc",
"proxy_resolution/proxy_config_service.h",
"proxy_resolution/proxy_config_service_fixed.cc",
"proxy_resolution/proxy_config_service_fixed.h",
"proxy_resolution/proxy_config_with_annotation.cc",
"proxy_resolution/proxy_config_with_annotation.h",
"proxy_resolution/proxy_info.cc",
"proxy_resolution/proxy_info.h",
"proxy_resolution/proxy_list.cc",
"proxy_resolution/proxy_list.h",
"proxy_resolution/proxy_resolution_request.h",
"proxy_resolution/proxy_resolution_service.h",
"proxy_resolution/proxy_resolve_dns_operation.h",
"proxy_resolution/proxy_resolver.h",
"proxy_resolution/proxy_resolver_error_observer.h",
"proxy_resolution/proxy_resolver_factory.cc",
"proxy_resolution/proxy_resolver_factory.h",
"proxy_resolution/proxy_retry_info.h",
"quic/address_utils.h",
"quic/bidirectional_stream_quic_impl.cc",
"quic/bidirectional_stream_quic_impl.h",
"quic/crypto/proof_source_chromium.cc",
"quic/crypto/proof_source_chromium.h",
"quic/crypto/proof_verifier_chromium.cc",
"quic/crypto/proof_verifier_chromium.h",
"quic/dedicated_web_transport_http3_client.cc",
"quic/dedicated_web_transport_http3_client.h",
"quic/network_connection.cc",
"quic/network_connection.h",
"quic/platform/impl/quic_chromium_clock.cc",
"quic/platform/impl/quic_chromium_clock.h",
"quic/properties_based_quic_server_info.cc",
"quic/properties_based_quic_server_info.h",
"quic/quic_address_mismatch.cc",
"quic/quic_address_mismatch.h",
"quic/quic_chromium_alarm_factory.cc",
"quic/quic_chromium_alarm_factory.h",
"quic/quic_chromium_client_session.cc",
"quic/quic_chromium_client_session.h",
"quic/quic_chromium_client_stream.cc",
"quic/quic_chromium_client_stream.h",
"quic/quic_chromium_connection_helper.cc",
"quic/quic_chromium_connection_helper.h",
"quic/quic_chromium_packet_reader.cc",
"quic/quic_chromium_packet_reader.h",
"quic/quic_chromium_packet_writer.cc",
"quic/quic_chromium_packet_writer.h",
"quic/quic_clock_skew_detector.cc",
"quic/quic_clock_skew_detector.h",
"quic/quic_connection_logger.cc",
"quic/quic_connection_logger.h",
"quic/quic_connectivity_monitor.cc",
"quic/quic_connectivity_monitor.h",
"quic/quic_context.cc",
"quic/quic_context.h",
"quic/quic_crypto_client_config_handle.cc",
"quic/quic_crypto_client_config_handle.h",
"quic/quic_crypto_client_stream_factory.cc",
"quic/quic_crypto_client_stream_factory.h",
"quic/quic_event_logger.cc",
"quic/quic_event_logger.h",
"quic/quic_http3_logger.cc",
"quic/quic_http3_logger.h",
"quic/quic_http_stream.cc",
"quic/quic_http_stream.h",
"quic/quic_http_utils.cc",
"quic/quic_http_utils.h",
"quic/quic_proxy_client_socket.cc",
"quic/quic_proxy_client_socket.h",
"quic/quic_proxy_datagram_client_socket.cc",
"quic/quic_proxy_datagram_client_socket.h",
"quic/quic_server_info.cc",
"quic/quic_server_info.h",
"quic/quic_session_key.cc",
"quic/quic_session_key.h",
"quic/quic_session_pool.cc",
"quic/quic_session_pool.h",
"quic/quic_session_pool_direct_job.cc",
"quic/quic_session_pool_direct_job.h",
"quic/quic_session_pool_job.cc",
"quic/quic_session_pool_job.h",
"quic/quic_session_pool_proxy_job.cc",
"quic/quic_session_pool_proxy_job.h",
"quic/quic_session_pool_session_attempt.cc",
"quic/quic_session_pool_session_attempt.h",
"quic/set_quic_flag.cc",
"quic/set_quic_flag.h",
"quic/web_transport_client.cc",
"quic/web_transport_client.h",
"quic/web_transport_error.cc",
"quic/web_transport_error.h",
"socket/client_socket_factory.cc",
"socket/client_socket_factory.h",
"socket/client_socket_handle.cc",
"socket/client_socket_handle.h",
"socket/client_socket_pool.cc",
"socket/client_socket_pool.h",
"socket/client_socket_pool_manager.cc",
"socket/client_socket_pool_manager.h",
"socket/client_socket_pool_manager_impl.cc",
"socket/client_socket_pool_manager_impl.h",
"socket/connect_job.cc",
"socket/connect_job.h",
"socket/connect_job_factory.cc",
"socket/connect_job_factory.h",
"socket/connect_job_params.cc",
"socket/connect_job_params.h",
"socket/connect_job_params_factory.cc",
"socket/connect_job_params_factory.h",
"socket/connection_attempts.h",
"socket/datagram_client_socket.h",
"socket/datagram_server_socket.h",
"socket/datagram_socket.h",
"socket/diff_serv_code_point.h",
"socket/network_binding_client_socket_factory.cc",
"socket/network_binding_client_socket_factory.h",
"socket/next_proto.cc",
"socket/next_proto.h",
"socket/server_socket.cc",
"socket/server_socket.h",
"socket/socket.cc",
"socket/socket.h",
"socket/socket_bio_adapter.cc",
"socket/socket_bio_adapter.h",
"socket/socket_descriptor.cc",
"socket/socket_descriptor.h",
"socket/socket_net_log_params.cc",
"socket/socket_net_log_params.h",
"socket/socket_options.cc",
"socket/socket_options.h",
"socket/socket_performance_watcher.h",
"socket/socket_performance_watcher_factory.h",
"socket/socket_tag.cc",
"socket/socket_tag.h",
"socket/socks5_client_socket.cc",
"socket/socks5_client_socket.h",
"socket/socks_client_socket.cc",
"socket/socks_client_socket.h",
"socket/socks_connect_job.cc",
"socket/socks_connect_job.h",
"socket/ssl_client_socket.cc",
"socket/ssl_client_socket.h",
"socket/ssl_client_socket_impl.cc",
"socket/ssl_client_socket_impl.h",
"socket/ssl_connect_job.cc",
"socket/ssl_connect_job.h",
"socket/ssl_server_socket.h",
"socket/ssl_server_socket_impl.cc",
"socket/ssl_server_socket_impl.h",
"socket/ssl_socket.h",
"socket/stream_socket.cc",
"socket/stream_socket.h",
"socket/tcp_client_socket.cc",
"socket/tcp_client_socket.h",
"socket/tcp_server_socket.cc",
"socket/tcp_server_socket.h",
"socket/tcp_socket.h",
"socket/transport_client_socket.cc",
"socket/transport_client_socket.h",
"socket/transport_client_socket_pool.cc",
"socket/transport_client_socket_pool.h",
"socket/transport_connect_job.cc",
"socket/transport_connect_job.h",
"socket/transport_connect_sub_job.cc",
"socket/transport_connect_sub_job.h",
"socket/udp_client_socket.cc",
"socket/udp_client_socket.h",
"socket/udp_net_log_parameters.cc",
"socket/udp_net_log_parameters.h",
"socket/udp_server_socket.cc",
"socket/udp_server_socket.h",
"socket/udp_socket.h",
"socket/udp_socket_global_limits.cc",
"socket/udp_socket_global_limits.h",
"socket/websocket_endpoint_lock_manager.cc",
"socket/websocket_endpoint_lock_manager.h",
"socket/websocket_transport_client_socket_pool.cc",
"socket/websocket_transport_client_socket_pool.h",
"spdy/alps_decoder.cc",
"spdy/alps_decoder.h",
"spdy/bidirectional_stream_spdy_impl.cc",
"spdy/bidirectional_stream_spdy_impl.h",
"spdy/buffered_spdy_framer.cc",
"spdy/buffered_spdy_framer.h",
"spdy/header_coalescer.cc",
"spdy/header_coalescer.h",
"spdy/http2_priority_dependencies.cc",
"spdy/http2_priority_dependencies.h",
"spdy/multiplexed_http_stream.cc",
"spdy/multiplexed_http_stream.h",
"spdy/multiplexed_session.cc",
"spdy/multiplexed_session.h",
"spdy/spdy_buffer.cc",
"spdy/spdy_buffer.h",
"spdy/spdy_buffer_producer.cc",
"spdy/spdy_buffer_producer.h",
"spdy/spdy_http_stream.cc",
"spdy/spdy_http_stream.h",
"spdy/spdy_http_utils.cc",
"spdy/spdy_http_utils.h",
"spdy/spdy_log_util.cc",
"spdy/spdy_log_util.h",
"spdy/spdy_proxy_client_socket.cc",
"spdy/spdy_proxy_client_socket.h",
"spdy/spdy_read_queue.cc",
"spdy/spdy_read_queue.h",
"spdy/spdy_session.cc",
"spdy/spdy_session.h",
"spdy/spdy_session_key.cc",
"spdy/spdy_session_key.h",
"spdy/spdy_session_pool.cc",
"spdy/spdy_session_pool.h",
"spdy/spdy_stream.cc",
"spdy/spdy_stream.h",
"spdy/spdy_write_queue.cc",
"spdy/spdy_write_queue.h",
"ssl/cert_compression.cc",
"ssl/cert_compression.h",
"ssl/client_cert_identity.cc",
"ssl/client_cert_identity.h",
"ssl/client_cert_store.h",
"ssl/openssl_private_key.cc",
"ssl/openssl_private_key.h",
"ssl/openssl_ssl_util.cc",
"ssl/openssl_ssl_util.h",
"ssl/ssl_cert_request_info.cc",
"ssl/ssl_cert_request_info.h",
"ssl/ssl_cipher_suite_names.cc",
"ssl/ssl_cipher_suite_names.h",
"ssl/ssl_client_auth_cache.cc",
"ssl/ssl_client_auth_cache.h",
"ssl/ssl_client_session_cache.cc",
"ssl/ssl_client_session_cache.h",
"ssl/ssl_config.cc",
"ssl/ssl_config.h",
"ssl/ssl_config_service.cc",
"ssl/ssl_config_service.h",
"ssl/ssl_config_service_defaults.cc",
"ssl/ssl_config_service_defaults.h",
"ssl/ssl_connection_status_flags.h",
"ssl/ssl_handshake_details.h",
"ssl/ssl_info.cc",
"ssl/ssl_info.h",
"ssl/ssl_key_logger.cc",
"ssl/ssl_key_logger.h",
"ssl/ssl_key_logger_impl.cc",
"ssl/ssl_key_logger_impl.h",
"ssl/ssl_platform_key_util.cc",
"ssl/ssl_platform_key_util.h",
"ssl/ssl_private_key.cc",
"ssl/ssl_private_key.h",
"ssl/ssl_server_config.cc",
"ssl/ssl_server_config.h",
"ssl/threaded_ssl_private_key.cc",
"ssl/threaded_ssl_private_key.h",
"url_request/clear_site_data.cc",
"url_request/clear_site_data.h",
"url_request/redirect_info.cc",
"url_request/redirect_info.h",
"url_request/redirect_util.cc",
"url_request/redirect_util.h",
"url_request/referrer_policy.h",
"url_request/static_http_user_agent_settings.cc",
"url_request/static_http_user_agent_settings.h",
"url_request/url_request.cc",
"url_request/url_request.h",
"url_request/url_request_context.cc",
"url_request/url_request_context.h",
"url_request/url_request_context_builder.cc",
"url_request/url_request_context_builder.h",
"url_request/url_request_context_getter.cc",
"url_request/url_request_context_getter.h",
"url_request/url_request_context_getter_observer.h",
"url_request/url_request_error_job.cc",
"url_request/url_request_error_job.h",
"url_request/url_request_filter.cc",
"url_request/url_request_filter.h",
"url_request/url_request_http_job.cc",
"url_request/url_request_http_job.h",
"url_request/url_request_interceptor.cc",
"url_request/url_request_interceptor.h",
"url_request/url_request_job.cc",
"url_request/url_request_job.h",
"url_request/url_request_job_factory.cc",
"url_request/url_request_job_factory.h",
"url_request/url_request_netlog_params.cc",
"url_request/url_request_netlog_params.h",
"url_request/url_request_redirect_job.cc",
"url_request/url_request_redirect_job.h",
"url_request/view_cache_helper.cc",
"url_request/view_cache_helper.h",
"url_request/websocket_handshake_userdata_key.cc",
"url_request/websocket_handshake_userdata_key.h",
]
if (is_posix || is_fuchsia) {
sources += [ "base/net_errors_posix.cc" ]
}
defines = []
if (disable_brotli_filter) {
defines += [ "NET_DISABLE_BROTLI" ]
}
if (disable_zstd_filter) {
defines += [ "NET_DISABLE_ZSTD" ]
}
deps = [
":cronet_buildflags",
":net_deps",
"//build:chromeos_buildflags",
"//components/miracle_parameter/common",
"//net/http:transport_security_state_generated_files",
]
public_deps = [
":net_export_header",
":net_public_deps",
"//base",
"//net/dns",
"//net/dns:dns_client",
"//net/dns:host_resolver",
"//net/dns:host_resolver_manager",
"//net/dns:mdns_client",
"//net/dns/public",
"//net/third_party/quiche",
]
allow_circular_includes_from = [
"//net/dns",
"//net/dns:dns_client",
"//net/dns:host_resolver",
"//net/dns:host_resolver_manager",
"//net/dns:mdns_client",
"//net/dns/public",
"//net/http:transport_security_state_generated_files",
]
if (enable_reporting) {
sources += [
"network_error_logging/network_error_logging_service.cc",
"network_error_logging/network_error_logging_service.h",
"network_error_logging/persistent_reporting_and_nel_store.h",
"reporting/reporting_browsing_data_remover.cc",
"reporting/reporting_browsing_data_remover.h",
"reporting/reporting_cache.cc",
"reporting/reporting_cache.h",
"reporting/reporting_cache_impl.cc",
"reporting/reporting_cache_impl.h",
"reporting/reporting_cache_observer.cc",
"reporting/reporting_cache_observer.h",
"reporting/reporting_context.cc",
"reporting/reporting_context.h",
"reporting/reporting_delegate.cc",
"reporting/reporting_delegate.h",
"reporting/reporting_delivery_agent.cc",
"reporting/reporting_delivery_agent.h",
"reporting/reporting_endpoint.cc",
"reporting/reporting_endpoint.h",
"reporting/reporting_endpoint_manager.cc",
"reporting/reporting_endpoint_manager.h",
"reporting/reporting_garbage_collector.cc",
"reporting/reporting_garbage_collector.h",
"reporting/reporting_header_parser.cc",
"reporting/reporting_header_parser.h",
"reporting/reporting_network_change_observer.cc",
"reporting/reporting_network_change_observer.h",
"reporting/reporting_policy.cc",
"reporting/reporting_policy.h",
"reporting/reporting_report.cc",
"reporting/reporting_report.h",
"reporting/reporting_service.cc",
"reporting/reporting_service.h",
"reporting/reporting_uploader.cc",
"reporting/reporting_uploader.h",
]
}
if (enable_device_bound_sessions) {
sources += [
"device_bound_sessions/cookie_craving.cc",
"device_bound_sessions/cookie_craving.h",
"device_bound_sessions/device_bound_session_registration_fetcher_param.cc",
"device_bound_sessions/device_bound_session_registration_fetcher_param.h",
"device_bound_sessions/device_bound_session_service.cc",
"device_bound_sessions/device_bound_session_service.h",
]
}
if (is_android) {
sources += [
"android/android_http_util.cc",
"android/cert_verify_result_android.cc",
"android/cert_verify_result_android.h",
"android/gurl_utils.cc",
"android/http_auth_negotiate_android.cc",
"android/http_auth_negotiate_android.h",
"android/keystore.cc",
"android/keystore.h",
"android/network_change_notifier_android.cc",
"android/network_change_notifier_android.h",
"android/network_change_notifier_delegate_android.cc",
"android/network_change_notifier_delegate_android.h",
"android/network_change_notifier_factory_android.cc",
"android/network_change_notifier_factory_android.h",
"android/network_library.cc",
"android/network_library.h",
"android/traffic_stats.cc",
"android/traffic_stats.h",
"cert/cert_verify_proc_android.cc",
"cert/cert_verify_proc_android.h",
"cert/test_root_certs_android.cc",
"cert/x509_util_android.cc",
"proxy_resolution/proxy_config_service_android.cc",
"proxy_resolution/proxy_config_service_android.h",
"ssl/ssl_platform_key_android.cc",
"ssl/ssl_platform_key_android.h",
]
}
if (is_chromeos && use_nss_certs) {
sources += [
"cert/nss_cert_database_chromeos.cc",
"cert/nss_cert_database_chromeos.h",
"cert/nss_profile_filter_chromeos.cc",
"cert/nss_profile_filter_chromeos.h",
]
}
if (is_ios) {
sources += [
"cert/cert_verify_proc_ios.cc",
"cert/cert_verify_proc_ios.h",
"cert/test_root_certs_ios.cc",
"disk_cache/blockfile/file_ios.cc",
"proxy_resolution/proxy_config_service_ios.cc",
"proxy_resolution/proxy_config_service_ios.h",
]
}
if (is_linux) {
sources += [
"base/network_change_notifier_linux.cc",
"base/network_change_notifier_linux.h",
"proxy_resolution/proxy_config_service_linux.cc",
"proxy_resolution/proxy_config_service_linux.h",
]
}
if (is_linux || is_chromeos || is_android) {
sources += [
"base/address_map_linux.cc",
"base/address_map_linux.h",
"base/address_tracker_linux.cc",
"base/address_tracker_linux.h",
"base/network_interfaces_linux.cc",
"base/network_interfaces_linux.h",
"base/platform_mime_util_linux.cc",
]
}
if (is_linux) {
sources += [
"base/address_map_cache_linux.cc",
"base/address_map_cache_linux.h",
]
}
if (is_mac) {
sources += [
"base/network_notification_thread_mac.cc",
"base/network_notification_thread_mac.h",
"cert/cert_database_mac.cc",
"cert/internal/trust_store_mac.cc",
"cert/internal/trust_store_mac.h",
"cert/test_keychain_search_list_mac.cc",
"cert/test_keychain_search_list_mac.h",
"cert/test_root_certs_builtin.cc",
"proxy_resolution/proxy_config_service_mac.cc",
"proxy_resolution/proxy_config_service_mac.h",
"ssl/client_cert_identity_mac.cc",
"ssl/client_cert_identity_mac.h",
"ssl/client_cert_store_mac.cc",
"ssl/client_cert_store_mac.h",
"ssl/ssl_platform_key_mac.cc",
"ssl/ssl_platform_key_mac.h",
]
}
if (is_apple) {
sources += [
"base/apple/url_conversions.h",
"base/apple/url_conversions.mm",
"base/network_change_notifier_apple.h",
"base/network_change_notifier_apple.mm",
"base/network_config_watcher_apple.cc",
"base/network_config_watcher_apple.h",
"base/platform_mime_util_apple.mm",
"cert/x509_util_apple.cc",
"cert/x509_util_apple.h",
"proxy_resolution/proxy_chain_util_apple.cc",
"proxy_resolution/proxy_chain_util_apple.h",
"proxy_resolution/proxy_resolver_apple.cc",
"proxy_resolution/proxy_resolver_apple.h",
]
}
if (is_win) {
sources += [
"base/file_stream_context_win.cc",
"base/net_errors_win.cc",
"base/network_change_notifier_win.cc",
"base/network_change_notifier_win.h",
"base/network_interfaces_win.cc",
"base/network_interfaces_win.h",
"base/platform_mime_util_win.cc",
"base/winsock_init.cc",
"base/winsock_init.h",
"base/winsock_util.cc",
"base/winsock_util.h",
"cert/test_root_certs_builtin.cc",
"cert/x509_util_win.cc",
"cert/x509_util_win.h",
"disk_cache/blockfile/file_win.cc",
"disk_cache/blockfile/mapped_file_win.cc",
"disk_cache/cache_util_win.cc",
"disk_cache/simple/simple_util_win.cc",
"http/http_auth_handler_ntlm_win.cc",
"http/http_auth_sspi_win.cc",
"http/http_auth_sspi_win.h",
"http/url_security_manager_win.cc",
"proxy_resolution/win/dhcp_pac_file_adapter_fetcher_win.cc",
"proxy_resolution/win/dhcp_pac_file_adapter_fetcher_win.h",
"proxy_resolution/win/dhcp_pac_file_fetcher_win.cc",
"proxy_resolution/win/dhcp_pac_file_fetcher_win.h",
"proxy_resolution/win/dhcpcsvc_init_win.cc",
"proxy_resolution/win/dhcpcsvc_init_win.h",
"proxy_resolution/win/proxy_config_service_win.cc",
"proxy_resolution/win/proxy_config_service_win.h",
"proxy_resolution/win/proxy_resolver_winhttp.cc",
"proxy_resolution/win/proxy_resolver_winhttp.h",
"proxy_resolution/win/windows_system_proxy_resolution_request.cc",
"proxy_resolution/win/windows_system_proxy_resolution_request.h",
"proxy_resolution/win/windows_system_proxy_resolution_service.cc",
"proxy_resolution/win/windows_system_proxy_resolution_service.h",
"proxy_resolution/win/windows_system_proxy_resolver.h",
"proxy_resolution/win/winhttp_status.h",
"socket/tcp_socket_win.cc",
"socket/tcp_socket_win.h",
"socket/udp_socket_win.cc",
"socket/udp_socket_win.h",
"ssl/client_cert_store_win.cc",
"ssl/client_cert_store_win.h",
"ssl/ssl_platform_key_win.cc",
]
}
if (use_kerberos) {
sources += [
"http/http_auth_handler_negotiate.cc",
"http/http_auth_handler_negotiate.h",
]
}
if (is_posix || is_fuchsia) {
sources += [
"base/file_stream_context_posix.cc",
"base/network_interfaces_posix.cc",
"base/network_interfaces_posix.h",
"base/sockaddr_util_posix.cc",
"base/sockaddr_util_posix.h",
"disk_cache/cache_util_posix.cc",
"disk_cache/simple/simple_util_posix.cc",
"http/url_security_manager_posix.cc",
"socket/socket_posix.cc",
"socket/socket_posix.h",
"socket/tcp_socket_posix.cc",
"socket/tcp_socket_posix.h",
"socket/udp_socket_posix.cc",
"socket/udp_socket_posix.h",
]
if (!is_ios) {
sources += [ "disk_cache/blockfile/file_posix.cc" ]
}
if (posix_bypass_mmap) {
sources += [ "disk_cache/blockfile/mapped_file_bypass_mmap_posix.cc" ]
} else {
sources += [ "disk_cache/blockfile/mapped_file_posix.cc" ]
}
}
if (is_android || is_chromeos || is_linux) {
sources += [
"base/network_change_notifier_passive.cc",
"base/network_change_notifier_passive.h",
]
}
if (!is_win) {
sources += [
"http/http_auth_handler_ntlm_portable.cc",
"http/http_auth_ntlm_mechanism.cc",
"http/http_auth_ntlm_mechanism.h",
"ntlm/ntlm.cc",
"ntlm/ntlm.h",
"ntlm/ntlm_buffer_reader.cc",
"ntlm/ntlm_buffer_reader.h",
"ntlm/ntlm_buffer_writer.cc",
"ntlm/ntlm_buffer_writer.h",
"ntlm/ntlm_client.cc",
"ntlm/ntlm_client.h",
"ntlm/ntlm_constants.cc",
"ntlm/ntlm_constants.h",
]
}
if (use_external_gssapi) {
sources += [
"http/http_auth_gssapi_posix.cc",
"http/http_auth_gssapi_posix.h",
]
}
# Use getifaddrs() on POSIX platforms, except Linux.
if (is_posix && !is_linux && !is_chromeos) {
sources += [
"base/network_interfaces_getifaddrs.cc",
"base/network_interfaces_getifaddrs.h",
]
if (is_android) {
sources += [
"base/network_interfaces_getifaddrs_android.cc",
"base/network_interfaces_getifaddrs_android.h",
]
}
}
if (chrome_root_store_supported) {
sources += [
"cert/internal/trust_store_chrome.cc",
"cert/internal/trust_store_chrome.h",
]
deps += [
"//base/version_info",
"//net/cert:root_store_proto_lite",
"//net/data/ssl/chrome_root_store:gen_root_store_inc",
]
if (is_win) {
sources += [
"cert/internal/trust_store_win.cc",
"cert/internal/trust_store_win.h",
"third_party/mozilla_win/cert/win_util.cc",
"third_party/mozilla_win/cert/win_util.h",
]
}
if (is_android) {
sources += [
"cert/internal/trust_store_android.cc",
"cert/internal/trust_store_android.h",
]
}
}
if (use_nss_certs) {
sources += [
"cert/internal/system_trust_store_nss.h",
"cert/internal/trust_store_nss.cc",
"cert/internal/trust_store_nss.h",
"cert/nss_cert_database.cc",
"cert/nss_cert_database.h",
"cert/test_root_certs_builtin.cc",
"cert/x509_util_nss.cc",
"cert/x509_util_nss.h",
"third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
"third_party/mozilla_security_manager/nsNSSCertificateDB.h",
"third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
"third_party/mozilla_security_manager/nsPKCS12Blob.h",
"third_party/nss/ssl/cmpcert.cc",
"third_party/nss/ssl/cmpcert.h",
]
if (!is_castos) {
sources += [
"ssl/client_cert_store_nss.cc",
"ssl/client_cert_store_nss.h",
"ssl/ssl_platform_key_nss.cc",
"ssl/ssl_platform_key_nss.h",
]
}
# TODO(crbug.com/41467965): This is a public config because
# multi_threaded_cert_verifier.h depends on NSS. When the linked bug is
# fixed, switch this to a non-public config, so NSS usage must be explicit
# in the build.
public_configs = [ "//build/config/linux/nss" ]
}
if (is_fuchsia) {
deps += [
"//net/data/ssl/chrome_root_store:gen_root_store_inc",
"//third_party/fuchsia-sdk/sdk/pkg/async-loop-cpp",
]
public_deps += [ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces_hlcpp" ]
sources += [
"base/fuchsia/network_interface_cache.cc",
"base/fuchsia/network_interface_cache.h",
"base/network_change_notifier_fuchsia.cc",
"base/network_change_notifier_fuchsia.h",
"base/network_interfaces_fuchsia.cc",
"base/network_interfaces_fuchsia.h",
"base/platform_mime_util_fuchsia.cc",
"cert/test_root_certs_builtin.cc",
]
}
if (enable_unix_sockets) {
sources += [
"socket/unix_domain_client_socket_posix.cc",
"socket/unix_domain_client_socket_posix.h",
"socket/unix_domain_server_socket_posix.cc",
"socket/unix_domain_server_socket_posix.h",
]
}
cflags = []
if (is_mac) {
libs = [ "resolv" ]
frameworks = [
"CFNetwork.framework",
"CoreServices.framework",
"Foundation.framework",
"Security.framework",
"SystemConfiguration.framework",
"UniformTypeIdentifiers.framework",
]
}
if (is_ios) {
libs = [ "resolv" ]
frameworks = [
"CFNetwork.framework",
"CoreTelephony.framework",
"MobileCoreServices.framework",
"Security.framework",
"SystemConfiguration.framework",
"UniformTypeIdentifiers.framework",
]
}
if (is_win) {
libs = [
"crypt32.lib",
"dhcpcsvc.lib",
"iphlpapi.lib",
"ncrypt.lib",
"rpcrt4.lib",
"secur32.lib",
"urlmon.lib",
"winhttp.lib",
]
ldflags = [ "/DELAYLOAD:urlmon.dll" ]
}
if (!disable_file_support) {
sources += [
"base/directory_lister.cc",
"base/directory_lister.h",
"base/directory_listing.cc",
"base/directory_listing.h",
]
}
if (enable_websockets) {
sources += [
"websockets/websocket_basic_handshake_stream.cc",
"websockets/websocket_basic_handshake_stream.h",
"websockets/websocket_basic_stream.cc",
"websockets/websocket_basic_stream.h",
"websockets/websocket_basic_stream_adapters.cc",
"websockets/websocket_basic_stream_adapters.h",
"websockets/websocket_channel.cc",
"websockets/websocket_channel.h",
"websockets/websocket_deflate_parameters.cc",
"websockets/websocket_deflate_parameters.h",
"websockets/websocket_deflate_predictor.h",
"websockets/websocket_deflate_predictor_impl.cc",
"websockets/websocket_deflate_predictor_impl.h",
"websockets/websocket_deflate_stream.cc",
"websockets/websocket_deflate_stream.h",
"websockets/websocket_deflater.cc",
"websockets/websocket_deflater.h",
"websockets/websocket_errors.cc",
"websockets/websocket_errors.h",
"websockets/websocket_event_interface.h",
"websockets/websocket_extension.cc",
"websockets/websocket_extension.h",
"websockets/websocket_extension_parser.cc",
"websockets/websocket_extension_parser.h",
"websockets/websocket_frame.cc",
"websockets/websocket_frame.h",
"websockets/websocket_frame_parser.cc",
"websockets/websocket_frame_parser.h",
"websockets/websocket_handshake_challenge.cc",
"websockets/websocket_handshake_challenge.h",
"websockets/websocket_handshake_constants.cc",
"websockets/websocket_handshake_constants.h",
"websockets/websocket_handshake_request_info.cc",
"websockets/websocket_handshake_request_info.h",
"websockets/websocket_handshake_response_info.cc",
"websockets/websocket_handshake_response_info.h",
"websockets/websocket_handshake_stream_base.cc",
"websockets/websocket_handshake_stream_base.h",
"websockets/websocket_handshake_stream_create_helper.cc",
"websockets/websocket_handshake_stream_create_helper.h",
"websockets/websocket_http2_handshake_stream.cc",
"websockets/websocket_http2_handshake_stream.h",
"websockets/websocket_http3_handshake_stream.cc",
"websockets/websocket_http3_handshake_stream.h",
"websockets/websocket_inflater.cc",
"websockets/websocket_inflater.h",
"websockets/websocket_quic_spdy_stream.cc",
"websockets/websocket_quic_spdy_stream.h",
"websockets/websocket_stream.cc",
"websockets/websocket_stream.h",
]
}
# ICU support.
if (use_platform_icu_alternatives) {
if (is_android) {
# Use ICU alternative on Android.
sources += [ "base/net_string_util_icu_alternatives_android.cc" ]
} else if (is_ios) {
# Use ICU alternative on iOS.
sources += [ "base/net_string_util_icu_alternatives_ios.mm" ]
} else {
assert(false,
"ICU alternative is not implemented for platform: " + target_os)
}
} else {
# Use ICU.
sources += [
"base/filename_util_icu.cc",
"base/net_string_util_icu.cc",
]
}
# Brotli support.
if (!disable_brotli_filter) {
sources += [
"filter/brotli_source_stream.cc",
"filter/brotli_source_stream.h",
]
} else {
sources += [ "filter/brotli_source_stream_disabled.cc" ]
}
# Zstd support.
if (!disable_zstd_filter) {
sources += [
"filter/zstd_source_stream.cc",
"filter/zstd_source_stream.h",
]
} else {
sources += [
"filter/zstd_source_stream.h",
"filter/zstd_source_stream_disabled.cc",
]
}
if (!is_debug && !optimize_for_size) {
configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ]
}
if (!is_cronet_build) {
deps += [ "//mojo/public/cpp/bindings:default_construct_tag" ]
}
}
# net_export.h has its own build target so that code (eg
# net_nqe_proto) can use it without depending on the whole of //net.
source_set("net_export_header") {
sources = [ "base/net_export.h" ]
}
# Private dependencies for the //net component and for any build targets (e.g.
# source sets with circular dependencies with //net) that need to share the same
# dependencies.
source_set("net_deps") {
visibility = [
":net",
"//net/dns",
"//net/dns:dns_client",
"//net/dns:host_resolver",
"//net/dns:host_resolver_manager",
"//net/dns:mdns_client",
"//net/dns/public",
"//net/http:transport_security_state_generated_files",
"//net/third_party/quiche",
]
public_deps = [
":constants",
":cronet_buildflags",
":isolation_info_proto",
":net_export_header",
":preload_decoder",
"//base",
"//net/base/registry_controlled_domains",
"//third_party/protobuf:protobuf_lite",
"//third_party/zlib",
"//url:buildflags",
]
if (!disable_file_support) {
public_deps += [ ":net_resources" ]
}
public_configs = net_configs
if (use_gio) {
public_configs += [ "//build/linux:gio_config" ]
}
if (is_android) {
public_deps += [ ":net_jni_headers" ]
}
if (is_fuchsia) {
public_deps += [
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.hardware.network:fuchsia.hardware.network_hlcpp",
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces_hlcpp",
"//third_party/fuchsia-sdk/sdk/pkg/sys_cpp",
]
}
if (use_platform_icu_alternatives) {
if (is_android) {
public_deps += [ ":net_jni_headers" ]
}
} else {
public_deps += [
"//base:i18n",
"//third_party/icu",
]
}
if (!disable_brotli_filter) {
public_deps += [ "//third_party/brotli:dec" ]
} else {
public_deps += [ "//third_party/brotli:headers" ]
}
if (!disable_zstd_filter) {
public_deps += [ "//third_party/zstd:decompress" ]
} else {
public_deps += [ "//third_party/zstd:headers" ]
}
}
# Public dependencies for the //net component and for any build targets (e.g.
# source sets with circular dependencies with //net) that need to share the same
# dependencies.
source_set("net_public_deps") {
visibility = [
":net",
"//net/dns",
"//net/dns:dns_client",
"//net/dns:host_resolver",
"//net/dns:host_resolver_manager",
"//net/dns:mdns_client",
"//net/dns/public",
"//net/http:transport_security_state_generated_files",
"//net/third_party/quiche",
]
public_deps = [
":buildflags",
":net_nqe_proto",
":uri_template",
"//base",
"//crypto",
"//net/third_party/quiche",
"//net/third_party/quiche:net_quic_test_tools_proto",
"//net/traffic_annotation",
"//third_party/boringssl",
"//url",
]
if (chrome_root_store_supported) {
public_deps += [ "//net/cert:root_store_proto_lite" ]
}
}
if (is_android) {
java_cpp_enum("effective_connection_type_java") {
sources = [ "//net/nqe/effective_connection_type.h" ]
}
}
component("uri_template") {
sources = [
"third_party/uri_template/uri_template.cc",
"third_party/uri_template/uri_template.h",
]
visibility = [
":net_public_deps",
"//net/third_party/quiche",
]
defines = [ "IS_URI_TEMPLATE_IMPL" ]
public_deps = [ "//base" ]
}
grit("net_resources") {
source = "base/net_resources.grd"
outputs = [
"grit/net_resources.h",
"net_resources.pak",
]
}
proto_library("net_nqe_proto") {
visibility = [ ":net_public_deps" ]
sources = [ "nqe/proto/network_id_proto.proto" ]
cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:"
cc_include = "net/base/net_export.h"
component_build_force_source_set = true
deps = [ ":net_export_header" ]
defines = [ "NET_IMPLEMENTATION" ]
extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
}
proto_library("isolation_info_proto") {
sources = [ "base/isolation_info.proto" ]
}
component("extras") {
sources = [
"extras/sqlite/cookie_crypto_delegate.h",
"extras/sqlite/sqlite_persistent_cookie_store.cc",
"extras/sqlite/sqlite_persistent_cookie_store.h",
"extras/sqlite/sqlite_persistent_shared_dictionary_store.cc",
"extras/sqlite/sqlite_persistent_shared_dictionary_store.h",
"extras/sqlite/sqlite_persistent_store_backend_base.cc",
"extras/sqlite/sqlite_persistent_store_backend_base.h",
]
defines = [ "IS_NET_EXTRAS_IMPL" ]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [
":net",
"//base",
"//sql:sql",
]
public_deps = [ ":shared_dictionary" ]
if (enable_reporting) {
sources += [
"extras/sqlite/sqlite_persistent_reporting_and_nel_store.cc",
"extras/sqlite/sqlite_persistent_reporting_and_nel_store.h",
]
}
}
component("shared_dictionary") {
sources = [
"extras/shared_dictionary/shared_dictionary_info.cc",
"extras/shared_dictionary/shared_dictionary_info.h",
"extras/shared_dictionary/shared_dictionary_isolation_key.cc",
"extras/shared_dictionary/shared_dictionary_isolation_key.h",
"extras/shared_dictionary/shared_dictionary_usage_info.h",
]
defines = [ "IS_NET_SHARED_DICTIONARY_IMPL" ]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [
":net",
"//base",
]
}
static_library("preload_decoder") {
sources = [
"extras/preload_data/decoder.cc",
"extras/preload_data/decoder.h",
]
deps = [ "//base" ]
}
if (!is_ios) {
executable("dump_cache") {
testonly = true
sources = [
"tools/dump_cache/dump_cache.cc",
"tools/dump_cache/dump_files.cc",
"tools/dump_cache/dump_files.h",
]
deps = [
":net",
":test_support",
"//base",
"//build/win:default_exe_manifest",
]
}
}
if (is_ios) {
bundle_data_from_filelist("test_support_bundle_data") {
visibility = [ ":test_support" ]
testonly = true
filelist_name = "data/test_support_bundle_data.filelist"
}
}
static_library("gtest_util") {
testonly = true
sources = [
"test/gtest_util.h",
"test/scoped_disable_exit_on_dfatal.cc",
"test/scoped_disable_exit_on_dfatal.h",
]
public_deps = [
"//base",
"//base/test:test_support",
"//net",
"//testing/gmock",
"//testing/gtest",
]
}
static_library("test_support") {
testonly = true
sources = [
"base/connection_endpoint_metadata_test_util.cc",
"base/connection_endpoint_metadata_test_util.h",
"base/load_timing_info_test_util.cc",
"base/load_timing_info_test_util.h",
"base/mock_file_stream.cc",
"base/mock_file_stream.h",
"base/mock_network_change_notifier.cc",
"base/mock_network_change_notifier.h",
"base/test_completion_callback.cc",
"base/test_completion_callback.h",
"base/test_data_stream.cc",
"base/test_data_stream.h",
"cert/internal/cert_issuer_source_sync_unittest.h",
"cert/internal/test_helpers.cc",
"cert/internal/test_helpers.h",
"cert/mock_cert_net_fetcher.cc",
"cert/mock_cert_net_fetcher.h",
"cert/mock_cert_verifier.cc",
"cert/mock_cert_verifier.h",
"cert/mock_client_cert_verifier.cc",
"cert/mock_client_cert_verifier.h",
"cookies/canonical_cookie_test_helpers.h",
"cookies/cookie_change_dispatcher_test_helpers.cc",
"cookies/cookie_change_dispatcher_test_helpers.h",
"cookies/cookie_monster_store_test.cc",
"cookies/cookie_monster_store_test.h",
"cookies/cookie_store_change_unittest.h",
"cookies/cookie_store_test_callbacks.cc",
"cookies/cookie_store_test_callbacks.h",
"cookies/cookie_store_test_helpers.cc",
"cookies/cookie_store_test_helpers.h",
"cookies/cookie_store_unittest.h",
"cookies/test_cookie_access_delegate.cc",
"cookies/test_cookie_access_delegate.h",
"disk_cache/disk_cache_test_base.cc",
"disk_cache/disk_cache_test_base.h",
"disk_cache/disk_cache_test_util.cc",
"disk_cache/disk_cache_test_util.h",
"disk_cache/mock/mock_backend_impl.cc",
"disk_cache/mock/mock_backend_impl.h",
"disk_cache/mock/mock_entry_impl.cc",
"disk_cache/mock/mock_entry_impl.h",
"filter/filter_source_stream_test_util.cc",
"filter/filter_source_stream_test_util.h",
"filter/mock_source_stream.cc",
"filter/mock_source_stream.h",
"http/http_response_headers_test_util.cc",
"http/http_response_headers_test_util.h",
"http/http_stream_factory_test_util.cc",
"http/http_stream_factory_test_util.h",
"http/http_transaction_test_util.cc",
"http/http_transaction_test_util.h",
"http/mock_http_cache.cc",
"http/mock_http_cache.h",
"http/transport_security_state_test_util.cc",
"http/transport_security_state_test_util.h",
"log/test_net_log.cc",
"log/test_net_log.h",
"log/test_net_log_util.cc",
"log/test_net_log_util.h",
"nqe/network_quality_estimator_test_util.cc",
"nqe/network_quality_estimator_test_util.h",
"proxy_resolution/mock_pac_file_fetcher.cc",
"proxy_resolution/mock_pac_file_fetcher.h",
"proxy_resolution/mock_proxy_resolver.cc",
"proxy_resolution/mock_proxy_resolver.h",
"proxy_resolution/proxy_config_service_common_unittest.cc",
"proxy_resolution/proxy_config_service_common_unittest.h",
"socket/read_buffering_stream_socket.cc",
"socket/read_buffering_stream_socket.h",
"socket/socket_test_util.cc",
"socket/socket_test_util.h",
"socket/transport_client_socket_test_util.cc",
"socket/transport_client_socket_test_util.h",
"spdy/spdy_test_util_common.cc",
"spdy/spdy_test_util_common.h",
"ssl/client_cert_identity_test_util.cc",
"ssl/client_cert_identity_test_util.h",
"ssl/ssl_private_key_test_util.cc",
"ssl/ssl_private_key_test_util.h",
"ssl/test_ssl_config_service.cc",
"ssl/test_ssl_config_service.h",
"ssl/test_ssl_private_key.cc",
"ssl/test_ssl_private_key.h",
"test/cert_builder.cc",
"test/cert_builder.h",
"test/cert_test_util.cc",
"test/cert_test_util.h",
"test/ct_test_util.cc",
"test/ct_test_util.h",
"test/embedded_test_server/connection_tracker.cc",
"test/embedded_test_server/connection_tracker.h",
"test/embedded_test_server/controllable_http_response.cc",
"test/embedded_test_server/controllable_http_response.h",
"test/embedded_test_server/default_handlers.cc",
"test/embedded_test_server/default_handlers.h",
"test/embedded_test_server/embedded_test_server.cc",
"test/embedded_test_server/embedded_test_server.h",
"test/embedded_test_server/embedded_test_server_connection_listener.cc",
"test/embedded_test_server/embedded_test_server_connection_listener.h",
"test/embedded_test_server/http1_connection.cc",
"test/embedded_test_server/http1_connection.h",
"test/embedded_test_server/http2_connection.cc",
"test/embedded_test_server/http2_connection.h",
"test/embedded_test_server/http_connection.cc",
"test/embedded_test_server/http_connection.h",
"test/embedded_test_server/http_request.cc",
"test/embedded_test_server/http_request.h",
"test/embedded_test_server/http_response.cc",
"test/embedded_test_server/http_response.h",
"test/embedded_test_server/request_handler_util.cc",
"test/embedded_test_server/request_handler_util.h",
"test/embedded_test_server/simple_connection_listener.cc",
"test/embedded_test_server/simple_connection_listener.h",
"test/event_waiter.h",
"test/key_util.cc",
"test/key_util.h",
"test/net_test_suite.cc",
"test/net_test_suite.h",
"test/quic_simple_test_server.cc",
"test/quic_simple_test_server.h",
"test/revocation_builder.cc",
"test/revocation_builder.h",
"test/ssl_test_util.cc",
"test/ssl_test_util.h",
"test/test_certificate_data.h",
"test/test_data_directory.cc",
"test/test_data_directory.h",
"test/test_doh_server.cc",
"test/test_doh_server.h",
"test/test_with_task_environment.cc",
"test/test_with_task_environment.h",
"test/url_request/ssl_certificate_error_job.cc",
"test/url_request/ssl_certificate_error_job.h",
"test/url_request/url_request_failed_job.cc",
"test/url_request/url_request_failed_job.h",
"test/url_request/url_request_hanging_read_job.cc",
"test/url_request/url_request_hanging_read_job.h",
"test/url_request/url_request_mock_data_job.cc",
"test/url_request/url_request_mock_data_job.h",
"url_request/url_request_test_job.cc",
"url_request/url_request_test_job.h",
"url_request/url_request_test_util.cc",
"url_request/url_request_test_util.h",
]
if (is_linux || is_chromeos || is_android) {
sources += [
"base/address_tracker_linux_test_util.cc",
"base/address_tracker_linux_test_util.h",
]
}
configs += [ "//build/config:precompiled_headers" ]
public_deps = [
":cronet_buildflags",
":gtest_util",
"//base",
"//base/test:test_support",
"//crypto",
"//net",
"//net/dns:test_support",
"//net/tools/tld_cleanup",
"//net/traffic_annotation:test_support",
"//testing/gmock",
"//testing/gtest",
"//url",
]
deps = [
":quic_test_flags_utils",
":simple_quic_tools",
"//net/http:transport_security_state_unittest_data_default",
"//third_party/zlib",
]
allow_circular_includes_from = [ "//net/dns:test_support" ]
# Data dependencies shared with suites other than net_unittests.
data = [
"data/cert_net_fetcher_impl_unittest/",
"data/dns/",
"data/ov_name_constraints/",
"data/parse_certificate_unittest/",
"data/ssl/",
"data/url_request_unittest/",
"data/websocket/",
]
if (is_mac) {
frameworks = [ "Security.framework" ]
}
if (is_ios) {
deps += [ ":test_support_bundle_data" ]
}
if (use_nss_certs) {
configs += [ "//build/config/linux/nss" ]
}
if (enable_websockets || (is_cronet_build && !is_ios)) {
sources += [
"test/spawned_test_server/base_test_server.cc",
"test/spawned_test_server/base_test_server.h",
"test/spawned_test_server/spawned_test_server.h",
]
}
public_configs = [ ":net_test_config" ]
if (use_remote_test_server) {
sources += [
"test/spawned_test_server/remote_test_server.cc",
"test/spawned_test_server/remote_test_server.h",
"test/spawned_test_server/remote_test_server_spawner_request.cc",
"test/spawned_test_server/remote_test_server_spawner_request.h",
]
} else if (!is_ios) {
sources += [
"test/spawned_test_server/local_test_server.cc",
"test/spawned_test_server/local_test_server.h",
]
if (is_win) {
sources += [ "test/spawned_test_server/local_test_server_win.cc" ]
} else if (is_posix || is_fuchsia) {
sources += [ "test/spawned_test_server/local_test_server_posix.cc" ]
}
}
if (enable_python_utils) {
sources += [
"test/python_utils.cc",
"test/python_utils.h",
]
}
if (use_nss_certs) {
sources += [ "test/cert_test_util_nss.cc" ]
}
if (!disable_file_support) {
sources += [
"test/url_request/url_request_mock_http_job.cc",
"test/url_request/url_request_mock_http_job.h",
"test/url_request/url_request_test_job_backed_by_file.cc",
"test/url_request/url_request_test_job_backed_by_file.h",
]
}
if (enable_reporting) {
sources += [
"network_error_logging/mock_persistent_nel_store.cc",
"network_error_logging/mock_persistent_nel_store.h",
"network_error_logging/network_error_logging_test_util.cc",
"network_error_logging/network_error_logging_test_util.h",
"reporting/mock_persistent_reporting_store.cc",
"reporting/mock_persistent_reporting_store.h",
"reporting/reporting_test_util.cc",
"reporting/reporting_test_util.h",
]
}
}
if (!is_ios && !is_android) {
executable("cert_verify_tool") {
testonly = true
sources = [
"tools/cert_verify_tool/cert_verify_tool.cc",
"tools/cert_verify_tool/cert_verify_tool_util.cc",
"tools/cert_verify_tool/cert_verify_tool_util.h",
"tools/cert_verify_tool/verify_using_cert_verify_proc.cc",
"tools/cert_verify_tool/verify_using_cert_verify_proc.h",
"tools/cert_verify_tool/verify_using_path_builder.cc",
"tools/cert_verify_tool/verify_using_path_builder.h",
]
deps = [
":net",
":test_support",
"//base",
"//build/win:default_exe_manifest",
]
if (is_mac) {
frameworks = [ "Security.framework" ]
}
}
proto_library("cert_verify_comparison_tool_proto") {
sources = [ "tools/cert_verify_tool/dumper.proto" ]
visibility = [ ":cert_verify_comparison_tool" ]
}
executable("cert_verify_comparison_tool") {
testonly = true
sources = [
"tools/cert_verify_tool/cert_verify_comparision_tool.cc",
"tools/cert_verify_tool/cert_verify_tool_util.cc",
"tools/cert_verify_tool/cert_verify_tool_util.h",
"tools/cert_verify_tool/verify_using_cert_verify_proc.cc",
"tools/cert_verify_tool/verify_using_cert_verify_proc.h",
]
deps = [
":cert_verify_comparison_tool_proto",
":net",
":test_support",
"//base",
"//build/win:default_exe_manifest",
]
if (is_mac) {
frameworks = [ "Security.framework" ]
}
}
executable("crash_cache") {
testonly = true
sources = [ "tools/crash_cache/crash_cache.cc" ]
deps = [
":net",
":test_support",
"//base",
"//build/win:default_exe_manifest",
]
}
executable("hpack_example_generator") {
testonly = true
sources = [ "spdy/fuzzing/hpack_example_generator.cc" ]
deps = [
":net",
":spdy_test_tools",
"//base",
"//build/win:default_exe_manifest",
]
}
executable("net_watcher") {
testonly = true
sources = [ "tools/net_watcher/net_watcher.cc" ]
deps = [
":net",
"//base",
"//build:chromeos_buildflags",
"//build/win:default_exe_manifest",
]
}
executable("run_testserver") {
testonly = true
sources = [ "tools/testserver/run_testserver.cc" ]
deps = [
":test_support",
"//base",
"//base/test:test_support",
"//build/win:default_exe_manifest",
"//testing/gtest",
]
}
executable("stress_cache") {
testonly = true
sources = [ "tools/stress_cache/stress_cache.cc" ]
deps = [
":net",
":test_support",
"//base",
"//build/win:default_exe_manifest",
]
}
executable("tld_cleanup") {
sources = [ "tools/tld_cleanup/tld_cleanup.cc" ]
deps = [
"//base",
"//base:i18n",
"//build/win:default_exe_manifest",
"//net/tools/tld_cleanup",
]
}
}
if (use_external_gssapi) {
# In order for the tests to be reliable, these two targets cannot depend on a
# valid GSSAPI library. This is easy to achieve on most platforms. But on
# macOS care must be taken to not depend directly or indirectly on
# GSS.framework. This is suprisingly easy to get wrong since
# Security.framework is such a common dependency and it indirectly depends on
# GSS.
shared_library("test_gssapi") {
testonly = true
sources = [
"tools/gssapi/gss_import_name.cc",
"tools/gssapi/gss_methods.cc",
"tools/gssapi/gss_types.h",
]
}
shared_library("test_badgssapi") {
testonly = true
sources = [
"tools/gssapi/gss_methods.cc",
"tools/gssapi/gss_types.h",
]
}
}
if (is_linux || is_chromeos || is_mac) {
executable("cachetool") {
testonly = true
sources = [ "tools/cachetool/cachetool.cc" ]
deps = [
":net",
":test_support",
"//base",
]
}
executable("content_decoder_tool") {
testonly = true
sources = [
"tools/content_decoder_tool/content_decoder_tool.cc",
"tools/content_decoder_tool/content_decoder_tool.h",
"tools/content_decoder_tool/content_decoder_tool_bin.cc",
]
deps = [
":net",
":test_support",
"//base",
"//url",
]
}
}
if (is_android) {
generate_jni("net_jni_headers") {
sources = [
"android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
"android/java/src/org/chromium/net/AndroidKeyStore.java",
"android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
"android/java/src/org/chromium/net/AndroidTrafficStats.java",
"android/java/src/org/chromium/net/DnsStatus.java",
"android/java/src/org/chromium/net/GURLUtils.java",
"android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java",
"android/java/src/org/chromium/net/HttpUtil.java",
"android/java/src/org/chromium/net/NetStringUtil.java",
"android/java/src/org/chromium/net/NetworkActiveNotifier.java",
"android/java/src/org/chromium/net/NetworkChangeNotifier.java",
"android/java/src/org/chromium/net/ProxyChangeListener.java",
"android/java/src/org/chromium/net/X509Util.java",
]
}
}
if (is_android || is_linux || is_chromeos) {
executable("disk_cache_memory_test") {
testonly = true
sources = [ "tools/disk_cache_memory_test/disk_cache_memory_test.cc" ]
deps = [
":net",
"//base",
]
}
}
source_set("spdy_test_tools") {
testonly = true
sources = [
"spdy/fuzzing/hpack_fuzz_util.cc",
"spdy/fuzzing/hpack_fuzz_util.h",
]
deps = [
":net",
"//base",
"//testing/gmock",
"//testing/gtest",
]
}
source_set("quic_test_flags_utils") {
testonly = true
sources = [
"quic/platform/impl/quic_test_flags_utils.cc",
"quic/platform/impl/quic_test_flags_utils.h",
]
deps = [ ":net" ]
}
source_set("quic_test_tools") {
testonly = true
sources = [
"quic/crypto_test_utils_chromium.cc",
"quic/crypto_test_utils_chromium.h",
"quic/mock_crypto_client_stream.cc",
"quic/mock_crypto_client_stream.h",
"quic/mock_crypto_client_stream_factory.cc",
"quic/mock_crypto_client_stream_factory.h",
"quic/mock_decrypter.cc",
"quic/mock_decrypter.h",
"quic/mock_encrypter.cc",
"quic/mock_encrypter.h",
"quic/mock_quic_context.cc",
"quic/mock_quic_context.h",
"quic/test_task_runner.cc",
"quic/test_task_runner.h",
]
deps = [
":net",
":simple_quic_tools",
":test_support",
"//base",
"//crypto:test_support",
"//testing/gmock",
"//testing/gtest",
"//third_party/boringssl",
"//third_party/protobuf:protobuf_lite",
"//third_party/quic_trace:quic_trace_proto",
]
public_deps = [
":quic_test_flags_utils",
"//net/third_party/quiche:quiche_test_support",
]
}
source_set("simple_quic_tools") {
testonly = true
sources = [
"tools/quic/quic_client_message_loop_network_helper.cc",
"tools/quic/quic_client_message_loop_network_helper.h",
"tools/quic/quic_simple_client.cc",
"tools/quic/quic_simple_client.h",
"tools/quic/quic_simple_server.cc",
"tools/quic/quic_simple_server.h",
"tools/quic/quic_simple_server_packet_writer.cc",
"tools/quic/quic_simple_server_packet_writer.h",
"tools/quic/quic_simple_server_session_helper.cc",
"tools/quic/quic_simple_server_session_helper.h",
"tools/quic/quic_simple_server_socket.cc",
"tools/quic/quic_simple_server_socket.h",
"tools/quic/synchronous_host_resolver.cc",
"tools/quic/synchronous_host_resolver.h",
]
deps = [
":net",
"//base",
"//net/third_party/quiche:quiche_tool_support",
"//third_party/protobuf:protobuf_lite",
"//url",
]
public_deps = [ "//net/third_party/quiche:quiche_tool_support" ]
}
if (!is_ios) {
executable("quic_client") {
testonly = true
sources = [ "tools/quic/quic_simple_client_bin.cc" ]
deps = [
":net",
":simple_quic_tools",
"//base",
"//build/win:default_exe_manifest",
"//net/third_party/quiche:quic_client_core",
"//url",
]
}
executable("quic_server") {
testonly = true
sources = [
"tools/quic/quic_simple_server_backend_factory.cc",
"tools/quic/quic_simple_server_backend_factory.h",
"tools/quic/quic_simple_server_bin.cc",
]
deps = [
":net",
":simple_quic_tools",
"//base",
"//build/win:default_exe_manifest",
"//net/third_party/quiche:quic_server_core",
"//third_party/boringssl",
"//third_party/protobuf:protobuf_lite",
]
}
executable("crypto_message_printer") {
testonly = true
sources = [ "tools/quic/crypto_message_printer_bin.cc" ]
deps = [
":net",
"//base",
"//build/win:default_exe_manifest",
]
}
}
if (is_ios) {
bundle_data_from_filelist("net_test_bundle_data") {
testonly = true
filelist_name = "data/test_bundle_data.filelist"
}
}
if (!is_cronet_build) {
test("net_fuzztests") {
sources = [
"cert/x509_certificate_fuzztest.cc",
"http/http_cookie_indices_fuzztest.cc",
]
fuzztests = [
"CookieIndicesFuzzTest.FuzzParseFromHeader",
"X509CertificateFuzzTest.FuzzCreateFromDERCertChain",
]
deps = [
":net",
"//third_party/fuzztest:fuzztest_gtest_main",
]
}
}
test("net_unittests") {
sources = [
"base/address_family_unittest.cc",
"base/address_list_unittest.cc",
"base/backoff_entry_serializer_unittest.cc",
"base/backoff_entry_unittest.cc",
"base/chunked_upload_data_stream_unittest.cc",
"base/data_url_unittest.cc",
"base/datagram_buffer_unittest.cc",
"base/elements_upload_data_stream_unittest.cc",
"base/expiring_cache_unittest.cc",
"base/file_stream_unittest.cc",
"base/filename_util_unittest.cc",
"base/host_mapping_rules_unittest.cc",
"base/host_port_pair_unittest.cc",
"base/interval_test.cc",
"base/ip_address_unittest.cc",
"base/ip_endpoint_unittest.cc",
"base/isolation_info_unittest.cc",
"base/lookup_string_in_fixed_set_unittest.cc",
"base/mime_sniffer_unittest.cc",
"base/mime_util_unittest.cc",
"base/net_errors_unittest.cc",
"base/net_string_util_unittest.cc",
"base/network_activity_monitor_unittest.cc",
"base/network_anonymization_key_unittest.cc",
"base/network_change_notifier_unittest.cc",
"base/network_delegate_unittest.cc",
"base/network_interfaces_unittest.cc",
"base/network_isolation_key_unittest.cc",
"base/parse_number_unittest.cc",
"base/port_util_unittest.cc",
"base/prioritized_dispatcher_unittest.cc",
"base/prioritized_task_runner_unittest.cc",
"base/priority_queue_unittest.cc",
"base/proxy_chain_unittest.cc",
"base/proxy_server_unittest.cc",
"base/proxy_string_util_unittest.cc",
"base/registry_controlled_domains/registry_controlled_domain_unittest.cc",
"base/scheme_host_port_matcher_rule_unittest.cc",
"base/scheme_host_port_matcher_unittest.cc",
"base/schemeful_site_unittest.cc",
"base/test_completion_callback_unittest.cc",
"base/test_proxy_delegate.cc",
"base/test_proxy_delegate.h",
"base/upload_bytes_element_reader_unittest.cc",
"base/upload_file_element_reader_unittest.cc",
"base/url_search_params_unittest.cc",
"base/url_util_unittest.cc",
"cert/caching_cert_verifier_unittest.cc",
"cert/cert_database_unittest.cc",
"cert/cert_verifier_unittest.cc",
"cert/cert_verify_proc_builtin_unittest.cc",
"cert/cert_verify_proc_unittest.cc",
"cert/coalescing_cert_verifier_unittest.cc",
"cert/crl_set_unittest.cc",
"cert/ct_log_response_parser_unittest.cc",
"cert/ct_log_verifier_unittest.cc",
"cert/ct_objects_extractor_unittest.cc",
"cert/ct_serialization_unittest.cc",
"cert/ev_root_ca_metadata_unittest.cc",
"cert/internal/cert_issuer_source_aia_unittest.cc",
"cert/internal/cert_issuer_source_sync_unittest.cc",
"cert/internal/revocation_checker_unittest.cc",
"cert/internal/system_trust_store_unittest.cc",
"cert/known_roots_unittest.cc",
"cert/merkle_audit_proof_unittest.cc",
"cert/merkle_tree_leaf_unittest.cc",
"cert/multi_log_ct_verifier_unittest.cc",
"cert/multi_threaded_cert_verifier_unittest.cc",
"cert/signed_certificate_timestamp_unittest.cc",
"cert/symantec_certs_unittest.cc",
"cert/test_root_certs_unittest.cc",
"cert/time_conversions_unittest.cc",
"cert/x509_cert_types_unittest.cc",
"cert/x509_certificate_unittest.cc",
"cert/x509_util_unittest.cc",
"cert_net/cert_net_fetcher_url_request_unittest.cc",
"cookies/canonical_cookie_unittest.cc",
"cookies/cookie_base_unittest.cc",
"cookies/cookie_constants_unittest.cc",
"cookies/cookie_deletion_info_unittest.cc",
"cookies/cookie_inclusion_status_unittest.cc",
"cookies/cookie_monster_unittest.cc",
"cookies/cookie_options_unittest.cc",
"cookies/cookie_partition_key_collection_unittest.cc",
"cookies/cookie_partition_key_unittest.cc",
"cookies/cookie_util_unittest.cc",
"cookies/parsed_cookie_unittest.cc",
"cookies/site_for_cookies_unittest.cc",
"cookies/static_cookie_policy_unittest.cc",
"disk_cache/backend_cleanup_tracker_unittest.cc",
"disk_cache/backend_unittest.cc",
"disk_cache/blockfile/addr_unittest.cc",
"disk_cache/blockfile/bitmap_unittest.cc",
"disk_cache/blockfile/block_files_unittest.cc",
"disk_cache/blockfile/mapped_file_unittest.cc",
"disk_cache/blockfile/stats_unittest.cc",
"disk_cache/blockfile/storage_block_unittest.cc",
"disk_cache/cache_util_unittest.cc",
"disk_cache/entry_unittest.cc",
"disk_cache/simple/simple_file_enumerator_unittest.cc",
"disk_cache/simple/simple_file_tracker_unittest.cc",
"disk_cache/simple/simple_index_file_unittest.cc",
"disk_cache/simple/simple_index_unittest.cc",
"disk_cache/simple/simple_test_util.cc",
"disk_cache/simple/simple_test_util.h",
"disk_cache/simple/simple_util_unittest.cc",
"disk_cache/simple/simple_version_upgrade_unittest.cc",
"filter/filter_source_stream_unittest.cc",
"filter/gzip_source_stream_unittest.cc",
"first_party_sets/addition_overlaps_union_find_unittest.cc",
"first_party_sets/first_party_set_entry_override_unittest.cc",
"first_party_sets/first_party_sets_cache_filter_unittest.cc",
"first_party_sets/first_party_sets_context_config_unittest.cc",
"first_party_sets/global_first_party_sets_unittest.cc",
"first_party_sets/local_set_declaration_unittest.cc",
"first_party_sets/sets_mutation_unittest.cc",
"http/alternative_service_unittest.cc",
"http/bidirectional_stream_unittest.cc",
"http/broken_alternative_services_unittest.cc",
"http/http_auth_cache_unittest.cc",
"http/http_auth_challenge_tokenizer_unittest.cc",
"http/http_auth_controller_unittest.cc",
"http/http_auth_filter_unittest.cc",
"http/http_auth_handler_basic_unittest.cc",
"http/http_auth_handler_digest_unittest.cc",
"http/http_auth_handler_factory_unittest.cc",
"http/http_auth_handler_mock.cc",
"http/http_auth_handler_mock.h",
"http/http_auth_handler_unittest.cc",
"http/http_auth_multi_round_parse_unittest.cc",
"http/http_auth_preferences_unittest.cc",
"http/http_auth_unittest.cc",
"http/http_basic_state_unittest.cc",
"http/http_byte_range_unittest.cc",
"http/http_cache_unittest.cc",
"http/http_cache_writers_unittest.cc",
"http/http_chunked_decoder_unittest.cc",
"http/http_content_disposition_unittest.cc",
"http/http_cookie_indices_unittest.cc",
"http/http_log_util_unittest.cc",
"http/http_network_layer_unittest.cc",
"http/http_network_transaction_unittest.cc",
"http/http_no_vary_search_data_unittest.cc",
"http/http_proxy_client_socket_unittest.cc",
"http/http_proxy_connect_job_unittest.cc",
"http/http_request_headers_unittest.cc",
"http/http_request_info_unittest.cc",
"http/http_response_body_drainer_unittest.cc",
"http/http_response_headers_unittest.cc",
"http/http_response_info_unittest.cc",
"http/http_security_headers_unittest.cc",
"http/http_server_properties_manager_unittest.cc",
"http/http_server_properties_unittest.cc",
"http/http_status_code_unittest.cc",
"http/http_stream_factory_job_controller_unittest.cc",
"http/http_stream_factory_unittest.cc",
"http/http_stream_parser_unittest.cc",
"http/http_stream_request_unittest.cc",
"http/http_transaction_test_util_unittest.cc",
"http/http_util_unittest.cc",
"http/http_vary_data_unittest.cc",
"http/mock_allow_http_auth_preferences.cc",
"http/mock_allow_http_auth_preferences.h",
"http/test_upload_data_stream_not_allow_http1.cc",
"http/test_upload_data_stream_not_allow_http1.h",
"http/transport_security_persister_unittest.cc",
"http/transport_security_state_unittest.cc",
"http/url_security_manager_unittest.cc",
"log/file_net_log_observer_unittest.cc",
"log/net_log_capture_mode_unittest.cc",
"log/net_log_unittest.cc",
"log/net_log_util_unittest.cc",
"log/net_log_values_unittest.cc",
"nqe/effective_connection_type_unittest.cc",
"nqe/event_creator_unittest.cc",
"nqe/network_id_unittest.cc",
"nqe/network_qualities_prefs_manager_unittest.cc",
"nqe/network_quality_estimator_params_unittest.cc",
"nqe/network_quality_estimator_unittest.cc",
"nqe/network_quality_estimator_util_unittest.cc",
"nqe/network_quality_store_unittest.cc",
"nqe/observation_buffer_unittest.cc",
"nqe/socket_watcher_unittest.cc",
"nqe/throughput_analyzer_unittest.cc",
"proxy_resolution/configured_proxy_resolution_service_unittest.cc",
"proxy_resolution/multi_threaded_proxy_resolver_unittest.cc",
"proxy_resolution/network_delegate_error_observer_unittest.cc",
"proxy_resolution/pac_file_decider_unittest.cc",
"proxy_resolution/pac_file_fetcher_impl_unittest.cc",
"proxy_resolution/proxy_bypass_rules_unittest.cc",
"proxy_resolution/proxy_config_unittest.cc",
"proxy_resolution/proxy_info_unittest.cc",
"proxy_resolution/proxy_list_unittest.cc",
"quic/bidirectional_stream_quic_impl_unittest.cc",
"quic/crypto/proof_test_chromium.cc",
"quic/crypto/proof_verifier_chromium_test.cc",
"quic/dedicated_web_transport_http3_client_test.cc",
"quic/mock_quic_data.cc",
"quic/mock_quic_data.h",
"quic/network_connection_unittest.cc",
"quic/platform/impl/quic_chromium_clock_test.cc",
"quic/properties_based_quic_server_info_test.cc",
"quic/quic_address_mismatch_test.cc",
"quic/quic_chromium_alarm_factory_test.cc",
"quic/quic_chromium_client_session_peer.cc",
"quic/quic_chromium_client_session_peer.h",
"quic/quic_chromium_client_session_test.cc",
"quic/quic_chromium_client_stream_test.cc",
"quic/quic_chromium_connection_helper_test.cc",
"quic/quic_clock_skew_detector_test.cc",
"quic/quic_end_to_end_unittest.cc",
"quic/quic_http_stream_test.cc",
"quic/quic_http_utils_test.cc",
"quic/quic_network_transaction_unittest.cc",
"quic/quic_proxy_client_socket_test_base.cc",
"quic/quic_proxy_client_socket_test_base.h",
"quic/quic_proxy_client_socket_unittest.cc",
"quic/quic_proxy_datagram_client_socket_unittest.cc",
"quic/quic_session_key_unittest.cc",
"quic/quic_session_pool_peer.cc",
"quic/quic_session_pool_peer.h",
"quic/quic_session_pool_proxy_job_unittest.cc",
"quic/quic_session_pool_test.cc",
"quic/quic_session_pool_test_base.cc",
"quic/quic_session_pool_test_base.h",
"quic/quic_test_packet_maker.cc",
"quic/quic_test_packet_maker.h",
"quic/quic_test_packet_printer.cc",
"quic/quic_test_packet_printer.h",
"quic/set_quic_flag_test.cc",
"quic/test_quic_crypto_client_config_handle.cc",
"quic/test_quic_crypto_client_config_handle.h",
"socket/client_socket_pool_base_unittest.cc",
"socket/client_socket_pool_unittest.cc",
"socket/connect_job_factory_unittest.cc",
"socket/connect_job_params_factory_unittest.cc",
"socket/connect_job_test_util.cc",
"socket/connect_job_test_util.h",
"socket/connect_job_unittest.cc",
"socket/mock_client_socket_pool_manager.cc",
"socket/mock_client_socket_pool_manager.h",
"socket/sequenced_socket_data_unittest.cc",
"socket/socket_bio_adapter_unittest.cc",
"socket/socket_tag_unittest.cc",
"socket/socks5_client_socket_unittest.cc",
"socket/socks_client_socket_unittest.cc",
"socket/socks_connect_job_unittest.cc",
"socket/ssl_client_socket_unittest.cc",
"socket/ssl_connect_job_unittest.cc",
"socket/ssl_server_socket_unittest.cc",
"socket/tcp_client_socket_unittest.cc",
"socket/tcp_server_socket_unittest.cc",
"socket/tcp_socket_unittest.cc",
"socket/transport_client_socket_pool_test_util.cc",
"socket/transport_client_socket_pool_test_util.h",
"socket/transport_client_socket_pool_unittest.cc",
"socket/transport_client_socket_unittest.cc",
"socket/transport_connect_job_unittest.cc",
"socket/udp_socket_unittest.cc",
"socket/websocket_endpoint_lock_manager_unittest.cc",
"socket/websocket_transport_client_socket_pool_unittest.cc",
"spdy/alps_decoder_test.cc",
"spdy/bidirectional_stream_spdy_impl_unittest.cc",
"spdy/buffered_spdy_framer_unittest.cc",
"spdy/fuzzing/hpack_fuzz_util_test.cc",
"spdy/header_coalescer_test.cc",
"spdy/http2_priority_dependencies_unittest.cc",
"spdy/spdy_buffer_unittest.cc",
"spdy/spdy_http_stream_unittest.cc",
"spdy/spdy_http_utils_unittest.cc",
"spdy/spdy_log_util_unittest.cc",
"spdy/spdy_network_transaction_unittest.cc",
"spdy/spdy_proxy_client_socket_unittest.cc",
"spdy/spdy_read_queue_unittest.cc",
"spdy/spdy_session_key_unittest.cc",
"spdy/spdy_session_pool_unittest.cc",
"spdy/spdy_session_test_util.cc",
"spdy/spdy_session_test_util.h",
"spdy/spdy_session_unittest.cc",
"spdy/spdy_stream_test_util.cc",
"spdy/spdy_stream_test_util.h",
"spdy/spdy_stream_unittest.cc",
"spdy/spdy_write_queue_unittest.cc",
"ssl/client_cert_identity_unittest.cc",
"ssl/client_cert_store_unittest-inl.h",
"ssl/openssl_private_key_unittest.cc",
"ssl/ssl_cipher_suite_names_unittest.cc",
"ssl/ssl_client_auth_cache_unittest.cc",
"ssl/ssl_client_session_cache_unittest.cc",
"ssl/ssl_config_service_unittest.cc",
"ssl/ssl_config_unittest.cc",
"ssl/ssl_connection_status_flags_unittest.cc",
"ssl/ssl_platform_key_util_unittest.cc",
"test/embedded_test_server/embedded_test_server_unittest.cc",
"test/embedded_test_server/http_request_unittest.cc",
"test/embedded_test_server/http_response_unittest.cc",
"test/run_all_unittests.cc",
"third_party/uri_template/uri_template_test.cc",
"tools/content_decoder_tool/content_decoder_tool.cc",
"tools/content_decoder_tool/content_decoder_tool.h",
"tools/content_decoder_tool/content_decoder_tool_unittest.cc",
"tools/quic/quic_simple_client_test.cc",
"tools/tld_cleanup/tld_cleanup_util_unittest.cc",
"url_request/redirect_info_unittest.cc",
"url_request/redirect_util_unittest.cc",
"url_request/url_request_context_builder_unittest.cc",
"url_request/url_request_filter_unittest.cc",
"url_request/url_request_http_job_unittest.cc",
"url_request/url_request_job_factory_unittest.cc",
"url_request/url_request_job_unittest.cc",
"url_request/url_request_quic_unittest.cc",
"url_request/url_request_unittest.cc",
"url_request/view_cache_helper_unittest.cc",
]
if (is_android) {
sources += [
"android/dummy_spnego_authenticator.cc",
"android/dummy_spnego_authenticator.h",
"android/http_auth_negotiate_android_unittest.cc",
"android/network_change_notifier_android_unittest.cc",
"android/network_library_unittest.cc",
"android/traffic_stats_unittest.cc",
"cert/cert_verify_proc_android_unittest.cc",
"proxy_resolution/proxy_config_service_android_unittest.cc",
"ssl/ssl_platform_key_android_unittest.cc",
]
}
if (is_chromeos_ash && use_nss_certs) {
sources += [
"cert/nss_cert_database_chromeos_unittest.cc",
"cert/nss_profile_filter_chromeos_unittest.cc",
]
}
if (is_linux) {
sources += [
"base/network_change_notifier_linux_unittest.cc",
"proxy_resolution/proxy_config_service_linux_unittest.cc",
]
}
if (is_linux || is_chromeos) {
sources += [
"base/address_tracker_linux_unittest.cc",
"base/network_interfaces_linux_unittest.cc",
]
}
if (is_mac) {
sources += [
"cert/internal/trust_store_mac_unittest.cc",
"ssl/client_cert_store_mac_unittest.cc",
"ssl/ssl_platform_key_mac_unittest.cc",
]
}
if (is_apple) {
sources += [
"cert/x509_util_apple_unittest.cc",
"proxy_resolution/proxy_chain_util_apple_unittest.cc",
]
}
if (is_win) {
sources += [
"base/network_change_notifier_win_unittest.cc",
"base/network_interfaces_win_unittest.cc",
"http/http_auth_sspi_win_unittest.cc",
"http/mock_sspi_library_win.cc",
"http/mock_sspi_library_win.h",
"proxy_resolution/win/dhcp_pac_file_adapter_fetcher_win_unittest.cc",
"proxy_resolution/win/dhcp_pac_file_fetcher_win_unittest.cc",
"proxy_resolution/win/proxy_config_service_win_unittest.cc",
"proxy_resolution/win/windows_system_proxy_resolution_service_unittest.cc",
"ssl/client_cert_store_win_unittest.cc",
"ssl/ssl_platform_key_win_unittest.cc",
]
}
configs += [ "//build/config:precompiled_headers" ]
defines = []
deps = [
":cronet_buildflags",
":net",
":preload_decoder",
":quic_test_tools",
":simple_quic_tools",
":spdy_test_tools",
":test_support",
"//base",
"//base:i18n",
"//build:chromeos_buildflags",
"//crypto",
"//crypto:test_support",
"//net/base/registry_controlled_domains",
"//net/base/registry_controlled_domains:lookup_strings_test_sets",
"//net/dns:tests",
"//net/dns/public:tests",
"//net/http:transport_security_state_unittest_data",
"//net/http:transport_security_state_unittest_data_default",
"//net/third_party/quiche:quiche_tests",
"//net/tools/huffman_trie:huffman_trie_generator_sources",
"//testing/gmock",
"//testing/gtest",
"//third_party/abseil-cpp:absl",
"//third_party/anonymous_tokens:anonymous_tokens_tests",
"//third_party/protobuf:protobuf_lite",
"//third_party/zlib",
"//url",
"//url:buildflags",
]
if (!is_cronet_build) {
sources += [
"extras/shared_dictionary/shared_dictionary_isolation_key_unittest.cc",
"extras/sqlite/sqlite_persistent_cookie_store_unittest.cc",
"extras/sqlite/sqlite_persistent_shared_dictionary_store_unittest.cc",
"log/trace_net_log_observer_unittest.cc",
]
deps += [
":extras",
"//components/sqlite_proto",
"//sql",
"//sql:test_support",
]
}
if (enable_websockets) {
deps += [ "//net/server:tests" ]
}
if (is_posix) {
sources += [ "base/sockaddr_util_posix_unittest.cc" ]
}
if (is_android || is_chromeos_ash) {
sources += [ "base/network_change_notifier_passive_unittest.cc" ]
}
if (enable_reporting) {
sources += [
"network_error_logging/mock_persistent_nel_store_unittest.cc",
"network_error_logging/network_error_logging_service_unittest.cc",
"reporting/mock_persistent_reporting_store_unittest.cc",
"reporting/reporting_browsing_data_remover_unittest.cc",
"reporting/reporting_cache_unittest.cc",
"reporting/reporting_delivery_agent_unittest.cc",
"reporting/reporting_endpoint_manager_unittest.cc",
"reporting/reporting_garbage_collector_unittest.cc",
"reporting/reporting_header_parser_unittest.cc",
"reporting/reporting_network_change_observer_unittest.cc",
"reporting/reporting_service_unittest.cc",
"reporting/reporting_uploader_unittest.cc",
]
if (!is_cronet_build) {
sources += [
"extras/sqlite/sqlite_persistent_reporting_and_nel_store_unittest.cc",
]
}
}
data = [
"data/cache_tests/",
"data/cert_issuer_source_aia_unittest/",
"data/cert_issuer_source_static_unittest/",
"data/embedded_test_server/",
"data/file_stream_unittest/",
"data/filter_unittests/",
"data/gencerts/",
"data/pac_file_fetcher_unittest/",
"data/quic_http_response_cache_data/",
"data/quic_http_response_cache_data_with_push/",
"data/spdy_tests/",
"data/test.html",
"data/verify_certificate_chain_unittest/",
]
data_deps = [ "//testing/buildbot/filters:net_unittests_filters" ]
if (is_linux || is_chromeos || is_mac || is_win || is_fuchsia) {
deps += [ "//third_party/pywebsocket3/" ]
data_deps += [ "//third_party/pywebsocket3/" ]
data += [
"tools/testserver/",
"//third_party/pywebsocket3/src/mod_pywebsocket/",
]
}
if (is_linux || is_chromeos) {
sources += [ "tools/quic/quic_simple_server_test.cc" ]
}
if (is_apple) {
sources += [ "base/apple/url_conversions_unittest.mm" ]
}
if (is_mac) {
sources += [ "base/network_change_notifier_apple_unittest.cc" ]
frameworks = [
"Security.framework",
"SystemConfiguration.framework",
]
}
if (!is_win) {
sources += [
"http/http_auth_handler_ntlm_portable_unittest.cc",
"ntlm/ntlm_buffer_reader_unittest.cc",
"ntlm/ntlm_buffer_writer_unittest.cc",
"ntlm/ntlm_client_unittest.cc",
"ntlm/ntlm_test_data.h",
"ntlm/ntlm_unittest.cc",
]
}
if (enable_python_utils) {
sources += [ "test/python_utils_unittest.cc" ]
}
if (is_fuchsia) {
use_test_server = true
deps += [
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces_hlcpp",
"//third_party/fuchsia-sdk/sdk/pkg/fidl_cpp",
]
sources += [
"base/fuchsia/network_interface_cache_unittest.cc",
"base/network_change_notifier_fuchsia_unittest.cc",
]
additional_manifest_fragments =
[ "//build/config/fuchsia/test/network.shard.test-cml" ]
}
if (use_nss_certs) {
sources += [
"cert/internal/system_trust_store_nss_unittest.cc",
"cert/internal/trust_store_nss_unittest.cc",
"cert/nss_cert_database_unittest.cc",
"cert/x509_util_nss_unittest.cc",
]
if (!is_castos) {
sources += [
"ssl/client_cert_store_nss_unittest.cc",
"ssl/ssl_platform_key_nss_unittest.cc",
]
}
configs += [ "//build/config/linux/nss" ]
}
if (use_external_gssapi) {
sources += [
"http/http_auth_gssapi_posix_unittest.cc",
"http/mock_gssapi_library_posix.cc",
"http/mock_gssapi_library_posix.h",
]
data_deps += [
":test_badgssapi",
":test_gssapi",
]
}
if (use_kerberos) {
sources += [ "http/http_auth_handler_negotiate_unittest.cc" ]
}
if (enable_websockets) {
sources += [
"websockets/websocket_basic_handshake_stream_test.cc",
"websockets/websocket_basic_stream_adapters_test.cc",
"websockets/websocket_basic_stream_test.cc",
"websockets/websocket_channel_test.cc",
"websockets/websocket_deflate_parameters_test.cc",
"websockets/websocket_deflate_predictor_impl_test.cc",
"websockets/websocket_deflate_stream_test.cc",
"websockets/websocket_deflater_test.cc",
"websockets/websocket_errors_test.cc",
"websockets/websocket_extension_parser_test.cc",
"websockets/websocket_extension_test.cc",
"websockets/websocket_frame_parser_test.cc",
"websockets/websocket_frame_test.cc",
"websockets/websocket_handshake_challenge_test.cc",
"websockets/websocket_handshake_stream_create_helper_test.cc",
"websockets/websocket_inflater_test.cc",
"websockets/websocket_stream_cookie_test.cc",
"websockets/websocket_stream_create_test_base.cc",
"websockets/websocket_stream_create_test_base.h",
"websockets/websocket_stream_test.cc",
"websockets/websocket_test_util.cc",
"websockets/websocket_test_util.h",
]
if (!is_ios) {
# TODO(crbug.com/40812029): iOS does not have support for the spawned test
# server, which is used by this test. The long term plan is to add
# websocket support to the embedded test server and when that happens,
# this test could be enabled.
sources += [ "websockets/websocket_end_to_end_test.cc" ]
}
}
if (!disable_file_support) {
sources += [
"base/directory_lister_unittest.cc",
"base/directory_listing_unittest.cc",
"test/url_request/url_request_test_job_backed_by_file_unittest.cc",
]
}
if (enable_built_in_dns) {
sources += [ "url_request/http_with_dns_over_https_unittest.cc" ]
}
if (is_ios) {
bundle_deps = [ ":net_test_bundle_data" ]
}
if (enable_unix_sockets) {
sources += [
"socket/unix_domain_client_socket_posix_unittest.cc",
"socket/unix_domain_server_socket_posix_unittest.cc",
]
}
# Use getifaddrs() on POSIX platforms, except Linux.
if (is_posix && !is_linux && !is_chromeos) {
sources += [ "base/network_interfaces_getifaddrs_unittest.cc" ]
}
# Unit tests that aren't supported by the current ICU alternatives on Android.
if (is_android && use_platform_icu_alternatives) {
sources -= [
"base/filename_util_unittest.cc",
"base/url_util_unittest.cc",
"cert/x509_certificate_unittest.cc",
"url_request/url_request_job_unittest.cc",
]
deps += [ "//url:url_java" ]
}
# Unit tests that are not supported by the current ICU alternatives on iOS.
if (is_ios && use_platform_icu_alternatives) {
sources -= [
"base/filename_util_unittest.cc",
"base/url_util_unittest.cc",
"cert/x509_certificate_unittest.cc",
"http/http_auth_handler_basic_unittest.cc",
"http/http_auth_handler_digest_unittest.cc",
"http/http_auth_handler_factory_unittest.cc",
"http/http_auth_unittest.cc",
"http/http_content_disposition_unittest.cc",
"http/http_network_transaction_unittest.cc",
"spdy/spdy_network_transaction_unittest.cc",
"spdy/spdy_proxy_client_socket_unittest.cc",
"url_request/url_request_job_unittest.cc",
"url_request/url_request_unittest.cc",
]
}
if (!disable_brotli_filter) {
sources += [ "filter/brotli_source_stream_unittest.cc" ]
}
if (!disable_zstd_filter) {
sources += [ "filter/zstd_source_stream_unittest.cc" ]
}
if (is_android) {
data_deps += [ "//net/tools/testserver:testserver_py" ]
deps += [
":net_jni_headers",
"//base:base_unittest_support_java",
"//net/android:dummy_spnego_authenticator_java",
"//net/android:dummy_spnego_authenticator_jni",
"//net/android:net_java",
"//net/android:net_java_test_support",
"//net/android:net_test_support_jni",
"//net/android:net_tests_java",
"//net/android:net_tests_jni",
"//net/android:net_unittests_apk_resources",
# TODO(mmenke): This depends on test_support_base, which depends on
# icu. Figure out a way to remove that dependency.
"//testing/android/native_test:native_test_native_code",
]
android_manifest = "//net/android/unittest_support/AndroidManifest.xml"
sources += [
"base/address_tracker_linux_unittest.cc",
"base/network_interfaces_linux_unittest.cc",
]
shard_timeout = 300
if (enable_chrome_android_internal) {
data_deps += [ "//clank/build/bot/filters:net_unittests_filters" ]
}
}
if (is_win) {
libs = [
"iphlpapi.lib",
"ncrypt.lib",
]
}
if (chrome_root_store_supported) {
sources += [ "cert/internal/trust_store_chrome_unittest.cc" ]
deps += [
"//base/version_info",
"//net/data/ssl/chrome_root_store:gen_root_store_test_inc",
]
if (is_win) {
sources += [ "cert/internal/trust_store_win_unittest.cc" ]
sources += [ "cert/internal/path_builder_trust_store_win_unittest.cc" ]
libs += [ "crypt32.lib" ]
}
}
# Include transport_security_state_generator tests.
if (host_toolchain == current_toolchain) {
deps += [
"//net/tools/huffman_trie:huffman_trie_generator_test_sources",
"//net/tools/transport_security_state_generator:transport_security_state_generator_test_sources",
]
}
if (enable_device_bound_sessions) {
sources += [
"device_bound_sessions/cookie_craving_unittest.cc",
"device_bound_sessions/device_bound_session_registration_fetcher_param_unittest.cc",
"device_bound_sessions/test_util.cc",
"device_bound_sessions/test_util.h",
]
}
}
# !is_android && !is_win && !is_mac
if (!is_ios) {
# TODO(crbug.com/40460932): this should be converted to "app" template and
# enabled on iOS too.
test("net_perftests") {
sources = [
"base/mime_sniffer_perftest.cc",
"cookies/cookie_monster_perftest.cc",
"disk_cache/disk_cache_perftest.cc",
"extras/sqlite/sqlite_persistent_cookie_store_perftest.cc",
"socket/udp_socket_perftest.cc",
"spdy/spdy_http_utils_perftest.cc",
"url_request/url_request_quic_perftest.cc",
]
deps = [
":extras",
":net",
":quic_test_tools",
":simple_quic_tools",
":test_support",
"//base",
"//base:i18n",
"//base/test:test_support_perf",
"//testing/gtest",
"//testing/perf",
"//third_party/google_benchmark:google_benchmark",
"//url",
]
data_deps = [
# Needed for isolate script to execute.
"//testing:run_perf_test",
]
if (enable_websockets) {
sources += [ "websockets/websocket_frame_perftest.cc" ]
}
if (is_win) {
deps += [ "//build/win:default_exe_manifest" ]
}
}
}
# Fuzzers
# This has a global (InitGlobals) that must always be linked in, so
# must be a source set instead of a static library.
if (use_fuzzing_engine) {
# fuzzer_test targets are no-op when |use_fuzzing_engine| is false. Fuzzer
# support targets should be disabled too.
source_set("net_fuzzer_test_support") {
testonly = true
sources = [
"base/fuzzer_test_support.cc",
"filter/fuzzed_source_stream.cc",
"filter/fuzzed_source_stream.h",
"socket/fuzzed_datagram_client_socket.cc",
"socket/fuzzed_datagram_client_socket.h",
"socket/fuzzed_server_socket.cc",
"socket/fuzzed_server_socket.h",
"socket/fuzzed_socket.cc",
"socket/fuzzed_socket.h",
"socket/fuzzed_socket_factory.cc",
"socket/fuzzed_socket_factory.h",
]
public_deps = [
"//base/test:test_support",
"//net/dns:fuzzer_test_support",
]
deps = [
"//base",
"//base:i18n",
"//net",
]
data = [
"data/fuzzer_data",
"data/fuzzer_dictionaries",
]
allow_circular_includes_from = [ "//net/dns:fuzzer_test_support" ]
}
}
fuzzer_test("host_port_pair_fuzzer") {
sources = [ "base/host_port_pair_fuzzer.cc" ]
deps = [ "//net" ]
}
proto_library("disk_cache_lpm_fuzzer_proto") {
sources = [ "disk_cache/disk_cache_fuzzer.proto" ]
}
fuzzer_test("disk_cache_lpm_fuzzer") {
sources = [ "disk_cache/disk_cache_fuzzer.cc" ]
deps = [
":disk_cache_lpm_fuzzer_proto",
":test_support",
"//base",
"//net",
"//third_party/libprotobuf-mutator",
]
}
proto_library("backoff_entry_serializer_fuzzer_input") {
proto_in_dir = "//"
sources = [ "base/backoff_entry_serializer_fuzzer_input.proto" ]
link_deps = [ "//testing/libfuzzer/proto:json_proto" ]
}
fuzzer_test("net_backoff_entry_serializer_fuzzer") {
sources = [ "base/backoff_entry_serializer_fuzzer.cc" ]
deps = [
":backoff_entry_serializer_fuzzer_input",
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
"//testing/libfuzzer/proto:json_proto",
"//testing/libfuzzer/proto:json_proto_converter",
"//third_party/libprotobuf-mutator",
]
}
fuzzer_test("net_data_url_fuzzer") {
sources = [ "base/data_url_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
dict = "data/fuzzer_dictionaries/net_data_url_fuzzer.dict"
# IsTokenChar() and ToLowerASCII() are surprisingly slow in instrumented builds.
libfuzzer_options = [ "max_len=100000" ]
}
fuzzer_test("net_mime_sniffer_fuzzer") {
sources = [ "base/mime_sniffer_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//base",
"//net",
]
dict = "data/fuzzer_dictionaries/net_mime_sniffer_fuzzer.dict"
}
fuzzer_test("net_parse_proxy_list_pac_fuzzer") {
sources = [ "proxy_resolution/parse_proxy_list_pac_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//net",
]
}
fuzzer_test("net_parse_proxy_list_fuzzer") {
sources = [ "proxy_resolution/parse_proxy_list_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//net",
]
}
fuzzer_test("net_parse_proxy_bypass_rules_fuzzer") {
sources = [ "proxy_resolution/parse_proxy_bypass_rules_fuzzer.cc" ]
libfuzzer_options = [
# The proxy bypass rules aren't very complicated, so this is more than
# enough to explore the grammar. Allowing the length to become too large
# can result in test timeouts (https://crbug.com/813619).
"max_len=512",
]
deps = [
":net_fuzzer_test_support",
"//net",
]
}
fuzzer_test("net_parse_proxy_rules_fuzzer") {
sources = [ "proxy_resolution/parse_proxy_rules_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//net",
]
dict = "data/fuzzer_dictionaries/net_parse_proxy_bypass_rules_fuzzer.dict"
}
fuzzer_test("net_get_domain_and_registry_fuzzer") {
sources =
[ "base/registry_controlled_domains/get_domain_and_registry_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//base",
"//net",
]
dict = "data/fuzzer_dictionaries/net_get_domain_and_registry_fuzzer.dict"
}
fuzzer_test("net_lookup_string_in_fixed_set_fuzzer") {
sources = [ "base/lookup_string_in_fixed_set_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//base",
"//net",
"//net/base/registry_controlled_domains:lookup_strings_test_sets",
]
dict = "data/fuzzer_dictionaries/net_get_domain_and_registry_fuzzer.dict"
}
fuzzer_test("net_base_schemeful_site_fuzzer") {
sources = [ "base/schemeful_site_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//base",
"//net",
"//testing/libfuzzer/proto:url_proto",
"//testing/libfuzzer/proto:url_proto_converter",
"//third_party/libprotobuf-mutator",
]
}
fuzzer_test("net_cert_ct_decode_signed_certificate_timestamp_fuzzer") {
sources = [ "cert/decode_signed_certificate_timestamp_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//base",
"//net",
]
}
fuzzer_test("net_canonical_cookie_fuzzer") {
sources = [ "cookies/canonical_cookie_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//net",
]
dict = "data/fuzzer_dictionaries/net_cookies_fuzzer.dict"
seed_corpus = "data/fuzzer_data/cookies/"
}
fuzzer_test("net_cookie_partition_key_fuzzer") {
sources = [ "cookies/cookie_partition_key_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//net",
]
}
fuzzer_test("net_cookie_util_parsing_fuzzer") {
sources = [ "cookies/cookie_util_parsing_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//net",
]
dict = "data/fuzzer_dictionaries/net_cookies_fuzzer.dict"
libfuzzer_options = [ "max_len=8192" ]
seed_corpus = "data/fuzzer_data/cookies/"
}
fuzzer_test("net_parse_cookie_line_fuzzer") {
sources = [ "cookies/parse_cookie_line_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//net",
]
dict = "data/fuzzer_dictionaries/net_cookies_fuzzer.dict"
seed_corpus = "data/fuzzer_data/cookies/"
}
fuzzer_test("net_http_stream_parser_fuzzer") {
sources = [ "http/http_stream_parser_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
dict = "data/fuzzer_dictionaries/net_http_stream_parser_fuzzer.dict"
}
fuzzer_test("canonicalize_host_fuzzer") {
sources = [ "base/canonicalize_host_fuzzer.cc" ]
deps = [
"//net",
"//third_party/icu/fuzzers:fuzzer_support",
]
dict = "base/canonicalize_host_fuzzer.dict"
}
if (!is_win) {
fuzzer_test("net_ntlm_ntlm_client_fuzzer") {
sources = [
"ntlm/ntlm_client_fuzzer.cc",
"ntlm/ntlm_test_data.h",
]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
dict = "data/fuzzer_dictionaries/net_ntlm_ntlm_client_fuzzer.dict"
seed_corpus = "data/fuzzer_data/ntlm_client_fuzzer/"
}
}
if (!disable_brotli_filter) {
fuzzer_test("net_brotli_source_stream_fuzzer") {
sources = [ "filter/brotli_source_stream_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
}
}
if (!disable_zstd_filter) {
fuzzer_test("net_zstd_source_stream_fuzzer") {
sources = [ "filter/zstd_source_stream_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
}
}
fuzzer_test("net_gzip_source_stream_fuzzer") {
sources = [ "filter/gzip_source_stream_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
}
fuzzer_test("net_crl_set_fuzzer") {
sources = [ "cert/crl_set_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
seed_corpus = "data/fuzzer_data/net_crl_set_fuzzer/"
}
fuzzer_test("net_spdy_headers_to_http_response_headers_fuzzer") {
sources = [ "spdy/spdy_headers_to_http_response_headers_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//base",
"//net",
]
dict = "data/fuzzer_dictionaries/net_http_stream_parser_fuzzer.dict"
libfuzzer_options = [ "max_len = 512" ]
}
fuzzer_test("net_unescape_url_component_fuzzer") {
sources = [ "base/unescape_url_component_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//base",
"//net",
]
dict = "data/fuzzer_dictionaries/unescape_url_component_fuzzer.dict"
libfuzzer_options = [ "max_len = 2048" ]
}
fuzzer_test("net_websocket_deflate_stream_fuzzer") {
sources = [ "websockets/websocket_deflate_stream_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//net",
]
dict = "data/fuzzer_dictionaries/net_websocket_frame_parser_fuzzer.dict"
libfuzzer_options = [ "max_len=512" ]
}
fuzzer_test("net_websocket_extension_parser_fuzzer") {
sources = [ "websockets/websocket_extension_parser_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//net",
]
dict = "data/fuzzer_dictionaries/net_websocket_extension_parser_fuzzer.dict"
libfuzzer_options = [ "max_len = 256" ]
}
fuzzer_test("net_websocket_frame_parser_fuzzer") {
sources = [ "websockets/websocket_frame_parser_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//net",
]
dict = "data/fuzzer_dictionaries/net_websocket_frame_parser_fuzzer.dict"
libfuzzer_options = [ "max_len=256" ]
}
if (use_fuzzing_engine) {
# This is a separate target because //net/server:http_server
# wants to limit its visibility to a select number of target, but the
# "fuzzer_test" template expands on iOS to many targets that need to
# have the "deps" information propagated in order to support "fat"
# binaries.
source_set("net_web_socket_encoder_fuzzer_deps") {
testonly = true
visibility = [
":net_web_socket_encoder_fuzzer",
":net_web_socket_encoder_fuzzer_executable",
":run_net_web_socket_encoder_fuzzer",
]
public_deps = [
":net_fuzzer_test_support",
"//net",
"//net/server:http_server",
]
}
fuzzer_test("net_web_socket_encoder_fuzzer") {
sources = [ "server/web_socket_encoder_fuzzer.cc" ]
deps = [ ":net_web_socket_encoder_fuzzer_deps" ]
libfuzzer_options = [ "max_len=256" ]
}
}
fuzzer_test("net_http_chunked_decoder_fuzzer") {
sources = [ "http/http_chunked_decoder_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//net",
]
dict = "data/fuzzer_dictionaries/http_chunked_decoder_fuzzer.dict"
}
fuzzer_test("net_http_auth_handler_basic_fuzzer") {
sources = [ "http/http_auth_handler_basic_fuzzer.cc" ]
dict = "data/fuzzer_dictionaries/net_http_auth_handler_basic_fuzzer.dict"
deps = [
":net_fuzzer_test_support",
":test_support",
"//net",
]
}
fuzzer_test("net_http_auth_handler_digest_fuzzer") {
sources = [ "http/http_auth_handler_digest_fuzzer.cc" ]
dict = "data/fuzzer_dictionaries/net_http_auth_handler_digest_fuzzer.dict"
deps = [
":net_fuzzer_test_support",
":test_support",
"//net",
]
}
fuzzer_test("net_http_auth_handler_fuzzer") {
sources = [ "http/http_auth_handler_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
}
fuzzer_test("net_http_content_disposition_fuzzer") {
sources = [ "http/http_content_disposition_fuzzer.cc" ]
dict = "data/fuzzer_dictionaries/net_http_content_disposition_fuzzer.dict"
deps = [
":net_fuzzer_test_support",
"//net",
]
}
fuzzer_test("net_http_proxy_client_socket_fuzzer") {
sources = [ "http/http_proxy_client_socket_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
dict = "data/fuzzer_dictionaries/net_http_proxy_client_socket_fuzzer.dict"
}
fuzzer_test("net_structured_headers_fuzzer") {
sources = [ "http/structured_headers_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
seed_corpus = "data/fuzzer_data/structured_headers_corpus"
}
fuzzer_test("net_parse_url_hostname_to_address_fuzzer") {
sources = [ "base/parse_url_hostname_to_address_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//base",
"//net",
]
libfuzzer_options = [ "max_len=512" ]
seed_corpus = "data/fuzzer_data/hostnames/"
}
fuzzer_test("net_quic_crypto_framer_parse_message_fuzzer") {
sources = [ "quic/quic_crypto_framer_parse_message_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//base",
"//net",
]
}
fuzzer_test("net_quic_transport_parameters_fuzzer") {
sources = [ "quic/quic_transport_parameters_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//base",
"//net",
]
}
fuzzer_test("net_socks_client_socket_fuzzer") {
sources = [ "socket/socks_client_socket_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
}
fuzzer_test("net_socks5_client_socket_fuzzer") {
sources = [ "socket/socks5_client_socket_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
}
fuzzer_test("net_url_request_fuzzer") {
sources = [ "url_request/url_request_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
dict = "data/fuzzer_dictionaries/net_url_request_fuzzer.dict"
}
fuzzer_test("net_auth_challenge_tokenizer_fuzzer") {
sources = [ "http/http_auth_challenge_tokenizer_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
}
fuzzer_test("net_http_security_headers_hsts_fuzzer") {
sources = [ "http/http_security_headers_hsts_fuzzer.cc" ]
deps = [
"//base",
"//net",
]
dict = "data/fuzzer_dictionaries/net_http_security_headers_fuzzer.dict"
seed_corpus = "data/fuzzer_data/http_security_headers/"
}
fuzzer_test("net_http_transport_security_state_static_fuzzer") {
sources = [ "http/transport_security_state_static_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//net",
]
dict =
"data/fuzzer_dictionaries/net_http_transport_security_state_fuzzer.dict"
}
fuzzer_test("net_spdy_session_fuzzer") {
sources = [ "spdy/spdy_session_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
"//net/data/ssl/certificates:generate_fuzzer_cert_includes",
]
dict = "data/fuzzer_dictionaries/net_spdy_session_fuzzer.dict"
seed_corpus = "data/fuzzer_data/net_spdy_session_fuzzer/"
}
fuzzer_test("net_http2_frame_decoder_fuzzer") {
sources = [ "spdy/fuzzing/http2_frame_decoder_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
}
fuzzer_test("net_hpack_decoder_fuzzer") {
sources = [ "spdy/fuzzing/hpack_decoder_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
}
proto_library("reporting_policy_proto") {
proto_in_dir = "//"
sources = [ "reporting/reporting_policy.proto" ]
link_deps = [ "//testing/libfuzzer/proto:json_proto" ]
}
fuzzer_test("net_reporting_header_parser_fuzzer") {
sources = [ "reporting/reporting_header_parser_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":reporting_policy_proto",
":test_support",
"//base",
"//net",
"//testing/libfuzzer/proto:json_proto",
"//testing/libfuzzer/proto:json_proto_converter",
"//third_party/libprotobuf-mutator",
]
}
fuzzer_test("net_quic_session_pool_fuzzer") {
sources = [ "quic/quic_session_pool_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":quic_test_tools",
":test_support",
"//net",
"//net/data/ssl/certificates:generate_fuzzer_cert_includes",
]
}
fuzzer_test("net_uri_template_fuzzer") {
sources = [ "third_party/uri_template/uri_template_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
"//base",
"//net",
]
dict = "data/fuzzer_dictionaries/net_uri_template_fuzzer.dict"
}
if (is_linux || is_chromeos) {
fuzzer_test("net_base_address_tracker_linux_fuzzer") {
sources = [ "base/address_tracker_linux_fuzzer.cc" ]
deps = [
":net_fuzzer_test_support",
":test_support",
"//base",
"//net",
]
}
}