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("//build/module_args/v8.gni")
9 import("//url/config.gni")
10 import("//testing/test.gni")
12 # TODO(cjhopman): //build/config/android/rules.gni also imports grit_rule.gni.
13 # Currently, that file can't be imported multiple times. Make this always
14 # imported when http://crbug.com/393704 is fixed.
16 import("//tools/grit/grit_rule.gni")
20 import("//build/config/android/config.gni")
21 import("//build/config/android/rules.gni")
23 import("//build/config/mac/mac_sdk.gni")
26 # The list of net files is kept in net.gypi. Read it.
27 gypi_values = exec_script("//build/gypi_to_gn.py",
28 [ rebase_path("net.gypi") ],
32 # Disable Kerberos on ChromeOS, Android and iOS, at least for now. It needs
33 # configuration (krb5.conf and so on).
34 use_kerberos = !is_chromeos && !is_android && !is_ios
36 # The way the cache uses mmap() is inefficient on some Android devices. If
37 # this flag is set, we hackily avoid using mmap() in the disk cache. We are
38 # pretty confident that mmap-ing the index would not hurt any existing x86
39 # android devices, but we cannot be so sure about the variety of ARM devices.
40 # So enable it for x86 only for now.
41 posix_avoid_mmap = is_android && cpu_arch != "x86"
43 # WebSockets and socket stream code are used everywhere except iOS.
44 enable_websockets = !is_ios
45 use_v8_in_net = !is_ios
46 enable_built_in_dns = !is_ios
47 disable_ftp_support = is_ios
50 # Disables support for file URLs. File URL support requires use of icu.
51 disable_file_support = false
54 config("net_config") {
56 if (posix_avoid_mmap) {
57 defines += [ "POSIX_AVOID_MMAP" ]
59 if (disable_file_support) {
60 defines += [ "DISABLE_FILE_SUPPORT" ]
64 # Disables Windows warning about size to int truncations.
65 # TODO(jschuh): crbug.com/167187 fix this and delete this config.
66 config("net_win_size_truncation") {
68 cflags = [ "/wd4267" ]
74 gypi_values.net_nacl_common_sources + 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 public_configs = [ ":net_config" ]
99 "//base/third_party/dynamic_annotations",
100 "//net/base/registry_controlled_domains",
103 "//third_party/zlib",
108 defines += [ "USE_KERBEROS" ]
110 include_dirs += [ "/usr/include/kerberosV" ]
114 "http/http_auth_gssapi_posix.cc",
115 "http/http_auth_gssapi_posix.h",
116 "http/http_auth_handler_negotiate.h",
117 "http/http_auth_handler_negotiate.cc",
122 if (posix_avoid_mmap) {
123 sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
125 sources -= [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
129 if (disable_file_support) {
131 "base/directory_lister.cc",
132 "base/directory_lister.h",
133 "url_request/url_request_file_dir_job.cc",
134 "url_request/url_request_file_dir_job.h",
135 "url_request/url_request_file_job.cc",
136 "url_request/url_request_file_job.h",
137 "url_request/file_protocol_handler.cc",
138 "url_request/file_protocol_handler.h",
142 if (disable_ftp_support) {
144 "ftp/ftp_auth_cache.cc",
145 "ftp/ftp_auth_cache.h",
146 "ftp/ftp_ctrl_response_buffer.cc",
147 "ftp/ftp_ctrl_response_buffer.h",
148 "ftp/ftp_directory_listing_parser.cc",
149 "ftp/ftp_directory_listing_parser.h",
150 "ftp/ftp_directory_listing_parser_ls.cc",
151 "ftp/ftp_directory_listing_parser_ls.h",
152 "ftp/ftp_directory_listing_parser_netware.cc",
153 "ftp/ftp_directory_listing_parser_netware.h",
154 "ftp/ftp_directory_listing_parser_os2.cc",
155 "ftp/ftp_directory_listing_parser_os2.h",
156 "ftp/ftp_directory_listing_parser_vms.cc",
157 "ftp/ftp_directory_listing_parser_vms.h",
158 "ftp/ftp_directory_listing_parser_windows.cc",
159 "ftp/ftp_directory_listing_parser_windows.h",
160 "ftp/ftp_network_layer.cc",
161 "ftp/ftp_network_layer.h",
162 "ftp/ftp_network_session.cc",
163 "ftp/ftp_network_session.h",
164 "ftp/ftp_network_transaction.cc",
165 "ftp/ftp_network_transaction.h",
166 "ftp/ftp_request_info.h",
167 "ftp/ftp_response_info.cc",
168 "ftp/ftp_response_info.h",
169 "ftp/ftp_server_type_histograms.cc",
170 "ftp/ftp_server_type_histograms.h",
171 "ftp/ftp_transaction.h",
172 "ftp/ftp_transaction_factory.h",
175 "url_request/ftp_protocol_handler.cc",
176 "url_request/ftp_protocol_handler.h",
177 "url_request/url_request_ftp_job.cc",
178 "url_request/url_request_ftp_job.h",
182 if (enable_built_in_dns) {
183 defines += [ "ENABLE_BUILT_IN_DNS" ]
186 "dns/address_sorter_posix.cc",
187 "dns/address_sorter_posix.h",
196 "cert/ct_log_verifier_nss.cc",
197 "cert/ct_objects_extractor_nss.cc",
198 "cert/jwk_serializer_nss.cc",
199 "cert/scoped_nss_types.h",
200 "cert/test_root_certs_nss.cc",
201 "cert/x509_util_nss.cc",
202 "cert/x509_util_nss.h",
205 "quic/crypto/aead_base_decrypter_nss.cc",
206 "quic/crypto/aead_base_encrypter_nss.cc",
207 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc",
208 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc",
209 "quic/crypto/chacha20_poly1305_decrypter_nss.cc",
210 "quic/crypto/chacha20_poly1305_encrypter_nss.cc",
211 "quic/crypto/channel_id_nss.cc",
212 "quic/crypto/p256_key_exchange_nss.cc",
213 "socket/nss_ssl_util.cc",
214 "socket/nss_ssl_util.h",
215 "socket/ssl_client_socket_nss.cc",
216 "socket/ssl_client_socket_nss.h",
217 "socket/ssl_server_socket_nss.cc",
218 "socket/ssl_server_socket_nss.h",
222 "cert/nss_cert_database_chromeos.cc",
223 "cert/nss_cert_database_chromeos.h",
224 "cert/nss_profile_filter_chromeos.cc",
225 "cert/nss_profile_filter_chromeos.h",
229 # These are always removed for non-Linux cases below.
231 "base/crypto_module_nss.cc",
232 "base/keygen_handler_nss.cc",
233 "cert/cert_database_nss.cc",
234 "cert/nss_cert_database.cc",
235 "cert/nss_cert_database.h",
236 "cert/x509_certificate_nss.cc",
237 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
238 "third_party/mozilla_security_manager/nsKeygenHandler.h",
239 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
240 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
241 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
242 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
246 # Always removed for !ios below.
248 "cert/cert_verify_proc_nss.cc",
249 "cert/cert_verify_proc_nss.h",
253 sources -= [ "cert/sha256_legacy_support_nss_win.cc" ]
257 "base/crypto_module_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",
284 sources -= [ "ssl/openssl_platform_key_mac.cc" ]
288 "cert/sha256_legacy_support_openssl_win.cc",
289 "ssl/openssl_platform_key_win.cc",
294 if (!use_openssl_certs) {
296 "base/keygen_handler_openssl.cc",
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",
308 sources -= [ "base/openssl_private_key_store_android.cc" ]
310 } else if (is_android) {
311 # Android doesn't use these even when using OpenSSL.
313 "base/openssl_private_key_store_memory.cc",
314 "cert/cert_database_openssl.cc",
315 "cert/cert_verify_proc_openssl.cc",
316 "cert/test_root_certs_openssl.cc",
320 if (use_glib && !is_chromeos) {
321 configs += [ "//build/config/linux:gconf" ]
322 deps += [ "//build/config/linux:gio" ]
326 configs += [ "//build/config/linux:libresolv" ]
329 "base/crypto_module_nss.cc",
330 "base/keygen_handler_nss.cc",
331 "cert/cert_database_nss.cc",
332 "cert/nss_cert_database.cc",
333 "cert/nss_cert_database.h",
334 "cert/x509_certificate_nss.cc",
335 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
336 "third_party/mozilla_security_manager/nsKeygenHandler.h",
337 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
338 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
339 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
340 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
343 if (!is_ios && !use_openssl) {
344 # These files are part of the partial implementation of NSS on iOS so
345 # keep them in that case.
347 "cert/test_root_certs_nss.cc",
354 if (!use_nss_certs) {
356 "ssl/client_cert_store_nss.cc",
357 "ssl/client_cert_store_nss.h",
360 # These files are part of the partial implementation of NSS on iOS so
361 # keep them in that case (even though use_nss_certs is not set).
363 "cert/cert_verify_proc_nss.cc",
364 "cert/cert_verify_proc_nss.h",
368 # These were already removed on non-ChromeOS.
370 "ssl/client_cert_store_chromeos.cc",
371 "ssl/client_cert_store_chromeos.h",
376 if (!enable_websockets) {
378 "websockets/websocket_basic_handshake_stream.cc",
379 "websockets/websocket_basic_handshake_stream.h",
380 "websockets/websocket_basic_stream.cc",
381 "websockets/websocket_basic_stream.h",
382 "websockets/websocket_channel.cc",
383 "websockets/websocket_channel.h",
384 "websockets/websocket_deflate_predictor.h",
385 "websockets/websocket_deflate_predictor_impl.cc",
386 "websockets/websocket_deflate_predictor_impl.h",
387 "websockets/websocket_deflate_stream.cc",
388 "websockets/websocket_deflate_stream.h",
389 "websockets/websocket_deflater.cc",
390 "websockets/websocket_deflater.h",
391 "websockets/websocket_errors.cc",
392 "websockets/websocket_errors.h",
393 "websockets/websocket_extension.cc",
394 "websockets/websocket_extension.h",
395 "websockets/websocket_extension_parser.cc",
396 "websockets/websocket_extension_parser.h",
397 "websockets/websocket_frame.cc",
398 "websockets/websocket_frame.h",
399 "websockets/websocket_frame_parser.cc",
400 "websockets/websocket_frame_parser.h",
401 "websockets/websocket_handshake_constants.cc",
402 "websockets/websocket_handshake_constants.h",
403 "websockets/websocket_handshake_challenge.cc",
404 "websockets/websocket_handshake_challenge.h",
405 "websockets/websocket_handshake_request_info.cc",
406 "websockets/websocket_handshake_request_info.h",
407 "websockets/websocket_handshake_response_info.cc",
408 "websockets/websocket_handshake_response_info.h",
409 "websockets/websocket_handshake_stream_base.h",
410 "websockets/websocket_handshake_stream_create_helper.cc",
411 "websockets/websocket_handshake_stream_create_helper.h",
412 "websockets/websocket_inflater.cc",
413 "websockets/websocket_inflater.h",
414 "websockets/websocket_mux.h",
415 "websockets/websocket_stream.cc",
416 "websockets/websocket_stream.h",
424 "dns/mdns_client.cc",
426 "dns/mdns_client_impl.cc",
427 "dns/mdns_client_impl.h",
428 "dns/record_parsed.cc",
429 "dns/record_parsed.h",
430 "dns/record_rdata.cc",
431 "dns/record_rdata.h",
437 "http/http_auth_handler_ntlm_portable.cc",
438 "socket/socket_libevent.cc",
439 "socket/socket_libevent.h",
440 "socket/tcp_socket_libevent.cc",
441 "socket/tcp_socket_libevent.h",
442 "udp/udp_socket_libevent.cc",
443 "udp/udp_socket_libevent.h",
447 "base/winsock_init.cc",
448 "base/winsock_init.h",
449 "base/winsock_util.cc",
450 "base/winsock_util.h",
451 "proxy/proxy_resolver_winhttp.cc",
452 "proxy/proxy_resolver_winhttp.h",
458 "Foundation.framework",
459 "Security.framework",
460 "SystemConfiguration.framework",
466 # Add back some sources that were otherwise filtered out. iOS additionally
467 # doesn't set USE_NSS but needs some of the files.
468 set_sources_assignment_filter([])
470 "base/net_util_mac.cc",
471 "base/net_util_mac.h",
472 "base/network_change_notifier_mac.cc",
473 "base/network_config_watcher_mac.cc",
474 "base/platform_mime_util_mac.mm",
475 "cert/cert_verify_proc_nss.cc",
476 "cert/cert_verify_proc_nss.h",
477 "cert/test_root_certs_nss.cc",
478 "cert/x509_util_nss.cc",
479 "cert/x509_util_nss.h",
480 "proxy/proxy_resolver_mac.cc",
481 "proxy/proxy_server_mac.cc",
485 set_sources_assignment_filter(sources_assignment_filter)
487 sources -= [ "disk_cache/blockfile/file_posix.cc" ]
489 "CFNetwork.framework",
490 "MobileCoreServices.framework",
491 "Security.framework",
492 "SystemConfiguration.framework",
497 if (is_ios || is_mac) {
498 sources += gypi_values.net_base_mac_ios_sources
502 # Add some Linux sources that were excluded by the filter, but which
504 set_sources_assignment_filter([])
506 "base/platform_mime_util_linux.cc",
507 "base/address_tracker_linux.cc",
508 "base/address_tracker_linux.h",
509 "base/net_util_linux.cc",
510 "base/net_util_linux.h",
512 set_sources_assignment_filter(sources_assignment_filter)
514 if (!is_android_webview_build) {
515 deps += [ ":net_jni_headers" ]
519 if (use_icu_alternatives_on_android) {
525 "base/filename_util_icu.cc",
526 "base/net_string_util_icu.cc",
527 "base/net_util_icu.cc",
530 "base/net_string_util_icu_alternatives_android.cc",
531 "base/net_string_util_icu_alternatives_android.h",
536 grit("net_resources") {
537 source = "base/net_resources.grd"
538 use_qualified_include = true
540 "grit/net_resources.h",
546 static_library("extras") {
547 sources = gypi_values.net_extras_sources
548 configs += [ "//build/config/compiler:wexit_time_destructors" ]
555 static_library("http_server") {
557 "server/http_connection.cc",
558 "server/http_connection.h",
559 "server/http_server.cc",
560 "server/http_server.h",
561 "server/http_server_request_info.cc",
562 "server/http_server_request_info.h",
563 "server/http_server_response_info.cc",
564 "server/http_server_response_info.h",
565 "server/web_socket.cc",
566 "server/web_socket.h",
567 "server/web_socket_encoder.cc",
568 "server/web_socket_encoder.h",
571 "//build/config/compiler:wexit_time_destructors",
572 ":net_win_size_truncation",
580 executable("dump_cache") {
583 "tools/dump_cache/cache_dumper.cc",
584 "tools/dump_cache/cache_dumper.h",
585 "tools/dump_cache/dump_cache.cc",
586 "tools/dump_cache/dump_files.cc",
587 "tools/dump_cache/dump_files.h",
588 "tools/dump_cache/simple_cache_dumper.cc",
589 "tools/dump_cache/simple_cache_dumper.h",
590 "tools/dump_cache/url_to_filename_encoder.cc",
591 "tools/dump_cache/url_to_filename_encoder.h",
592 "tools/dump_cache/url_utilities.h",
593 "tools/dump_cache/url_utilities.cc",
596 configs += [ ":net_win_size_truncation" ]
605 source_set("test_support") {
608 "base/captured_net_log_entry.cc",
609 "base/captured_net_log_entry.h",
610 "base/capturing_net_log.cc",
611 "base/capturing_net_log.h",
612 "base/capturing_net_log_observer.cc",
613 "base/capturing_net_log_observer.h",
614 "base/load_timing_info_test_util.cc",
615 "base/load_timing_info_test_util.h",
616 "base/mock_file_stream.cc",
617 "base/mock_file_stream.h",
618 "base/test_completion_callback.cc",
619 "base/test_completion_callback.h",
620 "base/test_data_directory.cc",
621 "base/test_data_directory.h",
622 "cert/mock_cert_verifier.cc",
623 "cert/mock_cert_verifier.h",
624 "cookies/cookie_monster_store_test.cc",
625 "cookies/cookie_monster_store_test.h",
626 "cookies/cookie_store_test_callbacks.cc",
627 "cookies/cookie_store_test_callbacks.h",
628 "cookies/cookie_store_test_helpers.cc",
629 "cookies/cookie_store_test_helpers.h",
630 "disk_cache/disk_cache_test_base.cc",
631 "disk_cache/disk_cache_test_base.h",
632 "disk_cache/disk_cache_test_util.cc",
633 "disk_cache/disk_cache_test_util.h",
634 "dns/dns_test_util.cc",
635 "dns/dns_test_util.h",
636 "dns/mock_host_resolver.cc",
637 "dns/mock_host_resolver.h",
638 "dns/mock_mdns_socket_factory.cc",
639 "dns/mock_mdns_socket_factory.h",
640 "http/http_transaction_test_util.cc",
641 "http/http_transaction_test_util.h",
642 "proxy/mock_proxy_resolver.cc",
643 "proxy/mock_proxy_resolver.h",
644 "proxy/mock_proxy_script_fetcher.cc",
645 "proxy/mock_proxy_script_fetcher.h",
646 "proxy/proxy_config_service_common_unittest.cc",
647 "proxy/proxy_config_service_common_unittest.h",
648 "socket/socket_test_util.cc",
649 "socket/socket_test_util.h",
650 "test/cert_test_util.cc",
651 "test/cert_test_util.h",
652 "test/cert_test_util_nss.cc",
653 "test/ct_test_util.cc",
654 "test/ct_test_util.h",
655 "test/embedded_test_server/embedded_test_server.cc",
656 "test/embedded_test_server/embedded_test_server.h",
657 "test/embedded_test_server/http_connection.cc",
658 "test/embedded_test_server/http_connection.h",
659 "test/embedded_test_server/http_request.cc",
660 "test/embedded_test_server/http_request.h",
661 "test/embedded_test_server/http_response.cc",
662 "test/embedded_test_server/http_response.h",
663 "test/net_test_suite.cc",
664 "test/net_test_suite.h",
665 "test/python_utils.cc",
666 "test/python_utils.h",
667 "test/spawned_test_server/base_test_server.cc",
668 "test/spawned_test_server/base_test_server.h",
669 "test/spawned_test_server/local_test_server_posix.cc",
670 "test/spawned_test_server/local_test_server_win.cc",
671 "test/spawned_test_server/local_test_server.cc",
672 "test/spawned_test_server/local_test_server.h",
673 "test/spawned_test_server/remote_test_server.cc",
674 "test/spawned_test_server/remote_test_server.h",
675 "test/spawned_test_server/spawned_test_server.h",
676 "test/spawned_test_server/spawner_communicator.cc",
677 "test/spawned_test_server/spawner_communicator.h",
678 "test/url_request/url_request_failed_job.cc",
679 "test/url_request/url_request_failed_job.h",
680 "test/url_request/url_request_mock_data_job.cc",
681 "test/url_request/url_request_mock_data_job.h",
682 "test/url_request/url_request_mock_http_job.cc",
683 "test/url_request/url_request_mock_http_job.h",
684 "test/url_request/url_request_slow_download_job.cc",
685 "test/url_request/url_request_slow_download_job.h",
686 "url_request/test_url_fetcher_factory.cc",
687 "url_request/test_url_fetcher_factory.h",
688 "url_request/test_url_request_interceptor.cc",
689 "url_request/test_url_request_interceptor.h",
690 "url_request/url_request_test_util.cc",
691 "url_request/url_request_test_util.h",
694 configs += [ ":net_win_size_truncation" ]
698 "//base/test:test_support",
701 "//net/tools/tld_cleanup",
707 if (!use_openssl && (use_nss_certs || is_ios)) {
708 public_deps += [ "//crypto:platform" ]
713 "test/spawned_test_server/remote_test_server.cc",
714 "test/spawned_test_server/remote_test_server.h",
715 "test/spawned_test_server/spawner_communicator.cc",
716 "test/spawned_test_server/spawner_communicator.h",
721 public_deps += [ ":net_with_v8" ]
726 "dns/mock_mdns_socket_factory.cc",
727 "dns/mock_mdns_socket_factory.h",
731 if (!use_nss_certs) {
732 sources -= [ "test/cert_test_util_nss.cc" ]
736 source_set("balsa") {
738 "tools/balsa/balsa_enums.h",
739 "tools/balsa/balsa_frame.cc",
740 "tools/balsa/balsa_frame.h",
741 "tools/balsa/balsa_headers.cc",
742 "tools/balsa/balsa_headers.h",
743 "tools/balsa/balsa_headers_token_utils.cc",
744 "tools/balsa/balsa_headers_token_utils.h",
745 "tools/balsa/balsa_visitor_interface.h",
746 "tools/balsa/http_message_constants.cc",
747 "tools/balsa/http_message_constants.h",
748 "tools/balsa/noop_balsa_visitor.h",
749 "tools/balsa/simple_buffer.cc",
750 "tools/balsa/simple_buffer.h",
751 "tools/balsa/split.cc",
752 "tools/balsa/split.h",
753 "tools/balsa/string_piece_utils.h",
754 "tools/quic/spdy_utils.cc",
755 "tools/quic/spdy_utils.h",
765 component("net_with_v8") {
767 "proxy/proxy_resolver_v8.cc",
768 "proxy/proxy_resolver_v8.h",
769 "proxy/proxy_resolver_v8_tracing.cc",
770 "proxy/proxy_resolver_v8_tracing.h",
771 "proxy/proxy_service_v8.cc",
772 "proxy/proxy_service_v8.h",
775 defines = [ "NET_IMPLEMENTATION" ]
777 ":net_win_size_truncation",
778 "//build/config/compiler:wexit_time_destructors",
793 if (!is_ios && !is_android) {
794 executable("crash_cache") {
797 "tools/crash_cache/crash_cache.cc",
799 configs += [ ":net_win_size_truncation" ]
807 executable("crl_set_dump") {
810 "tools/crl_set_dump/crl_set_dump.cc",
812 configs += [ ":net_win_size_truncation" ]
819 executable("dns_fuzz_stub") {
822 "tools/dns_fuzz_stub/dns_fuzz_stub.cc",
824 configs += [ ":net_win_size_truncation" ]
834 "tools/gdig/file_net_log.cc",
835 "tools/gdig/gdig.cc",
843 executable("get_server_time") {
846 "tools/get_server_time/get_server_time.cc",
848 configs += [ ":net_win_size_truncation" ]
858 executable("net_watcher") {
861 "tools/net_watcher/net_watcher.cc",
869 if (is_desktop_linux) {
871 "//build/config/linux:gconf",
872 "//build/config/linux:glib",
874 deps += [ "//build/config/linux:gio" ]
879 executable("run_testserver") {
882 "tools/testserver/run_testserver.cc",
885 ":net", # TODO(brettw) bug 363749: this shouldn't be necessary. It's not
886 # in the GYP build, and can be removed when the bug is fixed.
889 "//base/test:test_support",
894 executable("stress_cache") {
897 "disk_cache/blockfile/stress_cache.cc",
899 configs += [ ":net_win_size_truncation" ]
907 executable("tld_cleanup") {
909 "tools/tld_cleanup/tld_cleanup.cc",
911 configs += [ ":net_win_size_truncation" ]
915 "//net/tools/tld_cleanup",
921 static_library("epoll_server") {
923 "tools/epoll_server/epoll_server.cc",
924 "tools/epoll_server/epoll_server.h",
932 static_library("flip_in_mem_edsm_server_base") {
935 "tools/dump_cache/url_to_filename_encoder.cc",
936 "tools/dump_cache/url_to_filename_encoder.h",
937 "tools/dump_cache/url_utilities.h",
938 "tools/dump_cache/url_utilities.cc",
939 "tools/flip_server/acceptor_thread.h",
940 "tools/flip_server/acceptor_thread.cc",
941 "tools/flip_server/create_listener.cc",
942 "tools/flip_server/create_listener.h",
943 "tools/flip_server/constants.h",
944 "tools/flip_server/flip_config.cc",
945 "tools/flip_server/flip_config.h",
946 "tools/flip_server/http_interface.cc",
947 "tools/flip_server/http_interface.h",
948 "tools/flip_server/loadtime_measurement.h",
949 "tools/flip_server/mem_cache.h",
950 "tools/flip_server/mem_cache.cc",
951 "tools/flip_server/output_ordering.cc",
952 "tools/flip_server/output_ordering.h",
953 "tools/flip_server/ring_buffer.cc",
954 "tools/flip_server/ring_buffer.h",
955 "tools/flip_server/sm_connection.cc",
956 "tools/flip_server/sm_connection.h",
957 "tools/flip_server/sm_interface.h",
958 "tools/flip_server/spdy_ssl.cc",
959 "tools/flip_server/spdy_ssl.h",
960 "tools/flip_server/spdy_interface.cc",
961 "tools/flip_server/spdy_interface.h",
962 "tools/flip_server/spdy_util.cc",
963 "tools/flip_server/spdy_util.h",
964 "tools/flip_server/streamer_interface.cc",
965 "tools/flip_server/streamer_interface.h",
972 "//third_party/boringssl",
976 executable("flip_in_mem_edsm_server_unittests") {
979 "tools/flip_server/flip_test_utils.cc",
980 "tools/flip_server/flip_test_utils.h",
981 "tools/flip_server/http_interface_test.cc",
982 "tools/flip_server/mem_cache_test.cc",
983 "tools/flip_server/run_all_tests.cc",
984 "tools/flip_server/spdy_interface_test.cc",
987 ":flip_in_mem_edsm_server_base",
992 "//third_party/boringssl",
996 executable("flip_in_mem_edsm_server") {
999 "tools/flip_server/flip_in_mem_edsm_server.cc",
1002 ":flip_in_mem_edsm_server_base",
1008 source_set("quic_base") {
1010 "tools/quic/quic_client.cc",
1011 "tools/quic/quic_client.h",
1012 "tools/quic/quic_client_session.cc",
1013 "tools/quic/quic_client_session.h",
1014 "tools/quic/quic_default_packet_writer.cc",
1015 "tools/quic/quic_default_packet_writer.h",
1016 "tools/quic/quic_dispatcher.h",
1017 "tools/quic/quic_dispatcher.cc",
1018 "tools/quic/quic_epoll_clock.cc",
1019 "tools/quic/quic_epoll_clock.h",
1020 "tools/quic/quic_epoll_connection_helper.cc",
1021 "tools/quic/quic_epoll_connection_helper.h",
1022 "tools/quic/quic_in_memory_cache.cc",
1023 "tools/quic/quic_in_memory_cache.h",
1024 "tools/quic/quic_packet_writer_wrapper.cc",
1025 "tools/quic/quic_packet_writer_wrapper.h",
1026 "tools/quic/quic_per_connection_packet_writer.cc",
1027 "tools/quic/quic_per_connection_packet_writer.h",
1028 "tools/quic/quic_server.cc",
1029 "tools/quic/quic_server.h",
1030 "tools/quic/quic_server_session.cc",
1031 "tools/quic/quic_server_session.h",
1032 "tools/quic/quic_socket_utils.cc",
1033 "tools/quic/quic_socket_utils.h",
1034 "tools/quic/quic_spdy_client_stream.cc",
1035 "tools/quic/quic_spdy_client_stream.h",
1036 "tools/quic/quic_spdy_server_stream.cc",
1037 "tools/quic/quic_spdy_server_stream.h",
1038 "tools/quic/quic_time_wait_list_manager.h",
1039 "tools/quic/quic_time_wait_list_manager.cc",
1046 "//base/third_party/dynamic_annotations",
1048 "//third_party/boringssl",
1053 executable("quic_client") {
1055 "tools/quic/quic_client_bin.cc",
1061 "//third_party/boringssl",
1067 generate_jni("net_jni_headers") {
1069 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1070 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1071 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
1072 "android/java/src/org/chromium/net/AndroidPrivateKey.java",
1073 "android/java/src/org/chromium/net/GURLUtils.java",
1074 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1075 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1076 "android/java/src/org/chromium/net/X509Util.java",
1080 generate_jni("net_test_jni_headers") {
1082 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
1088 if (is_android || is_linux) {
1089 executable("disk_cache_memory_test") {
1092 "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1101 # TODO(GYP) make this compile on Android, we need some native test deps done.
1102 # TODO(GYP) Also doesn't work on Windows; dependency on boringssl is wrong.
1103 # TODO(GYP) Also doesn't work on Mac, need to figure out why not.
1104 if (!is_android && !is_win && !is_mac) {
1105 source_set("quic_tools") {
1107 "quic/quic_dispatcher.cc",
1108 "quic/quic_dispatcher.h",
1109 "quic/quic_in_memory_cache.cc",
1110 "quic/quic_in_memory_cache.h",
1111 "quic/quic_per_connection_packet_writer.cc",
1112 "quic/quic_per_connection_packet_writer.h",
1113 "quic/quic_server.cc",
1114 "quic/quic_server.h",
1115 "quic/quic_server_packet_writer.cc",
1116 "quic/quic_server_packet_writer.h",
1117 "quic/quic_server_session.cc",
1118 "quic/quic_server_session.h",
1119 "quic/quic_spdy_server_stream.cc",
1120 "quic/quic_spdy_server_stream.h",
1121 "quic/quic_time_wait_list_manager.cc",
1122 "quic/quic_time_wait_list_manager.h",
1127 "//base/third_party/dynamic_annotations",
1132 test("net_unittests") {
1133 sources = gypi_values.net_test_sources
1135 configs += [ ":net_win_size_truncation" ]
1146 "//base:prefs_test_support",
1148 "//base/third_party/dynamic_annotations",
1150 "//crypto:platform",
1151 "//crypto:test_support",
1152 "//net/base/registry_controlled_domains",
1155 "//third_party/zlib",
1160 sources += gypi_values.net_linux_test_sources
1164 ":flip_in_mem_edsm_server_base",
1169 if (is_mac || is_ios) {
1170 sources += gypi_values.net_base_test_mac_ios_sources
1174 sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
1179 # See bug http://crbug.com/344533.
1180 "disk_cache/blockfile/index_table_v3_unittest.cc",
1182 # No res_ninit() et al on Android, so this doesn't make a lot of
1184 "dns/dns_config_service_posix_unittest.cc",
1187 ":net_javatests", # FIXME(brettw)
1188 ":net_test_jni_headers",
1192 if (v8_use_external_startup_data) {
1196 if (!use_nss_certs) {
1197 sources -= [ "ssl/client_cert_store_nss_unittest.cc" ]
1198 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
1199 sources -= [ "ssl/client_cert_store_chromeos_unittest.cc" ]
1204 # When building for OpenSSL, we need to exclude NSS specific tests
1205 # or functionality not supported by OpenSSL yet.
1206 # TODO(bulach): Add equivalent tests when the underlying
1207 # functionality is ported to OpenSSL.
1209 "cert/nss_cert_database_unittest.cc",
1210 "cert/x509_util_nss_unittest.cc",
1211 "quic/test_tools/crypto_test_utils_nss.cc",
1214 # These were already removed in the non-ChromeOS case.
1216 "cert/nss_cert_database_chromeos_unittest.cc",
1217 "cert/nss_profile_filter_chromeos_unittest.cc",
1222 "cert/x509_util_openssl_unittest.cc",
1223 "quic/test_tools/crypto_test_utils_openssl.cc",
1224 "socket/ssl_client_socket_openssl_unittest.cc",
1225 "socket/ssl_session_cache_openssl_unittest.cc",
1227 if (!is_desktop_linux && !is_chromeos) {
1228 sources -= [ "cert/nss_cert_database_unittest.cc" ]
1233 defines += [ "USE_KERBEROS" ]
1236 "http/http_auth_gssapi_posix_unittest.cc",
1237 "http/http_auth_handler_negotiate_unittest.cc",
1238 "http/mock_gssapi_library_posix.cc",
1239 "http/mock_gssapi_library_posix.h",
1243 if (use_openssl || (!is_desktop_linux && !is_chromeos && !is_ios)) {
1244 # Only include this test when on Posix and using NSS for
1245 # cert verification or on iOS (which also uses NSS for certs).
1246 sources -= [ "ocsp/nss_ocsp_unittest.cc" ]
1249 if (!use_openssl_certs) {
1250 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1253 if (!enable_websockets) {
1255 "server/http_connection_unittest.cc",
1256 "server/http_server_response_info_unittest.cc",
1257 "server/http_server_unittest.cc",
1258 "server/web_socket_encoder_unittest.cc",
1259 "websockets/websocket_basic_stream_test.cc",
1260 "websockets/websocket_channel_test.cc",
1261 "websockets/websocket_deflate_predictor_impl_test.cc",
1262 "websockets/websocket_deflate_stream_test.cc",
1263 "websockets/websocket_deflater_test.cc",
1264 "websockets/websocket_errors_test.cc",
1265 "websockets/websocket_end_to_end_test.cc",
1266 "websockets/websocket_extension_parser_test.cc",
1267 "websockets/websocket_frame_parser_test.cc",
1268 "websockets/websocket_frame_test.cc",
1269 "websockets/websocket_handshake_challenge_test.cc",
1270 "websockets/websocket_handshake_stream_create_helper_test.cc",
1271 "websockets/websocket_inflater_test.cc",
1272 "websockets/websocket_stream_test.cc",
1273 "websockets/websocket_test_util.cc",
1274 "websockets/websocket_test_util.h",
1276 deps -= [ ":http_server" ]
1279 if (disable_file_support) {
1281 "base/directory_lister_unittest.cc",
1282 "url_request/url_request_file_job_unittest.cc",
1286 if (disable_ftp_support) {
1288 "ftp/ftp_auth_cache_unittest.cc",
1289 "ftp/ftp_ctrl_response_buffer_unittest.cc",
1290 "ftp/ftp_directory_listing_parser_ls_unittest.cc",
1291 "ftp/ftp_directory_listing_parser_netware_unittest.cc",
1292 "ftp/ftp_directory_listing_parser_os2_unittest.cc",
1293 "ftp/ftp_directory_listing_parser_unittest.cc",
1294 "ftp/ftp_directory_listing_parser_unittest.h",
1295 "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1296 "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1297 "ftp/ftp_network_transaction_unittest.cc",
1298 "ftp/ftp_util_unittest.cc",
1299 "url_request/url_request_ftp_job_unittest.cc",
1303 if (!enable_built_in_dns) {
1305 "dns/address_sorter_posix_unittest.cc",
1306 "dns/address_sorter_unittest.cc",
1310 # Always need use_v8_in_net to be 1 to run on Android, so just remove
1311 # net_unittest's dependency on v8 when using icu alternatives instead of
1312 # setting use_v8_in_net to 0.
1313 if (use_v8_in_net && !use_icu_alternatives_on_android) {
1314 deps += [ ":net_with_v8" ]
1317 "proxy/proxy_resolver_v8_unittest.cc",
1318 "proxy/proxy_resolver_v8_tracing_unittest.cc",
1324 "dns/mdns_cache_unittest.cc",
1325 "dns/mdns_client_unittest.cc",
1326 "dns/record_parsed_unittest.cc",
1327 "dns/record_rdata_unittest.cc",
1335 # 'action_name': 'copy_test_data',
1337 # 'test_data_files': [
1338 # 'data/ssl/certificates/',
1340 # 'data/url_request_unittest/',
1342 # 'test_data_prefix': 'net',
1344 # 'includes': [ '../build/copy_test_data_ios.gypi' ],
1348 # TODO(droger): The following tests are disabled because the
1349 # implementation is missing or incomplete.
1350 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1351 "base/keygen_handler_unittest.cc",
1352 "disk_cache/backend_unittest.cc",
1353 "disk_cache/blockfile/block_files_unittest.cc",
1355 # Need to read input data files.
1356 "filter/gzip_filter_unittest.cc",
1357 "socket/ssl_server_socket_unittest.cc",
1358 "spdy/fuzzing/hpack_fuzz_util_test.cc",
1361 "proxy/proxy_script_fetcher_impl_unittest.cc",
1362 "socket/ssl_client_socket_unittest.cc",
1363 "url_request/url_fetcher_impl_unittest.cc",
1364 "url_request/url_request_context_builder_unittest.cc",
1366 # Needs GetAppOutput().
1367 "test/python_utils_unittest.cc",
1369 # The following tests are disabled because they don't apply to
1371 # OS is not "linux" or "freebsd" or "openbsd".
1372 "socket/unix_domain_client_socket_posix_unittest.cc",
1373 "socket/unix_domain_listen_socket_posix_unittest.cc",
1374 "socket/unix_domain_server_socket_posix_unittest.cc",
1376 # See bug http://crbug.com/344533.
1377 "disk_cache/blockfile/index_table_v3_unittest.cc",
1382 sources -= [ "dns/dns_config_service_posix_unittest.cc" ]
1385 # # TODO(mmenke): This depends on test_support_base, which depends on
1386 # # icu. Figure out a way to remove that dependency.
1388 # '../testing/android/native_test.gyp:native_test_native_code',
1391 set_sources_assignment_filter([])
1392 sources += [ "base/address_tracker_linux_unittest.cc" ]
1393 set_sources_assignment_filter(sources_assignment_filter)
1396 if (use_icu_alternatives_on_android) {
1398 "base/filename_util_unittest.cc",
1399 "base/net_util_icu_unittest.cc",
1401 deps -= [ "//base:i18n" ]
1405 executable("quic_server") {
1407 "quic/quic_server_bin.cc",
1413 "//third_party/boringssl",
1416 } # !is_android && !is_win && !is_mac