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("//tools/grit/grit_rule.gni")
9 import("//url/config.gni")
12 import("//build/config/android/config.gni")
13 import("//build/config/android/rules.gni")
15 import("//build/config/mac/mac_sdk.gni")
18 # The list of net files is kept in net.gypi. Read it.
19 gypi_values = exec_script(
20 "//build/gypi_to_gn.py",
21 [ rebase_path("net.gypi") ],
25 # Disable Kerberos on ChromeOS, Android and iOS, at least for now. It needs
26 # configuration (krb5.conf and so on).
27 use_kerberos = !is_chromeos && !is_android && !is_ios
29 # The way the cache uses mmap() is inefficient on some Android devices. If
30 # this flag is set, we hackily avoid using mmap() in the disk cache. We are
31 # pretty confident that mmap-ing the index would not hurt any existing x86
32 # android devices, but we cannot be so sure about the variety of ARM devices.
33 # So enable it for x86 only for now.
34 posix_avoid_mmap = is_android && cpu_arch != "x86"
36 # WebSockets and socket stream code are used everywhere except iOS.
37 enable_websockets = !is_ios
38 use_v8_in_net = !is_ios
39 enable_built_in_dns = !is_ios
40 disable_ftp_support = is_ios
43 # Disables support for file URLs. File URL support requires use of icu.
44 disable_file_support = false
47 config("net_config") {
49 if (posix_avoid_mmap) {
50 defines += [ "POSIX_AVOID_MMAP" ]
52 if (disable_file_support) {
53 defines += [ "DISABLE_FILE_SUPPORT" ]
57 # Disables Windows warning about size to int truncations.
58 # TODO(jschuh): crbug.com/167187 fix this and delete this config.
59 config("net_win_size_truncation") {
61 cflags = [ "/wd4267" ]
67 gypi_values.net_nacl_common_sources +
68 gypi_values.net_non_nacl_sources
72 # TODO(GYP) Note that he GYP file supports linux_link_kerberos (defaults to
73 # 0) which implies that we run pkg_config on kerberos and link to that
74 # rather than setting this define which will dynamically open it. That
75 # doesn't seem to be set in the regular builds, so we're skipping this
80 configs += [ ":net_win_size_truncation" ]
81 direct_dependent_configs = [ ":net_config" ]
88 "//base/third_party/dynamic_annotations",
91 "//net/base/registry_controlled_domains",
97 forward_dependent_configs_from = [
103 defines += [ "USE_KERBEROS" ]
105 include_dirs += [ "/usr/include/kerberosV" ]
109 "http/http_auth_gssapi_posix.cc",
110 "http/http_auth_gssapi_posix.h",
111 "http/http_auth_handler_negotiate.h",
112 "http/http_auth_handler_negotiate.cc",
117 if (posix_avoid_mmap) {
118 sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
120 sources -= [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
124 if (disable_file_support) {
126 "base/directory_lister.cc",
127 "base/directory_lister.h",
128 "url_request/url_request_file_dir_job.cc",
129 "url_request/url_request_file_dir_job.h",
130 "url_request/url_request_file_job.cc",
131 "url_request/url_request_file_job.h",
132 "url_request/file_protocol_handler.cc",
133 "url_request/file_protocol_handler.h",
137 if (disable_ftp_support) {
139 "ftp/ftp_auth_cache.cc",
140 "ftp/ftp_auth_cache.h",
141 "ftp/ftp_ctrl_response_buffer.cc",
142 "ftp/ftp_ctrl_response_buffer.h",
143 "ftp/ftp_directory_listing_parser.cc",
144 "ftp/ftp_directory_listing_parser.h",
145 "ftp/ftp_directory_listing_parser_ls.cc",
146 "ftp/ftp_directory_listing_parser_ls.h",
147 "ftp/ftp_directory_listing_parser_netware.cc",
148 "ftp/ftp_directory_listing_parser_netware.h",
149 "ftp/ftp_directory_listing_parser_os2.cc",
150 "ftp/ftp_directory_listing_parser_os2.h",
151 "ftp/ftp_directory_listing_parser_vms.cc",
152 "ftp/ftp_directory_listing_parser_vms.h",
153 "ftp/ftp_directory_listing_parser_windows.cc",
154 "ftp/ftp_directory_listing_parser_windows.h",
155 "ftp/ftp_network_layer.cc",
156 "ftp/ftp_network_layer.h",
157 "ftp/ftp_network_session.cc",
158 "ftp/ftp_network_session.h",
159 "ftp/ftp_network_transaction.cc",
160 "ftp/ftp_network_transaction.h",
161 "ftp/ftp_request_info.h",
162 "ftp/ftp_response_info.cc",
163 "ftp/ftp_response_info.h",
164 "ftp/ftp_server_type_histograms.cc",
165 "ftp/ftp_server_type_histograms.h",
166 "ftp/ftp_transaction.h",
167 "ftp/ftp_transaction_factory.h",
170 "url_request/ftp_protocol_handler.cc",
171 "url_request/ftp_protocol_handler.h",
172 "url_request/url_request_ftp_job.cc",
173 "url_request/url_request_ftp_job.h",
177 if (enable_built_in_dns) {
178 defines += [ "ENABLE_BUILT_IN_DNS" ]
181 "dns/address_sorter_posix.cc",
182 "dns/address_sorter_posix.h",
191 "cert/ct_log_verifier_nss.cc",
192 "cert/ct_objects_extractor_nss.cc",
193 "cert/jwk_serializer_nss.cc",
194 "cert/scoped_nss_types.h",
195 "cert/x509_util_nss.cc",
196 "cert/x509_util_nss.h",
197 "quic/crypto/aead_base_decrypter_nss.cc",
198 "quic/crypto/aead_base_encrypter_nss.cc",
199 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc",
200 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc",
201 "quic/crypto/chacha20_poly1305_decrypter_nss.cc",
202 "quic/crypto/chacha20_poly1305_encrypter_nss.cc",
203 "quic/crypto/channel_id_nss.cc",
204 "quic/crypto/p256_key_exchange_nss.cc",
205 "socket/nss_ssl_util.cc",
206 "socket/nss_ssl_util.h",
207 "socket/ssl_client_socket_nss.cc",
208 "socket/ssl_client_socket_nss.h",
209 "socket/ssl_server_socket_nss.cc",
210 "socket/ssl_server_socket_nss.h",
214 "cert/nss_cert_database_chromeos.cc",
215 "cert/nss_cert_database_chromeos.h",
216 "cert/nss_profile_filter_chromeos.cc",
217 "cert/nss_profile_filter_chromeos.h",
221 # These are always removed for non-Linux cases below.
223 "base/crypto_module_nss.cc",
224 "base/keygen_handler_nss.cc",
225 "cert/cert_database_nss.cc",
226 "cert/nss_cert_database.cc",
227 "cert/nss_cert_database.h",
228 "cert/x509_certificate_nss.cc",
229 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
230 "third_party/mozilla_security_manager/nsKeygenHandler.h",
231 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
232 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
233 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
234 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
238 # Always removed for !ios below.
240 "cert/cert_verify_proc_nss.cc",
241 "cert/cert_verify_proc_nss.h",
242 "cert/test_root_certs_nss.cc",
249 "base/crypto_module_openssl.cc",
250 "base/keygen_handler_openssl.cc",
251 "cert/ct_log_verifier_openssl.cc",
252 "cert/ct_objects_extractor_openssl.cc",
253 "cert/jwk_serializer_openssl.cc",
254 "cert/x509_util_openssl.cc",
255 "cert/x509_util_openssl.h",
256 "quic/crypto/aead_base_decrypter_openssl.cc",
257 "quic/crypto/aead_base_encrypter_openssl.cc",
258 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc",
259 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc",
260 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc",
261 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc",
262 "quic/crypto/channel_id_openssl.cc",
263 "quic/crypto/p256_key_exchange_openssl.cc",
264 "quic/crypto/scoped_evp_aead_ctx.cc",
265 "quic/crypto/scoped_evp_aead_ctx.h",
266 "socket/openssl_ssl_util.cc",
267 "socket/openssl_ssl_util.h",
268 "socket/ssl_client_socket_openssl.cc",
269 "socket/ssl_client_socket_openssl.h",
270 "socket/ssl_server_socket_openssl.cc",
271 "socket/ssl_server_socket_openssl.h",
272 "socket/ssl_session_cache_openssl.cc",
273 "socket/ssl_session_cache_openssl.h",
277 if (!use_openssl_certs) {
279 "base/openssl_private_key_store.h",
280 "base/openssl_private_key_store_memory.cc",
281 "cert/cert_database_openssl.cc",
282 "cert/cert_verify_proc_openssl.cc",
283 "cert/cert_verify_proc_openssl.h",
284 "cert/test_root_certs_openssl.cc",
285 "cert/x509_certificate_openssl.cc",
286 "ssl/openssl_client_key_store.cc",
287 "ssl/openssl_client_key_store.h",
291 "base/openssl_private_key_store_android.cc",
294 } else if (is_android) {
295 # Android doesn't use these even when using OpenSSL.
297 "base/openssl_private_key_store_memory.cc",
298 "cert/cert_database_openssl.cc",
299 "cert/cert_verify_proc_openssl.cc",
300 "cert/test_root_certs_openssl.cc",
305 configs += [ "//build/config/linux:gconf" ]
306 deps += [ "//build/config/linux:gio" ]
310 configs += [ "//build/config/linux:libresolv" ]
313 "base/crypto_module_nss.cc",
314 "base/keygen_handler_nss.cc",
315 "cert/cert_database_nss.cc",
316 "cert/nss_cert_database.cc",
317 "cert/nss_cert_database.h",
318 "cert/x509_certificate_nss.cc",
319 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
320 "third_party/mozilla_security_manager/nsKeygenHandler.h",
321 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
322 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
323 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
324 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
328 # These files are part of the partial implementation of NSS on iOS so
329 # keep them in that case.
331 "cert/test_root_certs_nss.cc",
338 if (!use_nss_certs) {
340 "ssl/client_cert_store_nss.cc",
341 "ssl/client_cert_store_nss.h",
344 # These files are part of the partial implementation of NSS on iOS so
345 # keep them in that case (even though use_nss_certs is not set).
347 "cert/cert_verify_proc_nss.cc",
348 "cert/cert_verify_proc_nss.h",
352 # These were already removed on non-ChromeOS.
354 "ssl/client_cert_store_chromeos.cc",
355 "ssl/client_cert_store_chromeos.h",
360 if (!enable_websockets) {
362 "socket_stream/socket_stream.cc",
363 "socket_stream/socket_stream.h",
364 "socket_stream/socket_stream_job.cc",
365 "socket_stream/socket_stream_job.h",
366 "socket_stream/socket_stream_job_manager.cc",
367 "socket_stream/socket_stream_job_manager.h",
368 "socket_stream/socket_stream_metrics.cc",
369 "socket_stream/socket_stream_metrics.h",
370 "spdy/spdy_websocket_stream.cc",
371 "spdy/spdy_websocket_stream.h",
372 "websockets/websocket_basic_handshake_stream.cc",
373 "websockets/websocket_basic_handshake_stream.h",
374 "websockets/websocket_basic_stream.cc",
375 "websockets/websocket_basic_stream.h",
376 "websockets/websocket_channel.cc",
377 "websockets/websocket_channel.h",
378 "websockets/websocket_deflate_predictor.h",
379 "websockets/websocket_deflate_predictor_impl.cc",
380 "websockets/websocket_deflate_predictor_impl.h",
381 "websockets/websocket_deflate_stream.cc",
382 "websockets/websocket_deflate_stream.h",
383 "websockets/websocket_deflater.cc",
384 "websockets/websocket_deflater.h",
385 "websockets/websocket_errors.cc",
386 "websockets/websocket_errors.h",
387 "websockets/websocket_extension.cc",
388 "websockets/websocket_extension.h",
389 "websockets/websocket_extension_parser.cc",
390 "websockets/websocket_extension_parser.h",
391 "websockets/websocket_frame.cc",
392 "websockets/websocket_frame.h",
393 "websockets/websocket_frame_parser.cc",
394 "websockets/websocket_frame_parser.h",
395 "websockets/websocket_handshake_constants.cc",
396 "websockets/websocket_handshake_constants.h",
397 "websockets/websocket_handshake_handler.cc",
398 "websockets/websocket_handshake_handler.h",
399 "websockets/websocket_handshake_request_info.cc",
400 "websockets/websocket_handshake_request_info.h",
401 "websockets/websocket_handshake_response_info.cc",
402 "websockets/websocket_handshake_response_info.h",
403 "websockets/websocket_handshake_stream_base.h",
404 "websockets/websocket_handshake_stream_create_helper.cc",
405 "websockets/websocket_handshake_stream_create_helper.h",
406 "websockets/websocket_inflater.cc",
407 "websockets/websocket_inflater.h",
408 "websockets/websocket_job.cc",
409 "websockets/websocket_job.h",
410 "websockets/websocket_mux.h",
411 "websockets/websocket_net_log_params.cc",
412 "websockets/websocket_net_log_params.h",
413 "websockets/websocket_stream.cc",
414 "websockets/websocket_stream.h",
415 "websockets/websocket_throttle.cc",
416 "websockets/websocket_throttle.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",
446 "//third_party/nss:nspr",
451 "base/winsock_init.cc",
452 "base/winsock_init.h",
453 "base/winsock_util.cc",
454 "base/winsock_util.h",
455 "proxy/proxy_resolver_winhttp.cc",
456 "proxy/proxy_resolver_winhttp.h",
462 "//third_party/nss:nspr",
466 "Foundation.framework",
467 "Security.framework",
468 "SystemConfiguration.framework",
474 # Add back some sources that were otherwise filtered out. iOS additionally
475 # doesn't set USE_NSS but needs some of the files.
476 set_sources_assignment_filter([])
478 "base/network_change_notifier_mac.cc",
479 "base/network_config_watcher_mac.cc",
480 "base/platform_mime_util_mac.mm",
481 "cert/cert_verify_proc_nss.cc",
482 "cert/cert_verify_proc_nss.h",
483 "cert/test_root_certs_nss.cc",
484 "cert/x509_util_nss.cc",
485 "cert/x509_util_nss.h",
486 "proxy/proxy_resolver_mac.cc",
487 "proxy/proxy_server_mac.cc",
491 set_sources_assignment_filter(sources_assignment_filter)
493 sources -= [ "disk_cache/blockfile/file_posix.cc" ]
498 "CFNetwork.framework",
499 "MobileCoreServices.framework",
500 "Security.framework",
501 "SystemConfiguration.framework",
507 # Add some Linux sources that were excluded by the filter, but which
509 set_sources_assignment_filter([])
511 "base/platform_mime_util_linux.cc",
512 "base/address_tracker_linux.cc",
513 "base/address_tracker_linux.h",
515 set_sources_assignment_filter(sources_assignment_filter)
517 if (!is_android_webview_build) {
518 deps += [ ":net_jni_headers" ]
520 # The net/android/keystore_openssl.cc source file needs to access an
521 # OpenSSL-internal header.
522 include_dirs = [ "//third_party/openssl" ]
526 if (use_icu_alternatives_on_android) {
532 "base/filename_util_icu.cc",
533 "base/net_string_util_icu.cc",
534 "base/net_util_icu.cc",
537 "base/net_string_util_icu_alternatives_android.cc",
538 "base/net_string_util_icu_alternatives_android.h",
543 grit("net_resources") {
544 source = "base/net_resources.grd"
547 static_library("http_server") {
549 "server/http_connection.cc",
550 "server/http_connection.h",
551 "server/http_server.cc",
552 "server/http_server.h",
553 "server/http_server_request_info.cc",
554 "server/http_server_request_info.h",
555 "server/http_server_response_info.cc",
556 "server/http_server_response_info.h",
557 "server/web_socket.cc",
558 "server/web_socket.h",
560 configs += [ "//build/config/compiler:wexit_time_destructors" ]
567 executable("dump_cache") {
569 "tools/dump_cache/cache_dumper.cc",
570 "tools/dump_cache/cache_dumper.h",
571 "tools/dump_cache/dump_cache.cc",
572 "tools/dump_cache/dump_files.cc",
573 "tools/dump_cache/dump_files.h",
574 "tools/dump_cache/simple_cache_dumper.cc",
575 "tools/dump_cache/simple_cache_dumper.h",
576 "tools/dump_cache/upgrade_win.cc",
577 "tools/dump_cache/upgrade_win.h",
578 "tools/dump_cache/url_to_filename_encoder.cc",
579 "tools/dump_cache/url_to_filename_encoder.h",
580 "tools/dump_cache/url_utilities.h",
581 "tools/dump_cache/url_utilities.cc",
584 configs += [ ":net_win_size_truncation" ]
593 source_set("test_support") {
595 "base/capturing_net_log.cc",
596 "base/capturing_net_log.h",
597 "base/load_timing_info_test_util.cc",
598 "base/load_timing_info_test_util.h",
599 "base/mock_file_stream.cc",
600 "base/mock_file_stream.h",
601 "base/test_completion_callback.cc",
602 "base/test_completion_callback.h",
603 "base/test_data_directory.cc",
604 "base/test_data_directory.h",
605 "cert/mock_cert_verifier.cc",
606 "cert/mock_cert_verifier.h",
607 "cookies/cookie_monster_store_test.cc",
608 "cookies/cookie_monster_store_test.h",
609 "cookies/cookie_store_test_callbacks.cc",
610 "cookies/cookie_store_test_callbacks.h",
611 "cookies/cookie_store_test_helpers.cc",
612 "cookies/cookie_store_test_helpers.h",
613 "disk_cache/disk_cache_test_base.cc",
614 "disk_cache/disk_cache_test_base.h",
615 "disk_cache/disk_cache_test_util.cc",
616 "disk_cache/disk_cache_test_util.h",
617 "dns/dns_test_util.cc",
618 "dns/dns_test_util.h",
619 "dns/mock_host_resolver.cc",
620 "dns/mock_host_resolver.h",
621 "dns/mock_mdns_socket_factory.cc",
622 "dns/mock_mdns_socket_factory.h",
623 "http/http_transaction_test_util.cc",
624 "http/http_transaction_test_util.h",
625 "proxy/mock_proxy_resolver.cc",
626 "proxy/mock_proxy_resolver.h",
627 "proxy/mock_proxy_script_fetcher.cc",
628 "proxy/mock_proxy_script_fetcher.h",
629 "proxy/proxy_config_service_common_unittest.cc",
630 "proxy/proxy_config_service_common_unittest.h",
631 "socket/socket_test_util.cc",
632 "socket/socket_test_util.h",
633 "test/cert_test_util.cc",
634 "test/cert_test_util.h",
635 "test/ct_test_util.cc",
636 "test/ct_test_util.h",
637 "test/embedded_test_server/embedded_test_server.cc",
638 "test/embedded_test_server/embedded_test_server.h",
639 "test/embedded_test_server/http_connection.cc",
640 "test/embedded_test_server/http_connection.h",
641 "test/embedded_test_server/http_request.cc",
642 "test/embedded_test_server/http_request.h",
643 "test/embedded_test_server/http_response.cc",
644 "test/embedded_test_server/http_response.h",
645 "test/net_test_suite.cc",
646 "test/net_test_suite.h",
647 "test/python_utils.cc",
648 "test/python_utils.h",
649 "test/spawned_test_server/base_test_server.cc",
650 "test/spawned_test_server/base_test_server.h",
651 "test/spawned_test_server/local_test_server_posix.cc",
652 "test/spawned_test_server/local_test_server_win.cc",
653 "test/spawned_test_server/local_test_server.cc",
654 "test/spawned_test_server/local_test_server.h",
655 "test/spawned_test_server/remote_test_server.cc",
656 "test/spawned_test_server/remote_test_server.h",
657 "test/spawned_test_server/spawned_test_server.h",
658 "test/spawned_test_server/spawner_communicator.cc",
659 "test/spawned_test_server/spawner_communicator.h",
660 "url_request/test_url_fetcher_factory.cc",
661 "url_request/test_url_fetcher_factory.h",
662 "url_request/url_request_test_util.cc",
663 "url_request/url_request_test_util.h",
666 configs += [ ":net_win_size_truncation" ]
670 "//base/test:test_support",
673 "//net/tools/tld_cleanup",
680 deps += [ "//third_party/nss" ]
685 "test/spawned_test_server/remote_test_server.cc",
686 "test/spawned_test_server/remote_test_server.h",
687 "test/spawned_test_server/spawner_communicator.cc",
688 "test/spawned_test_server/spawner_communicator.h",
693 deps += [ ":net_with_v8" ]
698 "dns/mock_mdns_socket_factory.cc",
699 "dns/mock_mdns_socket_factory.h",
703 forward_dependent_configs_from = deps
706 source_set("balsa") {
708 "tools/balsa/balsa_enums.h",
709 "tools/balsa/balsa_frame.cc",
710 "tools/balsa/balsa_frame.h",
711 "tools/balsa/balsa_headers.cc",
712 "tools/balsa/balsa_headers.h",
713 "tools/balsa/balsa_headers_token_utils.cc",
714 "tools/balsa/balsa_headers_token_utils.h",
715 "tools/balsa/balsa_visitor_interface.h",
716 "tools/balsa/http_message_constants.cc",
717 "tools/balsa/http_message_constants.h",
718 "tools/balsa/noop_balsa_visitor.h",
719 "tools/balsa/simple_buffer.cc",
720 "tools/balsa/simple_buffer.h",
721 "tools/balsa/split.cc",
722 "tools/balsa/split.h",
723 "tools/balsa/string_piece_utils.h",
724 "tools/quic/spdy_utils.cc",
725 "tools/quic/spdy_utils.h",
734 component("net_with_v8") {
736 "proxy/proxy_resolver_v8.cc",
737 "proxy/proxy_resolver_v8.h",
738 "proxy/proxy_resolver_v8_tracing.cc",
739 "proxy/proxy_resolver_v8_tracing.h",
740 "proxy/proxy_service_v8.cc",
741 "proxy/proxy_service_v8.h",
744 defines = [ "NET_IMPLEMENTATION" ]
746 ":net_win_size_truncation",
747 "//build/config/compiler:wexit_time_destructors",
758 forward_dependent_configs_from = [ ":net" ]
762 if (!is_ios && !is_android) {
763 executable("crash_cache") {
764 sources = [ "tools/crash_cache/crash_cache.cc" ]
765 configs += [ ":net_win_size_truncation" ]
773 executable("crl_set_dump") {
774 sources = [ "tools/crl_set_dump/crl_set_dump.cc" ]
775 configs += [ ":net_win_size_truncation" ]
782 executable("dns_fuzz_stub") {
783 sources = [ "tools/dns_fuzz_stub/dns_fuzz_stub.cc" ]
784 configs += [ ":net_win_size_truncation" ]
793 "tools/gdig/file_net_log.cc",
794 "tools/gdig/gdig.cc",
802 executable("get_server_time") {
803 sources = [ "tools/get_server_time/get_server_time.cc" ]
804 configs += [ ":net_win_size_truncation" ]
814 executable("net_watcher") {
815 sources = [ "tools/net_watcher/net_watcher.cc" ]
823 configs += [ "//build/config/linux:gconf" ]
824 deps += [ "//build/config/linux:gio" ]
829 executable("run_testserver") {
830 sources = [ "tools/testserver/run_testserver.cc" ]
832 ":net", # TODO(brettw) bug 363749: this shouldn't be necessary. It's not
833 # in the GYP build, and can be removed when the bug is fixed.
836 "//base/test:test_support",
841 executable("stress_cache") {
842 sources = [ "disk_cache/blockfile/stress_cache.cc" ]
843 configs += [ ":net_win_size_truncation" ]
851 executable("tld_cleanup") {
852 sources = [ "tools/tld_cleanup/tld_cleanup.cc" ]
853 configs += [ ":net_win_size_truncation" ]
857 "//net/tools/tld_cleanup",
863 static_library("epoll_server") {
865 "tools/epoll_server/epoll_server.cc",
866 "tools/epoll_server/epoll_server.h",
874 static_library("flip_in_mem_edsm_server_base") {
876 "tools/dump_cache/url_to_filename_encoder.cc",
877 "tools/dump_cache/url_to_filename_encoder.h",
878 "tools/dump_cache/url_utilities.h",
879 "tools/dump_cache/url_utilities.cc",
880 "tools/flip_server/acceptor_thread.h",
881 "tools/flip_server/acceptor_thread.cc",
882 "tools/flip_server/create_listener.cc",
883 "tools/flip_server/create_listener.h",
884 "tools/flip_server/constants.h",
885 "tools/flip_server/flip_config.cc",
886 "tools/flip_server/flip_config.h",
887 "tools/flip_server/http_interface.cc",
888 "tools/flip_server/http_interface.h",
889 "tools/flip_server/loadtime_measurement.h",
890 "tools/flip_server/mem_cache.h",
891 "tools/flip_server/mem_cache.cc",
892 "tools/flip_server/output_ordering.cc",
893 "tools/flip_server/output_ordering.h",
894 "tools/flip_server/ring_buffer.cc",
895 "tools/flip_server/ring_buffer.h",
896 "tools/flip_server/sm_connection.cc",
897 "tools/flip_server/sm_connection.h",
898 "tools/flip_server/sm_interface.h",
899 "tools/flip_server/spdy_ssl.cc",
900 "tools/flip_server/spdy_ssl.h",
901 "tools/flip_server/spdy_interface.cc",
902 "tools/flip_server/spdy_interface.h",
903 "tools/flip_server/spdy_util.cc",
904 "tools/flip_server/spdy_util.h",
905 "tools/flip_server/streamer_interface.cc",
906 "tools/flip_server/streamer_interface.h",
913 "//third_party/openssl",
917 executable("flip_in_mem_edsm_server_unittests") {
919 "tools/flip_server/flip_test_utils.cc",
920 "tools/flip_server/flip_test_utils.h",
921 "tools/flip_server/http_interface_test.cc",
922 "tools/flip_server/mem_cache_test.cc",
923 "tools/flip_server/run_all_tests.cc",
924 "tools/flip_server/spdy_interface_test.cc",
927 ":flip_in_mem_edsm_server_base",
932 "//third_party/openssl",
936 executable("flip_in_mem_edsm_server") {
937 sources = [ "tools/flip_server/flip_in_mem_edsm_server.cc" ]
939 ":flip_in_mem_edsm_server_base",
945 source_set("quic_base") {
947 "tools/quic/quic_client.cc",
948 "tools/quic/quic_client.h",
949 "tools/quic/quic_client_session.cc",
950 "tools/quic/quic_client_session.h",
951 "tools/quic/quic_default_packet_writer.cc",
952 "tools/quic/quic_default_packet_writer.h",
953 "tools/quic/quic_dispatcher.h",
954 "tools/quic/quic_dispatcher.cc",
955 "tools/quic/quic_epoll_clock.cc",
956 "tools/quic/quic_epoll_clock.h",
957 "tools/quic/quic_epoll_connection_helper.cc",
958 "tools/quic/quic_epoll_connection_helper.h",
959 "tools/quic/quic_in_memory_cache.cc",
960 "tools/quic/quic_in_memory_cache.h",
961 "tools/quic/quic_packet_writer_wrapper.cc",
962 "tools/quic/quic_packet_writer_wrapper.h",
963 "tools/quic/quic_server.cc",
964 "tools/quic/quic_server.h",
965 "tools/quic/quic_server_session.cc",
966 "tools/quic/quic_server_session.h",
967 "tools/quic/quic_socket_utils.cc",
968 "tools/quic/quic_socket_utils.h",
969 "tools/quic/quic_spdy_client_stream.cc",
970 "tools/quic/quic_spdy_client_stream.h",
971 "tools/quic/quic_spdy_server_stream.cc",
972 "tools/quic/quic_spdy_server_stream.h",
973 "tools/quic/quic_time_wait_list_manager.h",
974 "tools/quic/quic_time_wait_list_manager.cc",
981 "//base/third_party/dynamic_annotations",
983 "//third_party/openssl",
988 executable("quic_client") {
989 sources = [ "tools/quic/quic_client_bin.cc" ]
994 "//third_party/openssl",
1000 generate_jni("net_jni_headers") {
1002 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1003 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1004 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
1005 "android/java/src/org/chromium/net/AndroidPrivateKey.java",
1006 "android/java/src/org/chromium/net/GURLUtils.java",
1007 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1008 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1009 "android/java/src/org/chromium/net/X509Util.java",
1015 if (is_android || is_linux) {
1016 executable("disk_cache_memory_test") {
1017 sources = [ "tools/disk_cache_memory_test/disk_cache_memory_test.cc" ]
1025 # TODO(GYP) make this compile on Android, we need some native test deps done.
1028 source_set("quic_tools") {
1030 "quic/quic_dispatcher.cc",
1031 "quic/quic_dispatcher.h",
1032 "quic/quic_in_memory_cache.cc",
1033 "quic/quic_in_memory_cache.h",
1034 "quic/quic_per_connection_packet_writer.cc",
1035 "quic/quic_per_connection_packet_writer.h",
1036 "quic/quic_server.cc",
1037 "quic/quic_server.h",
1038 "quic/quic_server_packet_writer.cc",
1039 "quic/quic_server_packet_writer.h",
1040 "quic/quic_server_session.cc",
1041 "quic/quic_server_session.h",
1042 "quic/quic_spdy_server_stream.cc",
1043 "quic/quic_spdy_server_stream.h",
1044 "quic/quic_time_wait_list_manager.cc",
1045 "quic/quic_time_wait_list_manager.h",
1050 "//base/third_party/dynamic_annotations",
1055 test("net_unittests") {
1056 sources = gypi_values.net_test_sources
1058 configs += [ ":net_win_size_truncation" ]
1069 "//base/third_party/dynamic_annotations",
1071 "//crypto:platform",
1072 "//net/base/registry_controlled_domains",
1075 "//third_party/zlib",
1080 sources += gypi_values.net_linux_test_sources
1084 ":flip_in_mem_edsm_server_base",
1091 "base/network_change_notifier_linux_unittest.cc",
1092 "proxy/proxy_config_service_linux_unittest.cc",
1098 # See bug http://crbug.com/344533.
1099 "disk_cache/blockfile/index_table_v3_unittest.cc",
1100 # No res_ninit() et al on Android, so this doesn't make a lot of
1102 "dns/dns_config_service_posix_unittest.cc",
1105 ":net_javatests", # FIXME(brettw)
1106 ":net_test_jni_headers",
1110 if (!use_nss_certs) {
1112 "ssl/client_cert_store_nss_unittest.cc",
1114 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
1116 "ssl/client_cert_store_chromeos_unittest.cc",
1122 # When building for OpenSSL, we need to exclude NSS specific tests
1123 # or functionality not supported by OpenSSL yet.
1124 # TODO(bulach): Add equivalent tests when the underlying
1125 # functionality is ported to OpenSSL.
1127 "cert/ct_objects_extractor_unittest.cc",
1128 "cert/multi_log_ct_verifier_unittest.cc",
1129 "cert/nss_cert_database_unittest.cc",
1130 "cert/nss_cert_database_chromeos_unittest.cc",
1131 "cert/nss_profile_filter_chromeos_unittest.cc",
1132 "cert/x509_util_nss_unittest.cc",
1133 "quic/test_tools/crypto_test_utils_nss.cc",
1137 "cert/x509_util_openssl_unittest.cc",
1138 "quic/test_tools/crypto_test_utils_openssl.cc",
1139 "socket/ssl_client_socket_openssl_unittest.cc",
1140 "socket/ssl_session_cache_openssl_unittest.cc",
1142 if (!is_desktop_linux && !is_chromeos) {
1143 sources -= [ "cert/nss_cert_database_unittest.cc" ]
1148 defines += [ "USE_KERBEROS" ]
1151 "http/http_auth_gssapi_posix_unittest.cc",
1152 "http/http_auth_handler_negotiate_unittest.cc",
1153 "http/mock_gssapi_library_posix.cc",
1154 "http/mock_gssapi_library_posix.h",
1158 if (use_openssl || (!is_desktop_linux && !is_chromeos && !is_ios)) {
1159 # Only include this test when on Posix and using NSS for
1160 # cert verification or on iOS (which also uses NSS for certs).
1161 sources -= [ "ocsp/nss_ocsp_unittest.cc" ]
1164 if (!use_openssl_certs) {
1165 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1168 if (!enable_websockets) {
1170 "socket_stream/socket_stream_metrics_unittest.cc",
1171 "socket_stream/socket_stream_unittest.cc",
1172 "spdy/spdy_websocket_stream_unittest.cc",
1173 "websockets/websocket_basic_stream_test.cc",
1174 "websockets/websocket_channel_test.cc",
1175 "websockets/websocket_deflate_predictor_impl_test.cc",
1176 "websockets/websocket_deflate_stream_test.cc",
1177 "websockets/websocket_deflater_test.cc",
1178 "websockets/websocket_errors_test.cc",
1179 "websockets/websocket_extension_parser_test.cc",
1180 "websockets/websocket_frame_parser_test.cc",
1181 "websockets/websocket_frame_test.cc",
1182 "websockets/websocket_handshake_handler_spdy_test.cc",
1183 "websockets/websocket_handshake_handler_test.cc",
1184 "websockets/websocket_handshake_stream_create_helper_test.cc",
1185 "websockets/websocket_inflater_test.cc",
1186 "websockets/websocket_job_test.cc",
1187 "websockets/websocket_net_log_params_test.cc",
1188 "websockets/websocket_stream_test.cc",
1189 "websockets/websocket_test_util.cc",
1190 "websockets/websocket_test_util.h",
1191 "websockets/websocket_throttle_test.cc",
1195 if (disable_file_support) {
1197 "base/directory_lister_unittest.cc",
1198 "url_request/url_request_file_job_unittest.cc",
1202 if (disable_ftp_support) {
1204 "ftp/ftp_auth_cache_unittest.cc",
1205 "ftp/ftp_ctrl_response_buffer_unittest.cc",
1206 "ftp/ftp_directory_listing_parser_ls_unittest.cc",
1207 "ftp/ftp_directory_listing_parser_netware_unittest.cc",
1208 "ftp/ftp_directory_listing_parser_os2_unittest.cc",
1209 "ftp/ftp_directory_listing_parser_unittest.cc",
1210 "ftp/ftp_directory_listing_parser_unittest.h",
1211 "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1212 "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1213 "ftp/ftp_network_transaction_unittest.cc",
1214 "ftp/ftp_util_unittest.cc",
1215 "url_request/url_request_ftp_job_unittest.cc",
1219 if (!enable_built_in_dns) {
1221 "dns/address_sorter_posix_unittest.cc",
1222 "dns/address_sorter_unittest.cc",
1226 # Always need use_v8_in_net to be 1 to run on Android, so just remove
1227 # net_unittest's dependency on v8 when using icu alternatives instead of
1228 # setting use_v8_in_net to 0.
1229 if (use_v8_in_net && !use_icu_alternatives_on_android) {
1230 deps += [ ":net_with_v8" ]
1233 "proxy/proxy_resolver_v8_unittest.cc",
1234 "proxy/proxy_resolver_v8_tracing_unittest.cc",
1240 "dns/mdns_cache_unittest.cc",
1241 "dns/mdns_client_unittest.cc",
1242 "dns/record_parsed_unittest.cc",
1243 "dns/record_rdata_unittest.cc",
1251 # 'action_name': 'copy_test_data',
1253 # 'test_data_files': [
1254 # 'data/ssl/certificates/',
1256 # 'data/url_request_unittest/',
1258 # 'test_data_prefix': 'net',
1260 # 'includes': [ '../build/copy_test_data_ios.gypi' ],
1264 # TODO(droger): The following tests are disabled because the
1265 # implementation is missing or incomplete.
1266 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1267 "base/keygen_handler_unittest.cc",
1268 "disk_cache/backend_unittest.cc",
1269 "disk_cache/blockfile/block_files_unittest.cc",
1270 # Need to read input data files.
1271 "filter/gzip_filter_unittest.cc",
1272 "socket/ssl_server_socket_unittest.cc",
1273 "spdy/fuzzing/hpack_fuzz_util_test.cc",
1275 "proxy/proxy_script_fetcher_impl_unittest.cc",
1276 "socket/ssl_client_socket_unittest.cc",
1277 "url_request/url_fetcher_impl_unittest.cc",
1278 "url_request/url_request_context_builder_unittest.cc",
1279 # Needs GetAppOutput().
1280 "test/python_utils_unittest.cc",
1282 # The following tests are disabled because they don't apply to
1284 # OS is not "linux" or "freebsd" or "openbsd".
1285 "socket/unix_domain_socket_posix_unittest.cc",
1287 # See bug http://crbug.com/344533.
1288 "disk_cache/blockfile/index_table_v3_unittest.cc",
1294 "dns/dns_config_service_posix_unittest.cc",
1297 # # TODO(mmenke): This depends on test_support_base, which depends on
1298 # # icu. Figure out a way to remove that dependency.
1300 # '../testing/android/native_test.gyp:native_test_native_code',
1303 set_sources_assignment_filter([])
1304 sources += [ "base/address_tracker_linux_unittest.cc" ]
1305 set_sources_assignment_filter(sources_assignment_filter)
1308 if (use_icu_alternatives_on_android) {
1310 "base/filename_util_unittest.cc",
1311 "base/net_util_icu_unittest.cc",
1313 deps -= [ "//base:i18n" ]
1317 executable("quic_server") {
1318 sources = [ "quic/quic_server_bin.cc" ]
1323 "//third_party/openssl",