Autofill - change presentation of credit card suggestions.
[chromium-blink-merge.git] / net / BUILD.gn
blobdba8519d7d187907e959e17664431ece042acd11
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.
13 if (!is_android) {
14   import("//tools/grit/grit_rule.gni")
17 if (is_android) {
18   import("//build/config/android/config.gni")
19   import("//build/config/android/rules.gni")
20 } else if (is_mac) {
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("//build/gypi_to_gn.py",
26                           [ rebase_path("net.gypi") ],
27                           "scope",
28                           [ "net.gypi" ])
30 # Disable Kerberos on ChromeOS, Android and iOS, at least for now. It needs
31 # configuration (krb5.conf and so on).
32 use_kerberos = !is_chromeos && !is_android && !is_ios
34 # The way the cache uses mmap() is inefficient on some Android devices. If
35 # this flag is set, we hackily avoid using mmap() in the disk cache. We are
36 # pretty confident that mmap-ing the index would not hurt any existing x86
37 # android devices, but we cannot be so sure about the variety of ARM devices.
38 # So enable it for x86 only for now.
39 posix_avoid_mmap = is_android && cpu_arch != "x86"
41 # WebSockets and socket stream code are used everywhere except iOS.
42 enable_websockets = !is_ios
43 use_v8_in_net = !is_ios
44 enable_built_in_dns = !is_ios
45 disable_ftp_support = is_ios
47 declare_args() {
48   # Disables support for file URLs.  File URL support requires use of icu.
49   disable_file_support = false
52 config("net_config") {
53   defines = []
54   if (posix_avoid_mmap) {
55     defines += [ "POSIX_AVOID_MMAP" ]
56   }
57   if (disable_file_support) {
58     defines += [ "DISABLE_FILE_SUPPORT" ]
59   }
62 # Disables Windows warning about size to int truncations.
63 # TODO(jschuh): crbug.com/167187 fix this and delete this config.
64 config("net_win_size_truncation") {
65   if (is_win) {
66     cflags = [ "/wd4267" ]
67   }
70 component("net") {
71   sources =
72       gypi_values.net_nacl_common_sources + gypi_values.net_non_nacl_sources
74   cflags = []
75   defines = [
76     # TODO(GYP) Note that he GYP file supports linux_link_kerberos (defaults to
77     # 0) which implies that we run pkg_config on kerberos and link to that
78     # rather than setting this define which will dynamically open it. That
79     # doesn't seem to be set in the regular builds, so we're skipping this
80     # capability here.
81     "DLOPEN_KERBEROS",
82     "NET_IMPLEMENTATION",
83   ]
84   configs += [ ":net_win_size_truncation" ]
85   public_configs = [ ":net_config" ]
86   include_dirs = []
88   public_deps = [
89     "//crypto",
90     "//crypto:platform",
91   ]
92   deps = [
93     ":net_resources",
94     "//base",
95     "//base:i18n",
96     "//base:prefs",
97     "//base/third_party/dynamic_annotations",
98     "//net/base/registry_controlled_domains",
99     "//sdch",
100     "//third_party/icu",
101     "//third_party/zlib",
102     "//url",
103   ]
105   if (use_kerberos) {
106     defines += [ "USE_KERBEROS" ]
107     if (is_android) {
108       include_dirs += [ "/usr/include/kerberosV" ]
109     }
110   } else {
111     sources -= [
112       "http/http_auth_gssapi_posix.cc",
113       "http/http_auth_gssapi_posix.h",
114       "http/http_auth_handler_negotiate.h",
115       "http/http_auth_handler_negotiate.cc",
116     ]
117   }
119   if (is_posix) {
120     if (posix_avoid_mmap) {
121       sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
122     } else {
123       sources -= [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
124     }
125   }
127   if (disable_file_support) {
128     sources -= [
129       "base/directory_lister.cc",
130       "base/directory_lister.h",
131       "url_request/url_request_file_dir_job.cc",
132       "url_request/url_request_file_dir_job.h",
133       "url_request/url_request_file_job.cc",
134       "url_request/url_request_file_job.h",
135       "url_request/file_protocol_handler.cc",
136       "url_request/file_protocol_handler.h",
137     ]
138   }
140   if (disable_ftp_support) {
141     sources -= [
142       "ftp/ftp_auth_cache.cc",
143       "ftp/ftp_auth_cache.h",
144       "ftp/ftp_ctrl_response_buffer.cc",
145       "ftp/ftp_ctrl_response_buffer.h",
146       "ftp/ftp_directory_listing_parser.cc",
147       "ftp/ftp_directory_listing_parser.h",
148       "ftp/ftp_directory_listing_parser_ls.cc",
149       "ftp/ftp_directory_listing_parser_ls.h",
150       "ftp/ftp_directory_listing_parser_netware.cc",
151       "ftp/ftp_directory_listing_parser_netware.h",
152       "ftp/ftp_directory_listing_parser_os2.cc",
153       "ftp/ftp_directory_listing_parser_os2.h",
154       "ftp/ftp_directory_listing_parser_vms.cc",
155       "ftp/ftp_directory_listing_parser_vms.h",
156       "ftp/ftp_directory_listing_parser_windows.cc",
157       "ftp/ftp_directory_listing_parser_windows.h",
158       "ftp/ftp_network_layer.cc",
159       "ftp/ftp_network_layer.h",
160       "ftp/ftp_network_session.cc",
161       "ftp/ftp_network_session.h",
162       "ftp/ftp_network_transaction.cc",
163       "ftp/ftp_network_transaction.h",
164       "ftp/ftp_request_info.h",
165       "ftp/ftp_response_info.cc",
166       "ftp/ftp_response_info.h",
167       "ftp/ftp_server_type_histograms.cc",
168       "ftp/ftp_server_type_histograms.h",
169       "ftp/ftp_transaction.h",
170       "ftp/ftp_transaction_factory.h",
171       "ftp/ftp_util.cc",
172       "ftp/ftp_util.h",
173       "url_request/ftp_protocol_handler.cc",
174       "url_request/ftp_protocol_handler.h",
175       "url_request/url_request_ftp_job.cc",
176       "url_request/url_request_ftp_job.h",
177     ]
178   }
180   if (enable_built_in_dns) {
181     defines += [ "ENABLE_BUILT_IN_DNS" ]
182   } else {
183     sources -= [
184       "dns/address_sorter_posix.cc",
185       "dns/address_sorter_posix.h",
186       "dns/dns_client.cc",
187     ]
188   }
190   if (use_openssl) {
191     sources -= [
192       "base/nss_memio.c",
193       "base/nss_memio.h",
194       "cert/ct_log_verifier_nss.cc",
195       "cert/ct_objects_extractor_nss.cc",
196       "cert/jwk_serializer_nss.cc",
197       "cert/scoped_nss_types.h",
198       "cert/test_root_certs_nss.cc",
199       "cert/x509_util_nss.cc",
200       "cert/x509_util_nss.h",
201       "ocsp/nss_ocsp.cc",
202       "ocsp/nss_ocsp.h",
203       "quic/crypto/aead_base_decrypter_nss.cc",
204       "quic/crypto/aead_base_encrypter_nss.cc",
205       "quic/crypto/aes_128_gcm_12_decrypter_nss.cc",
206       "quic/crypto/aes_128_gcm_12_encrypter_nss.cc",
207       "quic/crypto/chacha20_poly1305_decrypter_nss.cc",
208       "quic/crypto/chacha20_poly1305_encrypter_nss.cc",
209       "quic/crypto/channel_id_nss.cc",
210       "quic/crypto/p256_key_exchange_nss.cc",
211       "socket/nss_ssl_util.cc",
212       "socket/nss_ssl_util.h",
213       "socket/ssl_client_socket_nss.cc",
214       "socket/ssl_client_socket_nss.h",
215       "socket/ssl_server_socket_nss.cc",
216       "socket/ssl_server_socket_nss.h",
217     ]
218     if (is_chromeos) {
219       sources -= [
220         "cert/nss_cert_database_chromeos.cc",
221         "cert/nss_cert_database_chromeos.h",
222         "cert/nss_profile_filter_chromeos.cc",
223         "cert/nss_profile_filter_chromeos.h",
224       ]
225     }
226     if (is_linux) {
227       # These are always removed for non-Linux cases below.
228       sources -= [
229         "base/crypto_module_nss.cc",
230         "base/keygen_handler_nss.cc",
231         "cert/cert_database_nss.cc",
232         "cert/nss_cert_database.cc",
233         "cert/nss_cert_database.h",
234         "cert/x509_certificate_nss.cc",
235         "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
236         "third_party/mozilla_security_manager/nsKeygenHandler.h",
237         "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
238         "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
239         "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
240         "third_party/mozilla_security_manager/nsPKCS12Blob.h",
241       ]
242     }
243     if (is_ios) {
244       # Always removed for !ios below.
245       sources -= [
246         "cert/cert_verify_proc_nss.cc",
247         "cert/cert_verify_proc_nss.h",
248       ]
249     }
250     if (is_win) {
251       sources -= [ "cert/sha256_legacy_support_nss_win.cc" ]
252     }
253   } else {
254     sources -= [
255       "base/crypto_module_openssl.cc",
256       "cert/ct_log_verifier_openssl.cc",
257       "cert/ct_objects_extractor_openssl.cc",
258       "cert/jwk_serializer_openssl.cc",
259       "cert/x509_util_openssl.cc",
260       "cert/x509_util_openssl.h",
261       "quic/crypto/aead_base_decrypter_openssl.cc",
262       "quic/crypto/aead_base_encrypter_openssl.cc",
263       "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc",
264       "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc",
265       "quic/crypto/chacha20_poly1305_decrypter_openssl.cc",
266       "quic/crypto/chacha20_poly1305_encrypter_openssl.cc",
267       "quic/crypto/channel_id_openssl.cc",
268       "quic/crypto/p256_key_exchange_openssl.cc",
269       "quic/crypto/scoped_evp_aead_ctx.cc",
270       "quic/crypto/scoped_evp_aead_ctx.h",
271       "socket/ssl_client_socket_openssl.cc",
272       "socket/ssl_client_socket_openssl.h",
273       "socket/ssl_server_socket_openssl.cc",
274       "socket/ssl_server_socket_openssl.h",
275       "socket/ssl_session_cache_openssl.cc",
276       "socket/ssl_session_cache_openssl.h",
277       "ssl/openssl_platform_key.h",
278       "ssl/openssl_ssl_util.cc",
279       "ssl/openssl_ssl_util.h",
280     ]
281     if (is_mac) {
282       sources -= [ "ssl/openssl_platform_key_mac.cc" ]
283     }
284     if (is_win) {
285       sources -= [
286         "cert/sha256_legacy_support_openssl_win.cc",
287         "ssl/openssl_platform_key_win.cc",
288       ]
289     }
290   }
292   if (!use_openssl_certs) {
293     sources -= [
294       "base/keygen_handler_openssl.cc",
295       "base/openssl_private_key_store.h",
296       "base/openssl_private_key_store_memory.cc",
297       "cert/cert_database_openssl.cc",
298       "cert/cert_verify_proc_openssl.cc",
299       "cert/cert_verify_proc_openssl.h",
300       "cert/test_root_certs_openssl.cc",
301       "cert/x509_certificate_openssl.cc",
302       "ssl/openssl_client_key_store.cc",
303       "ssl/openssl_client_key_store.h",
304     ]
305     if (is_android) {
306       sources -= [ "base/openssl_private_key_store_android.cc" ]
307     }
308   } else if (is_android) {
309     # Android doesn't use these even when using OpenSSL.
310     sources -= [
311       "base/openssl_private_key_store_memory.cc",
312       "cert/cert_database_openssl.cc",
313       "cert/cert_verify_proc_openssl.cc",
314       "cert/test_root_certs_openssl.cc",
315     ]
316   }
318   if (use_glib && !is_chromeos) {
319     configs += [ "//build/config/linux:gconf" ]
320     deps += [ "//build/config/linux:gio" ]
321   }
323   if (is_linux) {
324     configs += [ "//build/config/linux:libresolv" ]
325   } else {
326     sources -= [
327       "base/crypto_module_nss.cc",
328       "base/keygen_handler_nss.cc",
329       "cert/cert_database_nss.cc",
330       "cert/nss_cert_database.cc",
331       "cert/nss_cert_database.h",
332       "cert/x509_certificate_nss.cc",
333       "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
334       "third_party/mozilla_security_manager/nsKeygenHandler.h",
335       "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
336       "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
337       "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
338       "third_party/mozilla_security_manager/nsPKCS12Blob.h",
339     ]
341     if (!is_ios && !use_openssl) {
342       # These files are part of the partial implementation of NSS on iOS so
343       # keep them in that case.
344       sources -= [
345         "cert/test_root_certs_nss.cc",
346         "ocsp/nss_ocsp.cc",
347         "ocsp/nss_ocsp.h",
348       ]
349     }
350   }
352   if (!use_nss_certs) {
353     sources -= [
354       "ssl/client_cert_store_nss.cc",
355       "ssl/client_cert_store_nss.h",
356     ]
357     if (!is_ios) {
358       # These files are part of the partial implementation of NSS on iOS so
359       # keep them in that case (even though use_nss_certs is not set).
360       sources -= [
361         "cert/cert_verify_proc_nss.cc",
362         "cert/cert_verify_proc_nss.h",
363       ]
364     }
365     if (is_chromeos) {
366       # These were already removed on non-ChromeOS.
367       sources -= [
368         "ssl/client_cert_store_chromeos.cc",
369         "ssl/client_cert_store_chromeos.h",
370       ]
371     }
372   }
374   if (!enable_websockets) {
375     sources -= [
376       "websockets/websocket_basic_handshake_stream.cc",
377       "websockets/websocket_basic_handshake_stream.h",
378       "websockets/websocket_basic_stream.cc",
379       "websockets/websocket_basic_stream.h",
380       "websockets/websocket_channel.cc",
381       "websockets/websocket_channel.h",
382       "websockets/websocket_deflate_predictor.h",
383       "websockets/websocket_deflate_predictor_impl.cc",
384       "websockets/websocket_deflate_predictor_impl.h",
385       "websockets/websocket_deflate_stream.cc",
386       "websockets/websocket_deflate_stream.h",
387       "websockets/websocket_deflater.cc",
388       "websockets/websocket_deflater.h",
389       "websockets/websocket_errors.cc",
390       "websockets/websocket_errors.h",
391       "websockets/websocket_extension.cc",
392       "websockets/websocket_extension.h",
393       "websockets/websocket_extension_parser.cc",
394       "websockets/websocket_extension_parser.h",
395       "websockets/websocket_frame.cc",
396       "websockets/websocket_frame.h",
397       "websockets/websocket_frame_parser.cc",
398       "websockets/websocket_frame_parser.h",
399       "websockets/websocket_handshake_constants.cc",
400       "websockets/websocket_handshake_constants.h",
401       "websockets/websocket_handshake_challenge.cc",
402       "websockets/websocket_handshake_challenge.h",
403       "websockets/websocket_handshake_request_info.cc",
404       "websockets/websocket_handshake_request_info.h",
405       "websockets/websocket_handshake_response_info.cc",
406       "websockets/websocket_handshake_response_info.h",
407       "websockets/websocket_handshake_stream_base.h",
408       "websockets/websocket_handshake_stream_create_helper.cc",
409       "websockets/websocket_handshake_stream_create_helper.h",
410       "websockets/websocket_inflater.cc",
411       "websockets/websocket_inflater.h",
412       "websockets/websocket_mux.h",
413       "websockets/websocket_stream.cc",
414       "websockets/websocket_stream.h",
415     ]
416   }
418   if (!enable_mdns) {
419     sources -= [
420       "dns/mdns_cache.cc",
421       "dns/mdns_cache.h",
422       "dns/mdns_client.cc",
423       "dns/mdns_client.h",
424       "dns/mdns_client_impl.cc",
425       "dns/mdns_client_impl.h",
426       "dns/record_parsed.cc",
427       "dns/record_parsed.h",
428       "dns/record_rdata.cc",
429       "dns/record_rdata.h",
430     ]
431   }
433   if (is_win) {
434     sources -= [
435       "http/http_auth_handler_ntlm_portable.cc",
436       "socket/socket_libevent.cc",
437       "socket/socket_libevent.h",
438       "socket/tcp_socket_libevent.cc",
439       "socket/tcp_socket_libevent.h",
440       "udp/udp_socket_libevent.cc",
441       "udp/udp_socket_libevent.h",
442     ]
443   } else {  # !is_win
444     sources -= [
445       "base/winsock_init.cc",
446       "base/winsock_init.h",
447       "base/winsock_util.cc",
448       "base/winsock_util.h",
449       "proxy/proxy_resolver_winhttp.cc",
450       "proxy/proxy_resolver_winhttp.h",
451     ]
452   }
454   if (is_mac) {
455     libs = [
456       "Foundation.framework",
457       "Security.framework",
458       "SystemConfiguration.framework",
459       "resolv",
460     ]
461   }
463   if (is_ios) {
464     # Add back some sources that were otherwise filtered out. iOS additionally
465     # doesn't set USE_NSS but needs some of the files.
466     set_sources_assignment_filter([])
467     sources += [
468       "base/net_util_mac.cc",
469       "base/net_util_mac.h",
470       "base/network_change_notifier_mac.cc",
471       "base/network_config_watcher_mac.cc",
472       "base/platform_mime_util_mac.mm",
473       "cert/cert_verify_proc_nss.cc",
474       "cert/cert_verify_proc_nss.h",
475       "cert/test_root_certs_nss.cc",
476       "cert/x509_util_nss.cc",
477       "cert/x509_util_nss.h",
478       "proxy/proxy_resolver_mac.cc",
479       "proxy/proxy_server_mac.cc",
480       "ocsp/nss_ocsp.cc",
481       "ocsp/nss_ocsp.h",
482     ]
483     set_sources_assignment_filter(sources_assignment_filter)
485     sources -= [ "disk_cache/blockfile/file_posix.cc" ]
486     libs = [
487       "CFNetwork.framework",
488       "MobileCoreServices.framework",
489       "Security.framework",
490       "SystemConfiguration.framework",
491       "resolv",
492     ]
493   }
495   if (is_ios || is_mac) {
496     sources += gypi_values.net_base_mac_ios_sources
497   }
499   if (is_android) {
500     # Add some Linux sources that were excluded by the filter, but which
501     # are needed.
502     set_sources_assignment_filter([])
503     sources += [
504       "base/platform_mime_util_linux.cc",
505       "base/address_tracker_linux.cc",
506       "base/address_tracker_linux.h",
507       "base/net_util_linux.cc",
508       "base/net_util_linux.h",
509     ]
510     set_sources_assignment_filter(sources_assignment_filter)
512     if (!is_android_webview_build) {
513       deps += [ ":net_jni_headers" ]
514     }
515   }
517   if (use_icu_alternatives_on_android) {
518     deps -= [
519       "//base:i18n",
520       "//third_party/icu",
521     ]
522     sources -= [
523       "base/filename_util_icu.cc",
524       "base/net_string_util_icu.cc",
525       "base/net_util_icu.cc",
526     ]
527     sources += [
528       "base/net_string_util_icu_alternatives_android.cc",
529       "base/net_string_util_icu_alternatives_android.h",
530     ]
531   }
534 grit("net_resources") {
535   source = "base/net_resources.grd"
536   use_qualified_include = true
537   outputs = [
538     "grit/net_resources.h",
539     "net_resources.pak",
540     "net_resources.rc",
541   ]
544 static_library("extras") {
545   sources = gypi_values.net_extras_sources
546   configs += [ "//build/config/compiler:wexit_time_destructors" ]
547   deps = [
548     ":net",
549     "//sql:sql",
550   ]
553 static_library("http_server") {
554   sources = [
555     "server/http_connection.cc",
556     "server/http_connection.h",
557     "server/http_server.cc",
558     "server/http_server.h",
559     "server/http_server_request_info.cc",
560     "server/http_server_request_info.h",
561     "server/http_server_response_info.cc",
562     "server/http_server_response_info.h",
563     "server/web_socket.cc",
564     "server/web_socket.h",
565     "server/web_socket_encoder.cc",
566     "server/web_socket_encoder.h",
567   ]
568   configs += [
569     "//build/config/compiler:wexit_time_destructors",
570     ":net_win_size_truncation",
571   ]
572   deps = [
573     ":net",
574     "//base",
575   ]
578 executable("dump_cache") {
579   testonly = true
580   sources = [
581     "tools/dump_cache/cache_dumper.cc",
582     "tools/dump_cache/cache_dumper.h",
583     "tools/dump_cache/dump_cache.cc",
584     "tools/dump_cache/dump_files.cc",
585     "tools/dump_cache/dump_files.h",
586     "tools/dump_cache/simple_cache_dumper.cc",
587     "tools/dump_cache/simple_cache_dumper.h",
588     "tools/dump_cache/url_to_filename_encoder.cc",
589     "tools/dump_cache/url_to_filename_encoder.h",
590     "tools/dump_cache/url_utilities.h",
591     "tools/dump_cache/url_utilities.cc",
592   ]
594   configs += [ ":net_win_size_truncation" ]
596   deps = [
597     "//base",
598     ":net",
599     ":test_support",
600   ]
603 source_set("test_support") {
604   testonly = true
605   sources = [
606     "base/captured_net_log_entry.cc",
607     "base/captured_net_log_entry.h",
608     "base/capturing_net_log.cc",
609     "base/capturing_net_log.h",
610     "base/capturing_net_log_observer.cc",
611     "base/capturing_net_log_observer.h",
612     "base/load_timing_info_test_util.cc",
613     "base/load_timing_info_test_util.h",
614     "base/mock_file_stream.cc",
615     "base/mock_file_stream.h",
616     "base/test_completion_callback.cc",
617     "base/test_completion_callback.h",
618     "base/test_data_directory.cc",
619     "base/test_data_directory.h",
620     "cert/mock_cert_verifier.cc",
621     "cert/mock_cert_verifier.h",
622     "cookies/cookie_monster_store_test.cc",
623     "cookies/cookie_monster_store_test.h",
624     "cookies/cookie_store_test_callbacks.cc",
625     "cookies/cookie_store_test_callbacks.h",
626     "cookies/cookie_store_test_helpers.cc",
627     "cookies/cookie_store_test_helpers.h",
628     "disk_cache/disk_cache_test_base.cc",
629     "disk_cache/disk_cache_test_base.h",
630     "disk_cache/disk_cache_test_util.cc",
631     "disk_cache/disk_cache_test_util.h",
632     "dns/dns_test_util.cc",
633     "dns/dns_test_util.h",
634     "dns/mock_host_resolver.cc",
635     "dns/mock_host_resolver.h",
636     "dns/mock_mdns_socket_factory.cc",
637     "dns/mock_mdns_socket_factory.h",
638     "http/http_transaction_test_util.cc",
639     "http/http_transaction_test_util.h",
640     "proxy/mock_proxy_resolver.cc",
641     "proxy/mock_proxy_resolver.h",
642     "proxy/mock_proxy_script_fetcher.cc",
643     "proxy/mock_proxy_script_fetcher.h",
644     "proxy/proxy_config_service_common_unittest.cc",
645     "proxy/proxy_config_service_common_unittest.h",
646     "socket/socket_test_util.cc",
647     "socket/socket_test_util.h",
648     "test/cert_test_util.cc",
649     "test/cert_test_util.h",
650     "test/cert_test_util_nss.cc",
651     "test/ct_test_util.cc",
652     "test/ct_test_util.h",
653     "test/embedded_test_server/embedded_test_server.cc",
654     "test/embedded_test_server/embedded_test_server.h",
655     "test/embedded_test_server/http_connection.cc",
656     "test/embedded_test_server/http_connection.h",
657     "test/embedded_test_server/http_request.cc",
658     "test/embedded_test_server/http_request.h",
659     "test/embedded_test_server/http_response.cc",
660     "test/embedded_test_server/http_response.h",
661     "test/net_test_suite.cc",
662     "test/net_test_suite.h",
663     "test/python_utils.cc",
664     "test/python_utils.h",
665     "test/spawned_test_server/base_test_server.cc",
666     "test/spawned_test_server/base_test_server.h",
667     "test/spawned_test_server/local_test_server_posix.cc",
668     "test/spawned_test_server/local_test_server_win.cc",
669     "test/spawned_test_server/local_test_server.cc",
670     "test/spawned_test_server/local_test_server.h",
671     "test/spawned_test_server/remote_test_server.cc",
672     "test/spawned_test_server/remote_test_server.h",
673     "test/spawned_test_server/spawned_test_server.h",
674     "test/spawned_test_server/spawner_communicator.cc",
675     "test/spawned_test_server/spawner_communicator.h",
676     "test/url_request/url_request_failed_job.cc",
677     "test/url_request/url_request_failed_job.h",
678     "test/url_request/url_request_mock_data_job.cc",
679     "test/url_request/url_request_mock_data_job.h",
680     "test/url_request/url_request_mock_http_job.cc",
681     "test/url_request/url_request_mock_http_job.h",
682     "url_request/test_url_fetcher_factory.cc",
683     "url_request/test_url_fetcher_factory.h",
684     "url_request/test_url_request_interceptor.cc",
685     "url_request/test_url_request_interceptor.h",
686     "url_request/url_request_test_util.cc",
687     "url_request/url_request_test_util.h",
688   ]
690   configs += [ ":net_win_size_truncation" ]
692   public_deps = [
693     "//base",
694     "//base/test:test_support",
695     "//crypto",
696     "//net",
697     "//net/tools/tld_cleanup",
698     "//testing/gmock",
699     "//testing/gtest",
700     "//url",
701   ]
703   if (!use_openssl && (use_nss_certs || is_ios)) {
704     public_deps += [ "//crypto:platform" ]
705   }
707   if (!is_android) {
708     sources -= [
709       "test/spawned_test_server/remote_test_server.cc",
710       "test/spawned_test_server/remote_test_server.h",
711       "test/spawned_test_server/spawner_communicator.cc",
712       "test/spawned_test_server/spawner_communicator.h",
713     ]
714   }
716   if (use_v8_in_net) {
717     public_deps += [ ":net_with_v8" ]
718   }
720   if (!enable_mdns) {
721     sources -= [
722       "dns/mock_mdns_socket_factory.cc",
723       "dns/mock_mdns_socket_factory.h",
724     ]
725   }
727   if (!use_nss_certs) {
728     sources -= [ "test/cert_test_util_nss.cc" ]
729   }
732 source_set("balsa") {
733   sources = [
734     "tools/balsa/balsa_enums.h",
735     "tools/balsa/balsa_frame.cc",
736     "tools/balsa/balsa_frame.h",
737     "tools/balsa/balsa_headers.cc",
738     "tools/balsa/balsa_headers.h",
739     "tools/balsa/balsa_headers_token_utils.cc",
740     "tools/balsa/balsa_headers_token_utils.h",
741     "tools/balsa/balsa_visitor_interface.h",
742     "tools/balsa/http_message_constants.cc",
743     "tools/balsa/http_message_constants.h",
744     "tools/balsa/noop_balsa_visitor.h",
745     "tools/balsa/simple_buffer.cc",
746     "tools/balsa/simple_buffer.h",
747     "tools/balsa/split.cc",
748     "tools/balsa/split.h",
749     "tools/balsa/string_piece_utils.h",
750     "tools/quic/spdy_utils.cc",
751     "tools/quic/spdy_utils.h",
752   ]
753   deps = [
754     ":net",
755     "//base",
756     "//url",
757   ]
760 if (use_v8_in_net) {
761   component("net_with_v8") {
762     sources = [
763       "proxy/proxy_resolver_v8.cc",
764       "proxy/proxy_resolver_v8.h",
765       "proxy/proxy_resolver_v8_tracing.cc",
766       "proxy/proxy_resolver_v8_tracing.h",
767       "proxy/proxy_service_v8.cc",
768       "proxy/proxy_service_v8.h",
769     ]
771     defines = [ "NET_IMPLEMENTATION" ]
772     configs += [
773       ":net_win_size_truncation",
774       "//build/config/compiler:wexit_time_destructors",
775     ]
777     public_deps = [
778       ":net",
779     ]
780     deps = [
781       "//base",
782       "//gin",
783       "//url",
784       "//v8",
785     ]
786   }
789 if (!is_ios && !is_android) {
790   executable("crash_cache") {
791     testonly = true
792     sources = [
793       "tools/crash_cache/crash_cache.cc",
794     ]
795     configs += [ ":net_win_size_truncation" ]
796     deps = [
797       ":net",
798       ":test_support",
799       "//base",
800     ]
801   }
803   executable("crl_set_dump") {
804     testonly = true
805     sources = [
806       "tools/crl_set_dump/crl_set_dump.cc",
807     ]
808     configs += [ ":net_win_size_truncation" ]
809     deps = [
810       ":net",
811       "//base",
812     ]
813   }
815   executable("dns_fuzz_stub") {
816     testonly = true
817     sources = [
818       "tools/dns_fuzz_stub/dns_fuzz_stub.cc",
819     ]
820     configs += [ ":net_win_size_truncation" ]
821     deps = [
822       ":net",
823       "//base",
824     ]
825   }
827   executable("gdig") {
828     testonly = true
829     sources = [
830       "tools/gdig/file_net_log.cc",
831       "tools/gdig/gdig.cc",
832     ]
833     deps = [
834       ":net",
835       "//base",
836     ]
837   }
839   executable("get_server_time") {
840     testonly = true
841     sources = [
842       "tools/get_server_time/get_server_time.cc",
843     ]
844     configs += [ ":net_win_size_truncation" ]
845     deps = [
846       ":net",
847       "//base",
848       "//base:i18n",
849       "//url",
850     ]
851   }
853   if (use_v8_in_net) {
854     executable("net_watcher") {
855       testonly = true
856       sources = [
857         "tools/net_watcher/net_watcher.cc",
858       ]
859       deps = [
860         ":net",
861         ":net_with_v8",
862         "//base",
863       ]
865       if (is_desktop_linux) {
866         configs += [
867           "//build/config/linux:gconf",
868           "//build/config/linux:glib",
869         ]
870         deps += [ "//build/config/linux:gio" ]
871       }
872     }
873   }
875   executable("run_testserver") {
876     testonly = true
877     sources = [
878       "tools/testserver/run_testserver.cc",
879     ]
880     deps = [
881       ":net",  # TODO(brettw) bug 363749: this shouldn't be necessary. It's not
882                # in the GYP build, and can be removed when the bug is fixed.
883       ":test_support",
884       "//base",
885       "//base/test:test_support",
886       "//testing/gtest",
887     ]
888   }
890   executable("stress_cache") {
891     testonly = true
892     sources = [
893       "disk_cache/blockfile/stress_cache.cc",
894     ]
895     configs += [ ":net_win_size_truncation" ]
896     deps = [
897       ":net",
898       ":test_support",
899       "//base",
900     ]
901   }
903   executable("tld_cleanup") {
904     sources = [
905       "tools/tld_cleanup/tld_cleanup.cc",
906     ]
907     configs += [ ":net_win_size_truncation" ]
908     deps = [
909       "//base",
910       "//base:i18n",
911       "//net/tools/tld_cleanup",
912     ]
913   }
916 if (is_linux) {
917   static_library("epoll_server") {
918     sources = [
919       "tools/epoll_server/epoll_server.cc",
920       "tools/epoll_server/epoll_server.h",
921     ]
922     deps = [
923       ":net",
924       "//base",
925     ]
926   }
928   static_library("flip_in_mem_edsm_server_base") {
929     testonly = true
930     sources = [
931       "tools/dump_cache/url_to_filename_encoder.cc",
932       "tools/dump_cache/url_to_filename_encoder.h",
933       "tools/dump_cache/url_utilities.h",
934       "tools/dump_cache/url_utilities.cc",
935       "tools/flip_server/acceptor_thread.h",
936       "tools/flip_server/acceptor_thread.cc",
937       "tools/flip_server/create_listener.cc",
938       "tools/flip_server/create_listener.h",
939       "tools/flip_server/constants.h",
940       "tools/flip_server/flip_config.cc",
941       "tools/flip_server/flip_config.h",
942       "tools/flip_server/http_interface.cc",
943       "tools/flip_server/http_interface.h",
944       "tools/flip_server/loadtime_measurement.h",
945       "tools/flip_server/mem_cache.h",
946       "tools/flip_server/mem_cache.cc",
947       "tools/flip_server/output_ordering.cc",
948       "tools/flip_server/output_ordering.h",
949       "tools/flip_server/ring_buffer.cc",
950       "tools/flip_server/ring_buffer.h",
951       "tools/flip_server/sm_connection.cc",
952       "tools/flip_server/sm_connection.h",
953       "tools/flip_server/sm_interface.h",
954       "tools/flip_server/spdy_ssl.cc",
955       "tools/flip_server/spdy_ssl.h",
956       "tools/flip_server/spdy_interface.cc",
957       "tools/flip_server/spdy_interface.h",
958       "tools/flip_server/spdy_util.cc",
959       "tools/flip_server/spdy_util.h",
960       "tools/flip_server/streamer_interface.cc",
961       "tools/flip_server/streamer_interface.h",
962     ]
963     deps = [
964       ":balsa",
965       ":epoll_server",
966       ":net",
967       "//base",
968       "//third_party/boringssl",
969     ]
970   }
972   executable("flip_in_mem_edsm_server_unittests") {
973     testonly = true
974     sources = [
975       "tools/flip_server/flip_test_utils.cc",
976       "tools/flip_server/flip_test_utils.h",
977       "tools/flip_server/http_interface_test.cc",
978       "tools/flip_server/mem_cache_test.cc",
979       "tools/flip_server/run_all_tests.cc",
980       "tools/flip_server/spdy_interface_test.cc",
981     ]
982     deps = [
983       ":flip_in_mem_edsm_server_base",
984       ":net",
985       ":test_support",
986       "//testing/gtest",
987       "//testing/gmock",
988       "//third_party/boringssl",
989     ]
990   }
992   executable("flip_in_mem_edsm_server") {
993     testonly = true
994     sources = [
995       "tools/flip_server/flip_in_mem_edsm_server.cc",
996     ]
997     deps = [
998       ":flip_in_mem_edsm_server_base",
999       ":net",
1000       "//base",
1001     ]
1002   }
1004   source_set("quic_base") {
1005     sources = [
1006       "tools/quic/quic_client.cc",
1007       "tools/quic/quic_client.h",
1008       "tools/quic/quic_client_session.cc",
1009       "tools/quic/quic_client_session.h",
1010       "tools/quic/quic_default_packet_writer.cc",
1011       "tools/quic/quic_default_packet_writer.h",
1012       "tools/quic/quic_dispatcher.h",
1013       "tools/quic/quic_dispatcher.cc",
1014       "tools/quic/quic_epoll_clock.cc",
1015       "tools/quic/quic_epoll_clock.h",
1016       "tools/quic/quic_epoll_connection_helper.cc",
1017       "tools/quic/quic_epoll_connection_helper.h",
1018       "tools/quic/quic_in_memory_cache.cc",
1019       "tools/quic/quic_in_memory_cache.h",
1020       "tools/quic/quic_packet_writer_wrapper.cc",
1021       "tools/quic/quic_packet_writer_wrapper.h",
1022       "tools/quic/quic_per_connection_packet_writer.cc",
1023       "tools/quic/quic_per_connection_packet_writer.h",
1024       "tools/quic/quic_server.cc",
1025       "tools/quic/quic_server.h",
1026       "tools/quic/quic_server_session.cc",
1027       "tools/quic/quic_server_session.h",
1028       "tools/quic/quic_socket_utils.cc",
1029       "tools/quic/quic_socket_utils.h",
1030       "tools/quic/quic_spdy_client_stream.cc",
1031       "tools/quic/quic_spdy_client_stream.h",
1032       "tools/quic/quic_spdy_server_stream.cc",
1033       "tools/quic/quic_spdy_server_stream.h",
1034       "tools/quic/quic_time_wait_list_manager.h",
1035       "tools/quic/quic_time_wait_list_manager.cc",
1036     ]
1037     deps = [
1038       ":balsa",
1039       ":epoll_server",
1040       ":net",
1041       "//base",
1042       "//base/third_party/dynamic_annotations",
1043       "//crypto",
1044       "//third_party/boringssl",
1045       "//url",
1046     ]
1047   }
1049   executable("quic_client") {
1050     sources = [
1051       "tools/quic/quic_client_bin.cc",
1052     ]
1053     deps = [
1054       ":quic_base",
1055       ":net",
1056       "//base",
1057       "//third_party/boringssl",
1058     ]
1059   }
1062 if (is_android) {
1063   generate_jni("net_jni_headers") {
1064     sources = [
1065       "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1066       "android/java/src/org/chromium/net/AndroidKeyStore.java",
1067       "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
1068       "android/java/src/org/chromium/net/AndroidPrivateKey.java",
1069       "android/java/src/org/chromium/net/GURLUtils.java",
1070       "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1071       "android/java/src/org/chromium/net/ProxyChangeListener.java",
1072       "android/java/src/org/chromium/net/X509Util.java",
1073     ]
1074     jni_package = "net"
1075   }
1076   generate_jni("net_test_jni_headers") {
1077     sources = [
1078       "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
1079     ]
1080     jni_package = "net"
1081   }
1084 if (is_android || is_linux) {
1085   executable("disk_cache_memory_test") {
1086     testonly = true
1087     sources = [
1088       "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1089     ]
1090     deps = [
1091       ":net",
1092       "//base",
1093     ]
1094   }
1097 # TODO(GYP) make this compile on Android, we need some native test deps done.
1098 # TODO(GYP) Also doesn't work on Windows; dependency on boringssl is wrong.
1099 # TODO(GYP) Also doesn't work on Mac, need to figure out why not.
1100 if (!is_android && !is_win && !is_mac) {
1101   source_set("quic_tools") {
1102     sources = [
1103       "quic/quic_dispatcher.cc",
1104       "quic/quic_dispatcher.h",
1105       "quic/quic_in_memory_cache.cc",
1106       "quic/quic_in_memory_cache.h",
1107       "quic/quic_per_connection_packet_writer.cc",
1108       "quic/quic_per_connection_packet_writer.h",
1109       "quic/quic_server.cc",
1110       "quic/quic_server.h",
1111       "quic/quic_server_packet_writer.cc",
1112       "quic/quic_server_packet_writer.h",
1113       "quic/quic_server_session.cc",
1114       "quic/quic_server_session.h",
1115       "quic/quic_spdy_server_stream.cc",
1116       "quic/quic_spdy_server_stream.h",
1117       "quic/quic_time_wait_list_manager.cc",
1118       "quic/quic_time_wait_list_manager.h",
1119     ]
1120     deps = [
1121       ":net",
1122       "//base",
1123       "//base/third_party/dynamic_annotations",
1124       "//url",
1125     ]
1126   }
1128   test("net_unittests") {
1129     sources = gypi_values.net_test_sources
1131     configs += [ ":net_win_size_truncation" ]
1132     defines = []
1134     deps = [
1135       ":extras",
1136       ":http_server",
1137       ":net",
1138       ":quic_tools",
1139       ":test_support",
1140       "//base",
1141       "//base:i18n",
1142       "//base:prefs_test_support",
1143       "//base/allocator",
1144       "//base/third_party/dynamic_annotations",
1145       "//crypto",
1146       "//crypto:platform",
1147       "//crypto:test_support",
1148       "//net/base/registry_controlled_domains",
1149       "//testing/gmock",
1150       "//testing/gtest",
1151       "//third_party/zlib",
1152       "//url",
1153     ]
1155     if (is_linux) {
1156       sources += gypi_values.net_linux_test_sources
1157       deps += [
1158         ":balsa",
1159         ":epoll_server",
1160         ":flip_in_mem_edsm_server_base",
1161         ":quic_base",
1162       ]
1163     }
1165     if (is_mac || is_ios) {
1166       sources += gypi_values.net_base_test_mac_ios_sources
1167     }
1169     if (is_chromeos) {
1170       sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
1171     }
1173     if (is_android) {
1174       sources -= [
1175         # See bug http://crbug.com/344533.
1176         "disk_cache/blockfile/index_table_v3_unittest.cc",
1178         # No res_ninit() et al on Android, so this doesn't make a lot of
1179         # sense.
1180         "dns/dns_config_service_posix_unittest.cc",
1181       ]
1182       deps += [
1183         ":net_javatests",  # FIXME(brettw)
1184         ":net_test_jni_headers",
1185       ]
1186     }
1188     if (!use_nss_certs) {
1189       sources -= [ "ssl/client_cert_store_nss_unittest.cc" ]
1190       if (is_chromeos) {  # Already removed for all non-ChromeOS builds.
1191         sources -= [ "ssl/client_cert_store_chromeos_unittest.cc" ]
1192       }
1193     }
1195     if (use_openssl) {
1196       # When building for OpenSSL, we need to exclude NSS specific tests
1197       # or functionality not supported by OpenSSL yet.
1198       # TODO(bulach): Add equivalent tests when the underlying
1199       #               functionality is ported to OpenSSL.
1200       sources -= [
1201         "cert/nss_cert_database_unittest.cc",
1202         "cert/x509_util_nss_unittest.cc",
1203         "quic/test_tools/crypto_test_utils_nss.cc",
1204       ]
1205       if (is_chromeos) {
1206         # These were already removed in the non-ChromeOS case.
1207         sources -= [
1208           "cert/nss_cert_database_chromeos_unittest.cc",
1209           "cert/nss_profile_filter_chromeos_unittest.cc",
1210         ]
1211       }
1212     } else {
1213       sources -= [
1214         "cert/x509_util_openssl_unittest.cc",
1215         "quic/test_tools/crypto_test_utils_openssl.cc",
1216         "socket/ssl_client_socket_openssl_unittest.cc",
1217         "socket/ssl_session_cache_openssl_unittest.cc",
1218       ]
1219       if (!is_desktop_linux && !is_chromeos) {
1220         sources -= [ "cert/nss_cert_database_unittest.cc" ]
1221       }
1222     }
1224     if (use_kerberos) {
1225       defines += [ "USE_KERBEROS" ]
1226     } else {
1227       sources -= [
1228         "http/http_auth_gssapi_posix_unittest.cc",
1229         "http/http_auth_handler_negotiate_unittest.cc",
1230         "http/mock_gssapi_library_posix.cc",
1231         "http/mock_gssapi_library_posix.h",
1232       ]
1233     }
1235     if (use_openssl || (!is_desktop_linux && !is_chromeos && !is_ios)) {
1236       # Only include this test when on Posix and using NSS for
1237       # cert verification or on iOS (which also uses NSS for certs).
1238       sources -= [ "ocsp/nss_ocsp_unittest.cc" ]
1239     }
1241     if (!use_openssl_certs) {
1242       sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1243     }
1245     if (!enable_websockets) {
1246       sources -= [
1247         "server/http_connection_unittest.cc",
1248         "server/http_server_response_info_unittest.cc",
1249         "server/http_server_unittest.cc",
1250         "server/web_socket_encoder_unittest.cc",
1251         "websockets/websocket_basic_stream_test.cc",
1252         "websockets/websocket_channel_test.cc",
1253         "websockets/websocket_deflate_predictor_impl_test.cc",
1254         "websockets/websocket_deflate_stream_test.cc",
1255         "websockets/websocket_deflater_test.cc",
1256         "websockets/websocket_errors_test.cc",
1257         "websockets/websocket_extension_parser_test.cc",
1258         "websockets/websocket_frame_parser_test.cc",
1259         "websockets/websocket_frame_test.cc",
1260         "websockets/websocket_handshake_challenge_test.cc",
1261         "websockets/websocket_handshake_stream_create_helper_test.cc",
1262         "websockets/websocket_inflater_test.cc",
1263         "websockets/websocket_stream_test.cc",
1264         "websockets/websocket_test_util.cc",
1265         "websockets/websocket_test_util.h",
1266       ]
1267       deps -= [ ":http_server" ]
1268     }
1270     if (disable_file_support) {
1271       sources -= [
1272         "base/directory_lister_unittest.cc",
1273         "url_request/url_request_file_job_unittest.cc",
1274       ]
1275     }
1277     if (disable_ftp_support) {
1278       sources -= [
1279         "ftp/ftp_auth_cache_unittest.cc",
1280         "ftp/ftp_ctrl_response_buffer_unittest.cc",
1281         "ftp/ftp_directory_listing_parser_ls_unittest.cc",
1282         "ftp/ftp_directory_listing_parser_netware_unittest.cc",
1283         "ftp/ftp_directory_listing_parser_os2_unittest.cc",
1284         "ftp/ftp_directory_listing_parser_unittest.cc",
1285         "ftp/ftp_directory_listing_parser_unittest.h",
1286         "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1287         "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1288         "ftp/ftp_network_transaction_unittest.cc",
1289         "ftp/ftp_util_unittest.cc",
1290         "url_request/url_request_ftp_job_unittest.cc",
1291       ]
1292     }
1294     if (!enable_built_in_dns) {
1295       sources -= [
1296         "dns/address_sorter_posix_unittest.cc",
1297         "dns/address_sorter_unittest.cc",
1298       ]
1299     }
1301     # Always need use_v8_in_net to be 1 to run on Android, so just remove
1302     # net_unittest's dependency on v8 when using icu alternatives instead of
1303     # setting use_v8_in_net to 0.
1304     if (use_v8_in_net && !use_icu_alternatives_on_android) {
1305       deps += [ ":net_with_v8" ]
1306     } else {
1307       sources -= [
1308         "proxy/proxy_resolver_v8_unittest.cc",
1309         "proxy/proxy_resolver_v8_tracing_unittest.cc",
1310       ]
1311     }
1313     if (!enable_mdns) {
1314       sources -= [
1315         "dns/mdns_cache_unittest.cc",
1316         "dns/mdns_client_unittest.cc",
1317         "dns/record_parsed_unittest.cc",
1318         "dns/record_rdata_unittest.cc",
1319       ]
1320     }
1322     if (is_ios) {
1323       # TODO(GYP)
1324       #  'actions': [
1325       #    {
1326       #      'action_name': 'copy_test_data',
1327       #      'variables': {
1328       #        'test_data_files': [
1329       #          'data/ssl/certificates/',
1330       #          'data/test.html',
1331       #          'data/url_request_unittest/',
1332       #        ],
1333       #        'test_data_prefix': 'net',
1334       #      },
1335       #      'includes': [ '../build/copy_test_data_ios.gypi' ],
1336       #    },
1337       #  ],
1338       sources -= [
1339         # TODO(droger): The following tests are disabled because the
1340         # implementation is missing or incomplete.
1341         # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1342         "base/keygen_handler_unittest.cc",
1343         "disk_cache/backend_unittest.cc",
1344         "disk_cache/blockfile/block_files_unittest.cc",
1346         # Need to read input data files.
1347         "filter/gzip_filter_unittest.cc",
1348         "socket/ssl_server_socket_unittest.cc",
1349         "spdy/fuzzing/hpack_fuzz_util_test.cc",
1351         # Need TestServer.
1352         "proxy/proxy_script_fetcher_impl_unittest.cc",
1353         "socket/ssl_client_socket_unittest.cc",
1354         "url_request/url_fetcher_impl_unittest.cc",
1355         "url_request/url_request_context_builder_unittest.cc",
1357         # Needs GetAppOutput().
1358         "test/python_utils_unittest.cc",
1360         # The following tests are disabled because they don't apply to
1361         # iOS.
1362         # OS is not "linux" or "freebsd" or "openbsd".
1363         "socket/unix_domain_client_socket_posix_unittest.cc",
1364         "socket/unix_domain_listen_socket_posix_unittest.cc",
1365         "socket/unix_domain_server_socket_posix_unittest.cc",
1367         # See bug http://crbug.com/344533.
1368         "disk_cache/blockfile/index_table_v3_unittest.cc",
1369       ]
1370     }
1372     if (is_android) {
1373       sources -= [ "dns/dns_config_service_posix_unittest.cc" ]
1375       # TODO(GYP)
1376       # # TODO(mmenke):  This depends on test_support_base, which depends on
1377       # #                icu.  Figure out a way to remove that dependency.
1378       # 'dependencies': [
1379       #   '../testing/android/native_test.gyp:native_test_native_code',
1380       # ]
1382       set_sources_assignment_filter([])
1383       sources += [ "base/address_tracker_linux_unittest.cc" ]
1384       set_sources_assignment_filter(sources_assignment_filter)
1385     }
1387     if (use_icu_alternatives_on_android) {
1388       sources -= [
1389         "base/filename_util_unittest.cc",
1390         "base/net_util_icu_unittest.cc",
1391       ]
1392       deps -= [ "//base:i18n" ]
1393     }
1394   }
1396   executable("quic_server") {
1397     sources = [
1398       "quic/quic_server_bin.cc",
1399     ]
1400     deps = [
1401       ":quic_tools",
1402       ":net",
1403       "//base",
1404       "//third_party/boringssl",
1405     ]
1406   }
1407 }  # !is_android && !is_win && !is_mac