1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/crypto.gni")
6 import("//build/config/features.gni")
7 import("//build/config/ui.gni")
8 import("//url/config.gni")
10 # TODO(cjhopman): //build/config/android/rules.gni also imports grit_rule.gni.
11 # Currently, that file can't be imported multiple times. Make this always
12 # imported when http://crbug.com/393704 is fixed.
14 import("//tools/grit/grit_rule.gni")
18 import("//build/config/android/config.gni")
19 import("//build/config/android/rules.gni")
21 import("//build/config/mac/mac_sdk.gni")
24 # The list of net files is kept in net.gypi. Read it.
25 gypi_values = exec_script(
26 "//build/gypi_to_gn.py",
27 [ rebase_path("net.gypi") ],
31 # Disable Kerberos on ChromeOS, Android and iOS, at least for now. It needs
32 # configuration (krb5.conf and so on).
33 use_kerberos = !is_chromeos && !is_android && !is_ios
35 # The way the cache uses mmap() is inefficient on some Android devices. If
36 # this flag is set, we hackily avoid using mmap() in the disk cache. We are
37 # pretty confident that mmap-ing the index would not hurt any existing x86
38 # android devices, but we cannot be so sure about the variety of ARM devices.
39 # So enable it for x86 only for now.
40 posix_avoid_mmap = is_android && cpu_arch != "x86"
42 # WebSockets and socket stream code are used everywhere except iOS.
43 enable_websockets = !is_ios
44 use_v8_in_net = !is_ios
45 enable_built_in_dns = !is_ios
46 disable_ftp_support = is_ios
49 # Disables support for file URLs. File URL support requires use of icu.
50 disable_file_support = false
53 config("net_config") {
55 if (posix_avoid_mmap) {
56 defines += [ "POSIX_AVOID_MMAP" ]
58 if (disable_file_support) {
59 defines += [ "DISABLE_FILE_SUPPORT" ]
63 # Disables Windows warning about size to int truncations.
64 # TODO(jschuh): crbug.com/167187 fix this and delete this config.
65 config("net_win_size_truncation") {
67 cflags = [ "/wd4267" ]
73 gypi_values.net_nacl_common_sources +
74 gypi_values.net_non_nacl_sources
78 # TODO(GYP) Note that he GYP file supports linux_link_kerberos (defaults to
79 # 0) which implies that we run pkg_config on kerberos and link to that
80 # rather than setting this define which will dynamically open it. That
81 # doesn't seem to be set in the regular builds, so we're skipping this
86 configs += [ ":net_win_size_truncation" ]
87 direct_dependent_configs = [ ":net_config" ]
95 "//base/third_party/dynamic_annotations",
98 "//net/base/registry_controlled_domains",
101 "//third_party/zlib",
104 forward_dependent_configs_from = [
110 defines += [ "USE_KERBEROS" ]
112 include_dirs += [ "/usr/include/kerberosV" ]
116 "http/http_auth_gssapi_posix.cc",
117 "http/http_auth_gssapi_posix.h",
118 "http/http_auth_handler_negotiate.h",
119 "http/http_auth_handler_negotiate.cc",
124 if (posix_avoid_mmap) {
125 sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
127 sources -= [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
131 if (disable_file_support) {
133 "base/directory_lister.cc",
134 "base/directory_lister.h",
135 "url_request/url_request_file_dir_job.cc",
136 "url_request/url_request_file_dir_job.h",
137 "url_request/url_request_file_job.cc",
138 "url_request/url_request_file_job.h",
139 "url_request/file_protocol_handler.cc",
140 "url_request/file_protocol_handler.h",
144 if (disable_ftp_support) {
146 "ftp/ftp_auth_cache.cc",
147 "ftp/ftp_auth_cache.h",
148 "ftp/ftp_ctrl_response_buffer.cc",
149 "ftp/ftp_ctrl_response_buffer.h",
150 "ftp/ftp_directory_listing_parser.cc",
151 "ftp/ftp_directory_listing_parser.h",
152 "ftp/ftp_directory_listing_parser_ls.cc",
153 "ftp/ftp_directory_listing_parser_ls.h",
154 "ftp/ftp_directory_listing_parser_netware.cc",
155 "ftp/ftp_directory_listing_parser_netware.h",
156 "ftp/ftp_directory_listing_parser_os2.cc",
157 "ftp/ftp_directory_listing_parser_os2.h",
158 "ftp/ftp_directory_listing_parser_vms.cc",
159 "ftp/ftp_directory_listing_parser_vms.h",
160 "ftp/ftp_directory_listing_parser_windows.cc",
161 "ftp/ftp_directory_listing_parser_windows.h",
162 "ftp/ftp_network_layer.cc",
163 "ftp/ftp_network_layer.h",
164 "ftp/ftp_network_session.cc",
165 "ftp/ftp_network_session.h",
166 "ftp/ftp_network_transaction.cc",
167 "ftp/ftp_network_transaction.h",
168 "ftp/ftp_request_info.h",
169 "ftp/ftp_response_info.cc",
170 "ftp/ftp_response_info.h",
171 "ftp/ftp_server_type_histograms.cc",
172 "ftp/ftp_server_type_histograms.h",
173 "ftp/ftp_transaction.h",
174 "ftp/ftp_transaction_factory.h",
177 "url_request/ftp_protocol_handler.cc",
178 "url_request/ftp_protocol_handler.h",
179 "url_request/url_request_ftp_job.cc",
180 "url_request/url_request_ftp_job.h",
184 if (enable_built_in_dns) {
185 defines += [ "ENABLE_BUILT_IN_DNS" ]
188 "dns/address_sorter_posix.cc",
189 "dns/address_sorter_posix.h",
198 "cert/ct_log_verifier_nss.cc",
199 "cert/ct_objects_extractor_nss.cc",
200 "cert/jwk_serializer_nss.cc",
201 "cert/scoped_nss_types.h",
202 "cert/x509_util_nss.cc",
203 "cert/x509_util_nss.h",
204 "quic/crypto/aead_base_decrypter_nss.cc",
205 "quic/crypto/aead_base_encrypter_nss.cc",
206 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc",
207 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc",
208 "quic/crypto/chacha20_poly1305_decrypter_nss.cc",
209 "quic/crypto/chacha20_poly1305_encrypter_nss.cc",
210 "quic/crypto/channel_id_nss.cc",
211 "quic/crypto/p256_key_exchange_nss.cc",
212 "socket/nss_ssl_util.cc",
213 "socket/nss_ssl_util.h",
214 "socket/ssl_client_socket_nss.cc",
215 "socket/ssl_client_socket_nss.h",
216 "socket/ssl_server_socket_nss.cc",
217 "socket/ssl_server_socket_nss.h",
221 "cert/nss_cert_database_chromeos.cc",
222 "cert/nss_cert_database_chromeos.h",
223 "cert/nss_profile_filter_chromeos.cc",
224 "cert/nss_profile_filter_chromeos.h",
228 # These are always removed for non-Linux cases below.
230 "base/crypto_module_nss.cc",
231 "base/keygen_handler_nss.cc",
232 "cert/cert_database_nss.cc",
233 "cert/nss_cert_database.cc",
234 "cert/nss_cert_database.h",
235 "cert/x509_certificate_nss.cc",
236 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
237 "third_party/mozilla_security_manager/nsKeygenHandler.h",
238 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
239 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
240 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
241 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
245 # Always removed for !ios below.
247 "cert/cert_verify_proc_nss.cc",
248 "cert/cert_verify_proc_nss.h",
249 "cert/test_root_certs_nss.cc",
256 "base/crypto_module_openssl.cc",
257 "base/keygen_handler_openssl.cc",
258 "cert/ct_log_verifier_openssl.cc",
259 "cert/ct_objects_extractor_openssl.cc",
260 "cert/jwk_serializer_openssl.cc",
261 "cert/x509_util_openssl.cc",
262 "cert/x509_util_openssl.h",
263 "quic/crypto/aead_base_decrypter_openssl.cc",
264 "quic/crypto/aead_base_encrypter_openssl.cc",
265 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc",
266 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc",
267 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc",
268 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc",
269 "quic/crypto/channel_id_openssl.cc",
270 "quic/crypto/p256_key_exchange_openssl.cc",
271 "quic/crypto/scoped_evp_aead_ctx.cc",
272 "quic/crypto/scoped_evp_aead_ctx.h",
273 "socket/ssl_client_socket_openssl.cc",
274 "socket/ssl_client_socket_openssl.h",
275 "socket/ssl_server_socket_openssl.cc",
276 "socket/ssl_server_socket_openssl.h",
277 "socket/ssl_session_cache_openssl.cc",
278 "socket/ssl_session_cache_openssl.h",
279 "ssl/openssl_platform_key.h",
280 "ssl/openssl_ssl_util.cc",
281 "ssl/openssl_ssl_util.h",
285 "ssl/openssl_platform_key_mac.cc",
290 "ssl/openssl_platform_key_win.cc",
295 if (!use_openssl_certs) {
297 "base/openssl_private_key_store.h",
298 "base/openssl_private_key_store_memory.cc",
299 "cert/cert_database_openssl.cc",
300 "cert/cert_verify_proc_openssl.cc",
301 "cert/cert_verify_proc_openssl.h",
302 "cert/test_root_certs_openssl.cc",
303 "cert/x509_certificate_openssl.cc",
304 "ssl/openssl_client_key_store.cc",
305 "ssl/openssl_client_key_store.h",
309 "base/openssl_private_key_store_android.cc",
312 } else if (is_android) {
313 # Android doesn't use these even when using OpenSSL.
315 "base/openssl_private_key_store_memory.cc",
316 "cert/cert_database_openssl.cc",
317 "cert/cert_verify_proc_openssl.cc",
318 "cert/test_root_certs_openssl.cc",
323 configs += [ "//build/config/linux:gconf" ]
324 deps += [ "//build/config/linux:gio" ]
328 configs += [ "//build/config/linux:libresolv" ]
331 "base/crypto_module_nss.cc",
332 "base/keygen_handler_nss.cc",
333 "cert/cert_database_nss.cc",
334 "cert/nss_cert_database.cc",
335 "cert/nss_cert_database.h",
336 "cert/x509_certificate_nss.cc",
337 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
338 "third_party/mozilla_security_manager/nsKeygenHandler.h",
339 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
340 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
341 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
342 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
346 # These files are part of the partial implementation of NSS on iOS so
347 # keep them in that case.
349 "cert/test_root_certs_nss.cc",
356 if (!use_nss_certs) {
358 "ssl/client_cert_store_nss.cc",
359 "ssl/client_cert_store_nss.h",
362 # These files are part of the partial implementation of NSS on iOS so
363 # keep them in that case (even though use_nss_certs is not set).
365 "cert/cert_verify_proc_nss.cc",
366 "cert/cert_verify_proc_nss.h",
370 # These were already removed on non-ChromeOS.
372 "ssl/client_cert_store_chromeos.cc",
373 "ssl/client_cert_store_chromeos.h",
378 if (!enable_websockets) {
380 "socket_stream/socket_stream.cc",
381 "socket_stream/socket_stream.h",
382 "socket_stream/socket_stream_job.cc",
383 "socket_stream/socket_stream_job.h",
384 "socket_stream/socket_stream_job_manager.cc",
385 "socket_stream/socket_stream_job_manager.h",
386 "socket_stream/socket_stream_metrics.cc",
387 "socket_stream/socket_stream_metrics.h",
388 "spdy/spdy_websocket_stream.cc",
389 "spdy/spdy_websocket_stream.h",
390 "websockets/websocket_basic_handshake_stream.cc",
391 "websockets/websocket_basic_handshake_stream.h",
392 "websockets/websocket_basic_stream.cc",
393 "websockets/websocket_basic_stream.h",
394 "websockets/websocket_channel.cc",
395 "websockets/websocket_channel.h",
396 "websockets/websocket_deflate_predictor.h",
397 "websockets/websocket_deflate_predictor_impl.cc",
398 "websockets/websocket_deflate_predictor_impl.h",
399 "websockets/websocket_deflate_stream.cc",
400 "websockets/websocket_deflate_stream.h",
401 "websockets/websocket_deflater.cc",
402 "websockets/websocket_deflater.h",
403 "websockets/websocket_errors.cc",
404 "websockets/websocket_errors.h",
405 "websockets/websocket_extension.cc",
406 "websockets/websocket_extension.h",
407 "websockets/websocket_extension_parser.cc",
408 "websockets/websocket_extension_parser.h",
409 "websockets/websocket_frame.cc",
410 "websockets/websocket_frame.h",
411 "websockets/websocket_frame_parser.cc",
412 "websockets/websocket_frame_parser.h",
413 "websockets/websocket_handshake_constants.cc",
414 "websockets/websocket_handshake_constants.h",
415 "websockets/websocket_handshake_handler.cc",
416 "websockets/websocket_handshake_handler.h",
417 "websockets/websocket_handshake_request_info.cc",
418 "websockets/websocket_handshake_request_info.h",
419 "websockets/websocket_handshake_response_info.cc",
420 "websockets/websocket_handshake_response_info.h",
421 "websockets/websocket_handshake_stream_base.h",
422 "websockets/websocket_handshake_stream_create_helper.cc",
423 "websockets/websocket_handshake_stream_create_helper.h",
424 "websockets/websocket_inflater.cc",
425 "websockets/websocket_inflater.h",
426 "websockets/websocket_job.cc",
427 "websockets/websocket_job.h",
428 "websockets/websocket_mux.h",
429 "websockets/websocket_net_log_params.cc",
430 "websockets/websocket_net_log_params.h",
431 "websockets/websocket_stream.cc",
432 "websockets/websocket_stream.h",
433 "websockets/websocket_throttle.cc",
434 "websockets/websocket_throttle.h",
442 "dns/mdns_client.cc",
444 "dns/mdns_client_impl.cc",
445 "dns/mdns_client_impl.h",
446 "dns/record_parsed.cc",
447 "dns/record_parsed.h",
448 "dns/record_rdata.cc",
449 "dns/record_rdata.h",
455 "http/http_auth_handler_ntlm_portable.cc",
456 "socket/socket_libevent.cc",
457 "socket/socket_libevent.h",
458 "socket/tcp_socket_libevent.cc",
459 "socket/tcp_socket_libevent.h",
460 "udp/udp_socket_libevent.cc",
461 "udp/udp_socket_libevent.h",
464 "//third_party/nss:nspr",
469 "base/winsock_init.cc",
470 "base/winsock_init.h",
471 "base/winsock_util.cc",
472 "base/winsock_util.h",
473 "proxy/proxy_resolver_winhttp.cc",
474 "proxy/proxy_resolver_winhttp.h",
480 "//third_party/nss:nspr",
484 "Foundation.framework",
485 "Security.framework",
486 "SystemConfiguration.framework",
492 # Add back some sources that were otherwise filtered out. iOS additionally
493 # doesn't set USE_NSS but needs some of the files.
494 set_sources_assignment_filter([])
496 "base/network_change_notifier_mac.cc",
497 "base/network_config_watcher_mac.cc",
498 "base/platform_mime_util_mac.mm",
499 "cert/cert_verify_proc_nss.cc",
500 "cert/cert_verify_proc_nss.h",
501 "cert/test_root_certs_nss.cc",
502 "cert/x509_util_nss.cc",
503 "cert/x509_util_nss.h",
504 "proxy/proxy_resolver_mac.cc",
505 "proxy/proxy_server_mac.cc",
509 set_sources_assignment_filter(sources_assignment_filter)
511 sources -= [ "disk_cache/blockfile/file_posix.cc" ]
516 "CFNetwork.framework",
517 "MobileCoreServices.framework",
518 "Security.framework",
519 "SystemConfiguration.framework",
525 # Add some Linux sources that were excluded by the filter, but which
527 set_sources_assignment_filter([])
529 "base/platform_mime_util_linux.cc",
530 "base/address_tracker_linux.cc",
531 "base/address_tracker_linux.h",
533 set_sources_assignment_filter(sources_assignment_filter)
535 if (!is_android_webview_build) {
536 deps += [ ":net_jni_headers" ]
540 if (use_icu_alternatives_on_android) {
546 "base/filename_util_icu.cc",
547 "base/net_string_util_icu.cc",
548 "base/net_util_icu.cc",
551 "base/net_string_util_icu_alternatives_android.cc",
552 "base/net_string_util_icu_alternatives_android.h",
557 grit("net_resources") {
558 source = "base/net_resources.grd"
559 use_qualified_include = true
561 "grit/net_resources.h",
567 static_library("http_server") {
569 "server/http_connection.cc",
570 "server/http_connection.h",
571 "server/http_server.cc",
572 "server/http_server.h",
573 "server/http_server_request_info.cc",
574 "server/http_server_request_info.h",
575 "server/http_server_response_info.cc",
576 "server/http_server_response_info.h",
577 "server/web_socket.cc",
578 "server/web_socket.h",
580 configs += [ "//build/config/compiler:wexit_time_destructors" ]
587 executable("dump_cache") {
589 "tools/dump_cache/cache_dumper.cc",
590 "tools/dump_cache/cache_dumper.h",
591 "tools/dump_cache/dump_cache.cc",
592 "tools/dump_cache/dump_files.cc",
593 "tools/dump_cache/dump_files.h",
594 "tools/dump_cache/simple_cache_dumper.cc",
595 "tools/dump_cache/simple_cache_dumper.h",
596 "tools/dump_cache/upgrade_win.cc",
597 "tools/dump_cache/upgrade_win.h",
598 "tools/dump_cache/url_to_filename_encoder.cc",
599 "tools/dump_cache/url_to_filename_encoder.h",
600 "tools/dump_cache/url_utilities.h",
601 "tools/dump_cache/url_utilities.cc",
604 configs += [ ":net_win_size_truncation" ]
613 source_set("test_support") {
615 "base/capturing_net_log.cc",
616 "base/capturing_net_log.h",
617 "base/load_timing_info_test_util.cc",
618 "base/load_timing_info_test_util.h",
619 "base/mock_file_stream.cc",
620 "base/mock_file_stream.h",
621 "base/test_completion_callback.cc",
622 "base/test_completion_callback.h",
623 "base/test_data_directory.cc",
624 "base/test_data_directory.h",
625 "cert/mock_cert_verifier.cc",
626 "cert/mock_cert_verifier.h",
627 "cookies/cookie_monster_store_test.cc",
628 "cookies/cookie_monster_store_test.h",
629 "cookies/cookie_store_test_callbacks.cc",
630 "cookies/cookie_store_test_callbacks.h",
631 "cookies/cookie_store_test_helpers.cc",
632 "cookies/cookie_store_test_helpers.h",
633 "disk_cache/disk_cache_test_base.cc",
634 "disk_cache/disk_cache_test_base.h",
635 "disk_cache/disk_cache_test_util.cc",
636 "disk_cache/disk_cache_test_util.h",
637 "dns/dns_test_util.cc",
638 "dns/dns_test_util.h",
639 "dns/mock_host_resolver.cc",
640 "dns/mock_host_resolver.h",
641 "dns/mock_mdns_socket_factory.cc",
642 "dns/mock_mdns_socket_factory.h",
643 "http/http_transaction_test_util.cc",
644 "http/http_transaction_test_util.h",
645 "proxy/mock_proxy_resolver.cc",
646 "proxy/mock_proxy_resolver.h",
647 "proxy/mock_proxy_script_fetcher.cc",
648 "proxy/mock_proxy_script_fetcher.h",
649 "proxy/proxy_config_service_common_unittest.cc",
650 "proxy/proxy_config_service_common_unittest.h",
651 "socket/socket_test_util.cc",
652 "socket/socket_test_util.h",
653 "test/cert_test_util.cc",
654 "test/cert_test_util.h",
655 "test/cert_test_util_nss.cc",
656 "test/ct_test_util.cc",
657 "test/ct_test_util.h",
658 "test/embedded_test_server/embedded_test_server.cc",
659 "test/embedded_test_server/embedded_test_server.h",
660 "test/embedded_test_server/http_connection.cc",
661 "test/embedded_test_server/http_connection.h",
662 "test/embedded_test_server/http_request.cc",
663 "test/embedded_test_server/http_request.h",
664 "test/embedded_test_server/http_response.cc",
665 "test/embedded_test_server/http_response.h",
666 "test/net_test_suite.cc",
667 "test/net_test_suite.h",
668 "test/python_utils.cc",
669 "test/python_utils.h",
670 "test/spawned_test_server/base_test_server.cc",
671 "test/spawned_test_server/base_test_server.h",
672 "test/spawned_test_server/local_test_server_posix.cc",
673 "test/spawned_test_server/local_test_server_win.cc",
674 "test/spawned_test_server/local_test_server.cc",
675 "test/spawned_test_server/local_test_server.h",
676 "test/spawned_test_server/remote_test_server.cc",
677 "test/spawned_test_server/remote_test_server.h",
678 "test/spawned_test_server/spawned_test_server.h",
679 "test/spawned_test_server/spawner_communicator.cc",
680 "test/spawned_test_server/spawner_communicator.h",
681 "url_request/test_url_fetcher_factory.cc",
682 "url_request/test_url_fetcher_factory.h",
683 "url_request/url_request_test_util.cc",
684 "url_request/url_request_test_util.h",
687 configs += [ ":net_win_size_truncation" ]
691 "//base/test:test_support",
694 "//net/tools/tld_cleanup",
701 deps += [ "//third_party/nss" ]
706 "test/spawned_test_server/remote_test_server.cc",
707 "test/spawned_test_server/remote_test_server.h",
708 "test/spawned_test_server/spawner_communicator.cc",
709 "test/spawned_test_server/spawner_communicator.h",
714 deps += [ ":net_with_v8" ]
719 "dns/mock_mdns_socket_factory.cc",
720 "dns/mock_mdns_socket_factory.h",
725 deps += ["//crypto:platform" ]
728 "test/cert_test_util_nss.cc",
732 forward_dependent_configs_from = deps
735 source_set("balsa") {
737 "tools/balsa/balsa_enums.h",
738 "tools/balsa/balsa_frame.cc",
739 "tools/balsa/balsa_frame.h",
740 "tools/balsa/balsa_headers.cc",
741 "tools/balsa/balsa_headers.h",
742 "tools/balsa/balsa_headers_token_utils.cc",
743 "tools/balsa/balsa_headers_token_utils.h",
744 "tools/balsa/balsa_visitor_interface.h",
745 "tools/balsa/http_message_constants.cc",
746 "tools/balsa/http_message_constants.h",
747 "tools/balsa/noop_balsa_visitor.h",
748 "tools/balsa/simple_buffer.cc",
749 "tools/balsa/simple_buffer.h",
750 "tools/balsa/split.cc",
751 "tools/balsa/split.h",
752 "tools/balsa/string_piece_utils.h",
753 "tools/quic/spdy_utils.cc",
754 "tools/quic/spdy_utils.h",
764 component("net_with_v8") {
766 "proxy/proxy_resolver_v8.cc",
767 "proxy/proxy_resolver_v8.h",
768 "proxy/proxy_resolver_v8_tracing.cc",
769 "proxy/proxy_resolver_v8_tracing.h",
770 "proxy/proxy_service_v8.cc",
771 "proxy/proxy_service_v8.h",
774 defines = [ "NET_IMPLEMENTATION" ]
776 ":net_win_size_truncation",
777 "//build/config/compiler:wexit_time_destructors",
788 forward_dependent_configs_from = [ ":net" ]
792 if (!is_ios && !is_android) {
793 executable("crash_cache") {
794 sources = [ "tools/crash_cache/crash_cache.cc" ]
795 configs += [ ":net_win_size_truncation" ]
803 executable("crl_set_dump") {
804 sources = [ "tools/crl_set_dump/crl_set_dump.cc" ]
805 configs += [ ":net_win_size_truncation" ]
812 executable("dns_fuzz_stub") {
813 sources = [ "tools/dns_fuzz_stub/dns_fuzz_stub.cc" ]
814 configs += [ ":net_win_size_truncation" ]
823 "tools/gdig/file_net_log.cc",
824 "tools/gdig/gdig.cc",
832 executable("get_server_time") {
833 sources = [ "tools/get_server_time/get_server_time.cc" ]
834 configs += [ ":net_win_size_truncation" ]
844 executable("net_watcher") {
845 sources = [ "tools/net_watcher/net_watcher.cc" ]
854 "//build/config/linux:gconf",
855 "//build/config/linux:glib",
857 deps += [ "//build/config/linux:gio" ]
862 executable("run_testserver") {
863 sources = [ "tools/testserver/run_testserver.cc" ]
865 ":net", # TODO(brettw) bug 363749: this shouldn't be necessary. It's not
866 # in the GYP build, and can be removed when the bug is fixed.
869 "//base/test:test_support",
874 executable("stress_cache") {
875 sources = [ "disk_cache/blockfile/stress_cache.cc" ]
876 configs += [ ":net_win_size_truncation" ]
884 executable("tld_cleanup") {
885 sources = [ "tools/tld_cleanup/tld_cleanup.cc" ]
886 configs += [ ":net_win_size_truncation" ]
890 "//net/tools/tld_cleanup",
896 static_library("epoll_server") {
898 "tools/epoll_server/epoll_server.cc",
899 "tools/epoll_server/epoll_server.h",
907 static_library("flip_in_mem_edsm_server_base") {
909 "tools/dump_cache/url_to_filename_encoder.cc",
910 "tools/dump_cache/url_to_filename_encoder.h",
911 "tools/dump_cache/url_utilities.h",
912 "tools/dump_cache/url_utilities.cc",
913 "tools/flip_server/acceptor_thread.h",
914 "tools/flip_server/acceptor_thread.cc",
915 "tools/flip_server/create_listener.cc",
916 "tools/flip_server/create_listener.h",
917 "tools/flip_server/constants.h",
918 "tools/flip_server/flip_config.cc",
919 "tools/flip_server/flip_config.h",
920 "tools/flip_server/http_interface.cc",
921 "tools/flip_server/http_interface.h",
922 "tools/flip_server/loadtime_measurement.h",
923 "tools/flip_server/mem_cache.h",
924 "tools/flip_server/mem_cache.cc",
925 "tools/flip_server/output_ordering.cc",
926 "tools/flip_server/output_ordering.h",
927 "tools/flip_server/ring_buffer.cc",
928 "tools/flip_server/ring_buffer.h",
929 "tools/flip_server/sm_connection.cc",
930 "tools/flip_server/sm_connection.h",
931 "tools/flip_server/sm_interface.h",
932 "tools/flip_server/spdy_ssl.cc",
933 "tools/flip_server/spdy_ssl.h",
934 "tools/flip_server/spdy_interface.cc",
935 "tools/flip_server/spdy_interface.h",
936 "tools/flip_server/spdy_util.cc",
937 "tools/flip_server/spdy_util.h",
938 "tools/flip_server/streamer_interface.cc",
939 "tools/flip_server/streamer_interface.h",
946 "//third_party/boringssl",
950 executable("flip_in_mem_edsm_server_unittests") {
952 "tools/flip_server/flip_test_utils.cc",
953 "tools/flip_server/flip_test_utils.h",
954 "tools/flip_server/http_interface_test.cc",
955 "tools/flip_server/mem_cache_test.cc",
956 "tools/flip_server/run_all_tests.cc",
957 "tools/flip_server/spdy_interface_test.cc",
960 ":flip_in_mem_edsm_server_base",
965 "//third_party/boringssl",
969 executable("flip_in_mem_edsm_server") {
970 sources = [ "tools/flip_server/flip_in_mem_edsm_server.cc" ]
972 ":flip_in_mem_edsm_server_base",
978 source_set("quic_base") {
980 "tools/quic/quic_client.cc",
981 "tools/quic/quic_client.h",
982 "tools/quic/quic_client_session.cc",
983 "tools/quic/quic_client_session.h",
984 "tools/quic/quic_default_packet_writer.cc",
985 "tools/quic/quic_default_packet_writer.h",
986 "tools/quic/quic_dispatcher.h",
987 "tools/quic/quic_dispatcher.cc",
988 "tools/quic/quic_epoll_clock.cc",
989 "tools/quic/quic_epoll_clock.h",
990 "tools/quic/quic_epoll_connection_helper.cc",
991 "tools/quic/quic_epoll_connection_helper.h",
992 "tools/quic/quic_in_memory_cache.cc",
993 "tools/quic/quic_in_memory_cache.h",
994 "tools/quic/quic_packet_writer_wrapper.cc",
995 "tools/quic/quic_packet_writer_wrapper.h",
996 "tools/quic/quic_per_connection_packet_writer.cc",
997 "tools/quic/quic_per_connection_packet_writer.h",
998 "tools/quic/quic_server.cc",
999 "tools/quic/quic_server.h",
1000 "tools/quic/quic_server_session.cc",
1001 "tools/quic/quic_server_session.h",
1002 "tools/quic/quic_socket_utils.cc",
1003 "tools/quic/quic_socket_utils.h",
1004 "tools/quic/quic_spdy_client_stream.cc",
1005 "tools/quic/quic_spdy_client_stream.h",
1006 "tools/quic/quic_spdy_server_stream.cc",
1007 "tools/quic/quic_spdy_server_stream.h",
1008 "tools/quic/quic_time_wait_list_manager.h",
1009 "tools/quic/quic_time_wait_list_manager.cc",
1016 "//base/third_party/dynamic_annotations",
1018 "//third_party/boringssl",
1023 executable("quic_client") {
1024 sources = [ "tools/quic/quic_client_bin.cc" ]
1029 "//third_party/boringssl",
1035 generate_jni("net_jni_headers") {
1037 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1038 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1039 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
1040 "android/java/src/org/chromium/net/AndroidPrivateKey.java",
1041 "android/java/src/org/chromium/net/GURLUtils.java",
1042 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1043 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1044 "android/java/src/org/chromium/net/X509Util.java",
1050 if (is_android || is_linux) {
1051 executable("disk_cache_memory_test") {
1052 sources = [ "tools/disk_cache_memory_test/disk_cache_memory_test.cc" ]
1060 # TODO(GYP) make this compile on Android, we need some native test deps done.
1061 # TODO(GYP) Also doesn't work on Windows; dependency on boringssl is wrong.
1062 if (!is_android && !is_win) {
1064 source_set("quic_tools") {
1066 "quic/quic_dispatcher.cc",
1067 "quic/quic_dispatcher.h",
1068 "quic/quic_in_memory_cache.cc",
1069 "quic/quic_in_memory_cache.h",
1070 "quic/quic_per_connection_packet_writer.cc",
1071 "quic/quic_per_connection_packet_writer.h",
1072 "quic/quic_server.cc",
1073 "quic/quic_server.h",
1074 "quic/quic_server_packet_writer.cc",
1075 "quic/quic_server_packet_writer.h",
1076 "quic/quic_server_session.cc",
1077 "quic/quic_server_session.h",
1078 "quic/quic_spdy_server_stream.cc",
1079 "quic/quic_spdy_server_stream.h",
1080 "quic/quic_time_wait_list_manager.cc",
1081 "quic/quic_time_wait_list_manager.h",
1086 "//base/third_party/dynamic_annotations",
1091 test("net_unittests") {
1092 sources = gypi_values.net_test_sources
1094 configs += [ ":net_win_size_truncation" ]
1104 "//base:prefs_test_support",
1106 "//base/third_party/dynamic_annotations",
1108 "//crypto:platform",
1109 "//crypto:test_support",
1110 "//net/base/registry_controlled_domains",
1113 "//third_party/zlib",
1118 sources += gypi_values.net_linux_test_sources
1122 ":flip_in_mem_edsm_server_base",
1129 "proxy/proxy_config_service_linux_unittest.cc",
1135 # See bug http://crbug.com/344533.
1136 "disk_cache/blockfile/index_table_v3_unittest.cc",
1137 # No res_ninit() et al on Android, so this doesn't make a lot of
1139 "dns/dns_config_service_posix_unittest.cc",
1142 ":net_javatests", # FIXME(brettw)
1143 ":net_test_jni_headers",
1147 if (!use_nss_certs) {
1149 "ssl/client_cert_store_nss_unittest.cc",
1151 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
1153 "ssl/client_cert_store_chromeos_unittest.cc",
1159 # When building for OpenSSL, we need to exclude NSS specific tests
1160 # or functionality not supported by OpenSSL yet.
1161 # TODO(bulach): Add equivalent tests when the underlying
1162 # functionality is ported to OpenSSL.
1164 "cert/ct_objects_extractor_unittest.cc",
1165 "cert/multi_log_ct_verifier_unittest.cc",
1166 "cert/nss_cert_database_unittest.cc",
1167 "cert/nss_cert_database_chromeos_unittest.cc",
1168 "cert/nss_profile_filter_chromeos_unittest.cc",
1169 "cert/x509_util_nss_unittest.cc",
1170 "quic/test_tools/crypto_test_utils_nss.cc",
1174 "cert/x509_util_openssl_unittest.cc",
1175 "quic/test_tools/crypto_test_utils_openssl.cc",
1176 "socket/ssl_client_socket_openssl_unittest.cc",
1177 "socket/ssl_session_cache_openssl_unittest.cc",
1179 if (!is_desktop_linux && !is_chromeos) {
1180 sources -= [ "cert/nss_cert_database_unittest.cc" ]
1185 defines += [ "USE_KERBEROS" ]
1188 "http/http_auth_gssapi_posix_unittest.cc",
1189 "http/http_auth_handler_negotiate_unittest.cc",
1190 "http/mock_gssapi_library_posix.cc",
1191 "http/mock_gssapi_library_posix.h",
1195 if (use_openssl || (!is_desktop_linux && !is_chromeos && !is_ios)) {
1196 # Only include this test when on Posix and using NSS for
1197 # cert verification or on iOS (which also uses NSS for certs).
1198 sources -= [ "ocsp/nss_ocsp_unittest.cc" ]
1201 if (!use_openssl_certs) {
1202 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1205 if (!enable_websockets) {
1207 "socket_stream/socket_stream_metrics_unittest.cc",
1208 "socket_stream/socket_stream_unittest.cc",
1209 "spdy/spdy_websocket_stream_unittest.cc",
1210 "websockets/websocket_basic_stream_test.cc",
1211 "websockets/websocket_channel_test.cc",
1212 "websockets/websocket_deflate_predictor_impl_test.cc",
1213 "websockets/websocket_deflate_stream_test.cc",
1214 "websockets/websocket_deflater_test.cc",
1215 "websockets/websocket_errors_test.cc",
1216 "websockets/websocket_extension_parser_test.cc",
1217 "websockets/websocket_frame_parser_test.cc",
1218 "websockets/websocket_frame_test.cc",
1219 "websockets/websocket_handshake_handler_spdy_test.cc",
1220 "websockets/websocket_handshake_handler_test.cc",
1221 "websockets/websocket_handshake_stream_create_helper_test.cc",
1222 "websockets/websocket_inflater_test.cc",
1223 "websockets/websocket_job_test.cc",
1224 "websockets/websocket_net_log_params_test.cc",
1225 "websockets/websocket_stream_test.cc",
1226 "websockets/websocket_test_util.cc",
1227 "websockets/websocket_test_util.h",
1228 "websockets/websocket_throttle_test.cc",
1232 if (disable_file_support) {
1234 "base/directory_lister_unittest.cc",
1235 "url_request/url_request_file_job_unittest.cc",
1239 if (disable_ftp_support) {
1241 "ftp/ftp_auth_cache_unittest.cc",
1242 "ftp/ftp_ctrl_response_buffer_unittest.cc",
1243 "ftp/ftp_directory_listing_parser_ls_unittest.cc",
1244 "ftp/ftp_directory_listing_parser_netware_unittest.cc",
1245 "ftp/ftp_directory_listing_parser_os2_unittest.cc",
1246 "ftp/ftp_directory_listing_parser_unittest.cc",
1247 "ftp/ftp_directory_listing_parser_unittest.h",
1248 "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1249 "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1250 "ftp/ftp_network_transaction_unittest.cc",
1251 "ftp/ftp_util_unittest.cc",
1252 "url_request/url_request_ftp_job_unittest.cc",
1256 if (!enable_built_in_dns) {
1258 "dns/address_sorter_posix_unittest.cc",
1259 "dns/address_sorter_unittest.cc",
1263 # Always need use_v8_in_net to be 1 to run on Android, so just remove
1264 # net_unittest's dependency on v8 when using icu alternatives instead of
1265 # setting use_v8_in_net to 0.
1266 if (use_v8_in_net && !use_icu_alternatives_on_android) {
1267 deps += [ ":net_with_v8" ]
1270 "proxy/proxy_resolver_v8_unittest.cc",
1271 "proxy/proxy_resolver_v8_tracing_unittest.cc",
1277 "dns/mdns_cache_unittest.cc",
1278 "dns/mdns_client_unittest.cc",
1279 "dns/record_parsed_unittest.cc",
1280 "dns/record_rdata_unittest.cc",
1288 # 'action_name': 'copy_test_data',
1290 # 'test_data_files': [
1291 # 'data/ssl/certificates/',
1293 # 'data/url_request_unittest/',
1295 # 'test_data_prefix': 'net',
1297 # 'includes': [ '../build/copy_test_data_ios.gypi' ],
1301 # TODO(droger): The following tests are disabled because the
1302 # implementation is missing or incomplete.
1303 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1304 "base/keygen_handler_unittest.cc",
1305 "disk_cache/backend_unittest.cc",
1306 "disk_cache/blockfile/block_files_unittest.cc",
1307 # Need to read input data files.
1308 "filter/gzip_filter_unittest.cc",
1309 "socket/ssl_server_socket_unittest.cc",
1310 "spdy/fuzzing/hpack_fuzz_util_test.cc",
1312 "proxy/proxy_script_fetcher_impl_unittest.cc",
1313 "socket/ssl_client_socket_unittest.cc",
1314 "url_request/url_fetcher_impl_unittest.cc",
1315 "url_request/url_request_context_builder_unittest.cc",
1316 # Needs GetAppOutput().
1317 "test/python_utils_unittest.cc",
1319 # The following tests are disabled because they don't apply to
1321 # OS is not "linux" or "freebsd" or "openbsd".
1322 "socket/unix_domain_client_socket_posix_unittest.cc",
1323 "socket/unix_domain_listen_socket_posix_unittest.cc",
1324 "socket/unix_domain_server_socket_posix_unittest.cc",
1326 # See bug http://crbug.com/344533.
1327 "disk_cache/blockfile/index_table_v3_unittest.cc",
1333 "dns/dns_config_service_posix_unittest.cc",
1336 # # TODO(mmenke): This depends on test_support_base, which depends on
1337 # # icu. Figure out a way to remove that dependency.
1339 # '../testing/android/native_test.gyp:native_test_native_code',
1342 set_sources_assignment_filter([])
1343 sources += [ "base/address_tracker_linux_unittest.cc" ]
1344 set_sources_assignment_filter(sources_assignment_filter)
1347 if (use_icu_alternatives_on_android) {
1349 "base/filename_util_unittest.cc",
1350 "base/net_util_icu_unittest.cc",
1352 deps -= [ "//base:i18n" ]
1356 executable("quic_server") {
1357 sources = [ "quic/quic_server_bin.cc" ]
1362 "//third_party/boringssl",