Reland: Remove some dead app host code.
[chromium-blink-merge.git] / net / net.gyp
blobc88ad52d282fe1d6ab7b2270b4dd0e2c22d1421b
1 # Copyright 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.
6   'variables': {
7     'chromium_code': 1,
9     'linux_link_kerberos%': 0,
10     'use_tracing_cache_backend%': 0,
11     'conditions': [
12       ['chromeos==1 or embedded==1 or OS=="android" or OS=="ios"', {
13         # Disable Kerberos on ChromeOS, Android and iOS, at least for now.
14         # It needs configuration (krb5.conf and so on).
15         'use_kerberos%': 0,
16       }, {  # chromeos == 0 and embedded==0 and OS!="android" and OS!="ios"
17         'use_kerberos%': 1,
18       }],
19       ['OS=="android" and target_arch != "ia32"', {
20         # The way the cache uses mmap() is inefficient on some Android devices.
21         # If this flag is set, we hackily avoid using mmap() in the disk cache.
22         # We are pretty confident that mmap-ing the index would not hurt any
23         # existing x86 android devices, but we cannot be so sure about the
24         # variety of ARM devices. So enable it for x86 only for now.
25         'posix_avoid_mmap%': 1,
26       }, {
27         'posix_avoid_mmap%': 0,
28       }],
29       ['OS=="ios"', {
30         # Websockets and socket stream are not used on iOS.
31         'enable_websockets%': 0,
32         # iOS does not use V8.
33         'use_v8_in_net%': 0,
34         'enable_built_in_dns%': 0,
35       }, {
36         'enable_websockets%': 1,
37         'use_v8_in_net%': 1,
38         'enable_built_in_dns%': 1,
39       }],
40     ],
41   },
42   'includes': [
43     '../build/win_precompile.gypi',
44     'net.gypi',
45   ],
46   'targets': [
47     {
48       'target_name': 'net_derived_sources',
49       'type': 'none',
50       'sources': [
51         'base/registry_controlled_domains/effective_tld_names.gperf',
52         'base/registry_controlled_domains/effective_tld_names_unittest1.gperf',
53         'base/registry_controlled_domains/effective_tld_names_unittest2.gperf',
54         'base/registry_controlled_domains/effective_tld_names_unittest3.gperf',
55         'base/registry_controlled_domains/effective_tld_names_unittest4.gperf',
56         'base/registry_controlled_domains/effective_tld_names_unittest5.gperf',
57         'base/registry_controlled_domains/effective_tld_names_unittest6.gperf',
58       ],
59       'rules': [
60         {
61           'rule_name': 'dafsa',
62           'extension': 'gperf',
63           'outputs': [
64             '<(SHARED_INTERMEDIATE_DIR)/net/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-inc.cc',
65           ],
66           'inputs': [
67             'tools/tld_cleanup/make_dafsa.py',
68           ],
69           'action': [
70             'python',
71             'tools/tld_cleanup/make_dafsa.py',
72             '<(RULE_INPUT_PATH)',
73             '<(SHARED_INTERMEDIATE_DIR)/net/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-inc.cc',
74           ],
75         },
76       ],
77       'direct_dependent_settings': {
78         'include_dirs': [
79           '<(SHARED_INTERMEDIATE_DIR)'
80         ],
81       },
82     },
83     {
84       'target_name': 'net',
85       'type': '<(component)',
86       'variables': { 'enable_wexit_time_destructors': 1, },
87       'dependencies': [
88         '../base/base.gyp:base',
89         '../base/base.gyp:base_i18n',
90         '../base/base.gyp:base_prefs',
91         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
92         '../crypto/crypto.gyp:crypto',
93         '../sdch/sdch.gyp:sdch',
94         '../third_party/icu/icu.gyp:icui18n',
95         '../third_party/icu/icu.gyp:icuuc',
96         '../third_party/zlib/zlib.gyp:zlib',
97         '../url/url.gyp:url_lib',
98         'net_derived_sources',
99         'net_resources',
100       ],
101       'sources': [
102         '<@(net_nacl_common_sources)',
103         '<@(net_non_nacl_sources)',
104       ],
105       'defines': [
106         'NET_IMPLEMENTATION',
107       ],
108       'export_dependent_settings': [
109         '../base/base.gyp:base',
110       ],
111       'conditions': [
112         ['chromeos==1', {
113           'sources!': [
114              'base/network_change_notifier_linux.cc',
115              'base/network_change_notifier_linux.h',
116              'base/network_change_notifier_netlink_linux.cc',
117              'base/network_change_notifier_netlink_linux.h',
118              'proxy/proxy_config_service_linux.cc',
119              'proxy/proxy_config_service_linux.h',
120           ],
121         }],
122         ['use_kerberos==1', {
123           'defines': [
124             'USE_KERBEROS',
125           ],
126           'conditions': [
127             ['OS=="openbsd"', {
128               'include_dirs': [
129                 '/usr/include/kerberosV'
130               ],
131             }],
132             ['linux_link_kerberos==1', {
133               'link_settings': {
134                 'ldflags': [
135                   '<!@(krb5-config --libs gssapi)',
136                 ],
137               },
138             }, { # linux_link_kerberos==0
139               'defines': [
140                 'DLOPEN_KERBEROS',
141               ],
142             }],
143           ],
144         }, { # use_kerberos == 0
145           'sources!': [
146             'http/http_auth_gssapi_posix.cc',
147             'http/http_auth_gssapi_posix.h',
148             'http/http_auth_handler_negotiate.h',
149             'http/http_auth_handler_negotiate.cc',
150           ],
151         }],
152         ['posix_avoid_mmap==1', {
153           'defines': [
154             'POSIX_AVOID_MMAP',
155           ],
156           'direct_dependent_settings': {
157             'defines': [
158               'POSIX_AVOID_MMAP',
159             ],
160           },
161           'sources!': [
162             'disk_cache/blockfile/mapped_file_posix.cc',
163           ],
164         }, { # else
165           'sources!': [
166             'disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc',
167           ],
168         }],
169         ['disable_file_support==1', {
170           # TODO(mmenke):  Should probably get rid of the dependency on
171           # net_resources in this case (It's used in net_util, to format
172           # directory listings.  Also used outside of net/).
173           'sources!': [
174             'base/directory_lister.cc',
175             'base/directory_lister.h',
176             'url_request/url_request_file_dir_job.cc',
177             'url_request/url_request_file_dir_job.h',
178             'url_request/url_request_file_job.cc',
179             'url_request/url_request_file_job.h',
180             'url_request/file_protocol_handler.cc',
181             'url_request/file_protocol_handler.h',
182           ],
183         }],
184         ['disable_ftp_support==1', {
185           'sources/': [
186             ['exclude', '^ftp/'],
187           ],
188           'sources!': [
189             'url_request/ftp_protocol_handler.cc',
190             'url_request/ftp_protocol_handler.h',
191             'url_request/url_request_ftp_job.cc',
192             'url_request/url_request_ftp_job.h',
193           ],
194         }],
195         ['enable_built_in_dns==1', {
196           'defines': [
197             'ENABLE_BUILT_IN_DNS',
198           ]
199         }, { # else
200           'sources!': [
201             'dns/address_sorter_posix.cc',
202             'dns/address_sorter_posix.h',
203             'dns/dns_client.cc',
204           ],
205         }],
206         ['use_tracing_cache_backend==1', {
207           'defines': [
208             'USE_TRACING_CACHE_BACKEND'
209           ],
210          }],
211         ['use_openssl==1', {
212             'sources!': [
213               'base/crypto_module_nss.cc',
214               'base/keygen_handler_nss.cc',
215               'base/nss_memio.c',
216               'base/nss_memio.h',
217               'cert/cert_database_nss.cc',
218               'cert/cert_verify_proc_nss.cc',
219               'cert/cert_verify_proc_nss.h',
220               'cert/ct_log_verifier_nss.cc',
221               'cert/ct_objects_extractor_nss.cc',
222               'cert/jwk_serializer_nss.cc',
223               'cert/nss_cert_database.cc',
224               'cert/nss_cert_database.h',
225               'cert/nss_cert_database_chromeos.cc',
226               'cert/nss_cert_database_chromeos.h',
227               'cert/nss_profile_filter_chromeos.cc',
228               'cert/nss_profile_filter_chromeos.h',
229               'cert/scoped_nss_types.h',
230               'cert/test_root_certs_nss.cc',
231               'cert/x509_certificate_nss.cc',
232               'cert/x509_util_nss.cc',
233               'cert/x509_util_nss.h',
234               'ocsp/nss_ocsp.cc',
235               'ocsp/nss_ocsp.h',
236               'quic/crypto/aead_base_decrypter_nss.cc',
237               'quic/crypto/aead_base_encrypter_nss.cc',
238               'quic/crypto/aes_128_gcm_12_decrypter_nss.cc',
239               'quic/crypto/aes_128_gcm_12_encrypter_nss.cc',
240               'quic/crypto/chacha20_poly1305_decrypter_nss.cc',
241               'quic/crypto/chacha20_poly1305_encrypter_nss.cc',
242               'quic/crypto/channel_id_nss.cc',
243               'quic/crypto/p256_key_exchange_nss.cc',
244               'socket/nss_ssl_util.cc',
245               'socket/nss_ssl_util.h',
246               'socket/ssl_client_socket_nss.cc',
247               'socket/ssl_client_socket_nss.h',
248               'socket/ssl_server_socket_nss.cc',
249               'socket/ssl_server_socket_nss.h',
250               'third_party/mozilla_security_manager/nsKeygenHandler.cpp',
251               'third_party/mozilla_security_manager/nsKeygenHandler.h',
252               'third_party/mozilla_security_manager/nsNSSCertificateDB.cpp',
253               'third_party/mozilla_security_manager/nsNSSCertificateDB.h',
254               'third_party/mozilla_security_manager/nsPKCS12Blob.cpp',
255               'third_party/mozilla_security_manager/nsPKCS12Blob.h',
256             ],
257             'dependencies': [
258               '../third_party/boringssl/boringssl.gyp:boringssl',
259             ],
260           },
261           {  # else !use_openssl: remove the unneeded files
262             'sources!': [
263               'base/crypto_module_openssl.cc',
264               'cert/ct_log_verifier_openssl.cc',
265               'cert/ct_objects_extractor_openssl.cc',
266               'cert/jwk_serializer_openssl.cc',
267               'cert/x509_util_openssl.cc',
268               'cert/x509_util_openssl.h',
269               'crypto/scoped_openssl_types.h',
270               'quic/crypto/aead_base_decrypter_openssl.cc',
271               'quic/crypto/aead_base_encrypter_openssl.cc',
272               'quic/crypto/aes_128_gcm_12_decrypter_openssl.cc',
273               'quic/crypto/aes_128_gcm_12_encrypter_openssl.cc',
274               'quic/crypto/chacha20_poly1305_decrypter_openssl.cc',
275               'quic/crypto/chacha20_poly1305_encrypter_openssl.cc',
276               'quic/crypto/channel_id_openssl.cc',
277               'quic/crypto/p256_key_exchange_openssl.cc',
278               'quic/crypto/scoped_evp_aead_ctx.cc',
279               'quic/crypto/scoped_evp_aead_ctx.h',
280               'socket/openssl_ssl_util.cc',
281               'socket/openssl_ssl_util.h',
282               'socket/ssl_client_socket_openssl.cc',
283               'socket/ssl_client_socket_openssl.h',
284               'socket/ssl_server_socket_openssl.cc',
285               'socket/ssl_server_socket_openssl.h',
286               'socket/ssl_session_cache_openssl.cc',
287               'socket/ssl_session_cache_openssl.h',
288             ],
289           },
290         ],
291         [ 'use_openssl_certs == 0', {
292             'sources!': [
293               'base/keygen_handler_openssl.cc',
294               'base/openssl_private_key_store.h',
295               'base/openssl_private_key_store_android.cc',
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         }],
306         [ 'use_glib == 1', {
307             'dependencies': [
308               '../build/linux/system.gyp:gconf',
309               '../build/linux/system.gyp:gio',
310             ],
311         }],
312         [ 'desktop_linux == 1 or chromeos == 1', {
313             'conditions': [
314               ['use_openssl == 0', {
315                  # use NSS
316                 'dependencies': [
317                   '../build/linux/system.gyp:ssl',
318                 ],
319               }],
320               ['os_bsd==1', {
321                 'sources!': [
322                   'base/network_change_notifier_linux.cc',
323                   'base/network_change_notifier_netlink_linux.cc',
324                   'proxy/proxy_config_service_linux.cc',
325                 ],
326               },{
327                 'dependencies': [
328                   '../build/linux/system.gyp:libresolv',
329                 ],
330               }],
331               ['OS=="solaris"', {
332                 'link_settings': {
333                   'ldflags': [
334                     '-R/usr/lib/mps',
335                   ],
336                 },
337               }],
338             ],
339           },
340           {  # else: OS is not in the above list
341             'sources!': [
342               'base/crypto_module_nss.cc',
343               'base/keygen_handler_nss.cc',
344               'cert/cert_database_nss.cc',
345               'cert/nss_cert_database.cc',
346               'cert/nss_cert_database.h',
347               'cert/test_root_certs_nss.cc',
348               'cert/x509_certificate_nss.cc',
349               'ocsp/nss_ocsp.cc',
350               'ocsp/nss_ocsp.h',
351               'third_party/mozilla_security_manager/nsKeygenHandler.cpp',
352               'third_party/mozilla_security_manager/nsKeygenHandler.h',
353               'third_party/mozilla_security_manager/nsNSSCertificateDB.cpp',
354               'third_party/mozilla_security_manager/nsNSSCertificateDB.h',
355               'third_party/mozilla_security_manager/nsPKCS12Blob.cpp',
356               'third_party/mozilla_security_manager/nsPKCS12Blob.h',
357             ],
358           },
359         ],
360         [ 'use_nss != 1', {
361             'sources!': [
362               'cert/cert_verify_proc_nss.cc',
363               'cert/cert_verify_proc_nss.h',
364               'ssl/client_cert_store_nss.cc',
365               'ssl/client_cert_store_nss.h',
366               'ssl/client_cert_store_chromeos.cc',
367               'ssl/client_cert_store_chromeos.h',
368             ],
369         }],
370         [ 'enable_websockets != 1', {
371             'sources/': [
372               ['exclude', '^socket_stream/'],
373               ['exclude', '^websockets/'],
374             ],
375             'sources!': [
376               'spdy/spdy_websocket_stream.cc',
377               'spdy/spdy_websocket_stream.h',
378             ],
379         }],
380         [ 'enable_mdns != 1', {
381             'sources!' : [
382               'dns/mdns_cache.cc',
383               'dns/mdns_cache.h',
384               'dns/mdns_client.cc',
385               'dns/mdns_client.h',
386               'dns/mdns_client_impl.cc',
387               'dns/mdns_client_impl.h',
388               'dns/record_parsed.cc',
389               'dns/record_parsed.h',
390               'dns/record_rdata.cc',
391               'dns/record_rdata.h',
392             ]
393         }],
394         [ 'OS == "win"', {
395             'sources!': [
396               'http/http_auth_handler_ntlm_portable.cc',
397               'socket/socket_libevent.cc',
398               'socket/socket_libevent.h',
399               'socket/tcp_socket_libevent.cc',
400               'socket/tcp_socket_libevent.h',
401               'udp/udp_socket_libevent.cc',
402               'udp/udp_socket_libevent.h',
403             ],
404             'dependencies': [
405               '../third_party/nss/nss.gyp:nspr',
406               '../third_party/nss/nss.gyp:nss',
407               'third_party/nss/ssl.gyp:libssl',
408             ],
409             # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
410             'msvs_disabled_warnings': [4267, ],
411           }, { # else: OS != "win"
412             'sources!': [
413               'base/winsock_init.cc',
414               'base/winsock_init.h',
415               'base/winsock_util.cc',
416               'base/winsock_util.h',
417               'proxy/proxy_resolver_winhttp.cc',
418               'proxy/proxy_resolver_winhttp.h',
419             ],
420           },
421         ],
422         [ 'OS == "mac"', {
423             'conditions': [
424               [ 'use_openssl == 0', {
425                 'dependencies': [
426                   # defaults to nss
427                   '../third_party/nss/nss.gyp:nspr',
428                   '../third_party/nss/nss.gyp:nss',
429                   'third_party/nss/ssl.gyp:libssl',
430                 ],
431               }],
432             ],
433             'link_settings': {
434               'libraries': [
435                 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
436                 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
437                 '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
438                 '$(SDKROOT)/usr/lib/libresolv.dylib',
439               ]
440             },
441           },
442         ],
443         [ 'OS == "ios"', {
444             'dependencies': [
445               '../third_party/nss/nss.gyp:nss',
446               'third_party/nss/ssl.gyp:libssl',
447             ],
448             'sources!': [
449               'disk_cache/blockfile/file_posix.cc',
450             ],
451             'link_settings': {
452               'libraries': [
453                 '$(SDKROOT)/System/Library/Frameworks/CFNetwork.framework',
454                 '$(SDKROOT)/System/Library/Frameworks/MobileCoreServices.framework',
455                 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
456                 '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
457                 '$(SDKROOT)/usr/lib/libresolv.dylib',
458               ],
459             },
460           },
461         ],
462         ['OS=="android" and _toolset=="target" and android_webview_build == 0', {
463           'dependencies': [
464              'net_java',
465           ],
466         }],
467         [ 'OS == "android"', {
468             'dependencies': [
469               '../third_party/boringssl/boringssl.gyp:boringssl',
470               'net_jni_headers',
471             ],
472             'sources!': [
473               'base/openssl_private_key_store_memory.cc',
474               'cert/cert_database_openssl.cc',
475               'cert/cert_verify_proc_openssl.cc',
476               'cert/test_root_certs_openssl.cc',
477             ],
478           },
479         ],
480         [ 'use_icu_alternatives_on_android == 1', {
481             'dependencies!': [
482               '../base/base.gyp:base_i18n',
483               '../third_party/icu/icu.gyp:icui18n',
484               '../third_party/icu/icu.gyp:icuuc',
485             ],
486             'sources!': [
487               'base/filename_util_icu.cc',
488               'base/net_string_util_icu.cc',
489               'base/net_util_icu.cc',
490             ],
491             'sources': [
492               'base/net_string_util_icu_alternatives_android.cc',
493               'base/net_string_util_icu_alternatives_android.h',
494             ],
495           },
496         ],
497       ],
498       'target_conditions': [
499         # These source files are excluded by default platform rules, but they
500         # are needed in specific cases on other platforms. Re-including them can
501         # only be done in target_conditions as it is evaluated after the
502         # platform rules.
503         ['OS == "android"', {
504           'sources/': [
505             ['include', '^base/platform_mime_util_linux\\.cc$'],
506             ['include', '^base/address_tracker_linux\\.cc$'],
507             ['include', '^base/address_tracker_linux\\.h$'],
508           ],
509         }],
510         ['OS == "ios"', {
511           'sources/': [
512             ['include', '^base/network_change_notifier_mac\\.cc$'],
513             ['include', '^base/network_config_watcher_mac\\.cc$'],
514             ['include', '^base/platform_mime_util_mac\\.mm$'],
515             # The iOS implementation only partially uses NSS and thus does not
516             # defines |use_nss|. In particular the |USE_NSS| preprocessor
517             # definition is not used. The following files are needed though:
518             ['include', '^cert/cert_verify_proc_nss\\.cc$'],
519             ['include', '^cert/cert_verify_proc_nss\\.h$'],
520             ['include', '^cert/test_root_certs_nss\\.cc$'],
521             ['include', '^cert/x509_util_nss\\.cc$'],
522             ['include', '^cert/x509_util_nss\\.h$'],
523             ['include', '^proxy/proxy_resolver_mac\\.cc$'],
524             ['include', '^proxy/proxy_server_mac\\.cc$'],
525             ['include', '^ocsp/nss_ocsp\\.cc$'],
526             ['include', '^ocsp/nss_ocsp\\.h$'],
527           ],
528         }],
529       ],
530     },
531     {
532       'target_name': 'net_unittests',
533       'type': '<(gtest_target_type)',
534       'dependencies': [
535         '../base/base.gyp:base',
536         '../base/base.gyp:base_i18n',
537         '../base/base.gyp:base_prefs_test_support',
538         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
539         '../crypto/crypto.gyp:crypto',
540         '../testing/gmock.gyp:gmock',
541         '../testing/gtest.gyp:gtest',
542         '../third_party/zlib/zlib.gyp:zlib',
543         '../url/url.gyp:url_lib',
544         'balsa',
545         'http_server',
546         'net',
547         'net_derived_sources',
548         'net_test_support',
549         'quic_tools',
550       ],
551       'sources': [
552         '<@(net_test_sources)',
553       ],
554       'conditions': [
555         ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
556           'dependencies': [
557             'epoll_server',
558             'flip_in_mem_edsm_server_base',
559             'quic_base',
560           ],
561           'sources': [
562             '<@(net_linux_test_sources)',
563           ],
564         }],
565         ['chromeos==1', {
566           'sources!': [
567             'proxy/proxy_config_service_linux_unittest.cc',
568           ],
569         }],
570         [ 'OS == "android"', {
571           'sources!': [
572             # See bug http://crbug.com/344533.
573             'disk_cache/blockfile/index_table_v3_unittest.cc',
574             # No res_ninit() et al on Android, so this doesn't make a lot of
575             # sense.
576             'dns/dns_config_service_posix_unittest.cc',
577           ],
578           'dependencies': [
579             'net_javatests',
580             'net_test_jni_headers',
581           ],
582         }],
583         [ 'use_nss != 1', {
584           'sources!': [
585             'ssl/client_cert_store_nss_unittest.cc',
586             'ssl/client_cert_store_chromeos_unittest.cc',
587           ],
588         }],
589         [ 'use_openssl == 1', {
590           # Avoid compiling/linking with the system library.
591           'dependencies': [
592             '../third_party/boringssl/boringssl.gyp:boringssl',
593           ],
594         }, {  # use_openssl == 0
595           'conditions': [
596             [ 'desktop_linux == 1 or chromeos == 1', {
597               'dependencies': [
598                 '../build/linux/system.gyp:ssl',
599               ],
600             }, {  # desktop_linux == 0 and chromeos == 0
601               'sources!': [
602                 'cert/nss_cert_database_unittest.cc',
603               ],
604             }],
605           ],
606         }],
607         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
608           'conditions': [
609             ['use_allocator!="none"', {
610               'dependencies': [
611                 '../base/allocator/allocator.gyp:allocator',
612               ],
613             }],
614           ],
615         }],
616         [ 'use_kerberos==1', {
617           'defines': [
618             'USE_KERBEROS',
619           ],
620         }, { # use_kerberos == 0
621           'sources!': [
622             'http/http_auth_gssapi_posix_unittest.cc',
623             'http/http_auth_handler_negotiate_unittest.cc',
624             'http/mock_gssapi_library_posix.cc',
625             'http/mock_gssapi_library_posix.h',
626           ],
627         }],
628         [ 'use_openssl == 1 or (desktop_linux == 0 and chromeos == 0 and OS != "ios")', {
629           # Only include this test when on Posix and using NSS for
630           # cert verification or on iOS (which also uses NSS for certs).
631           'sources!': [
632             'ocsp/nss_ocsp_unittest.cc',
633           ],
634         }],
635         [ 'use_openssl==1', {
636             # When building for OpenSSL, we need to exclude NSS specific tests
637             # or functionality not supported by OpenSSL yet.
638             # TODO(bulach): Add equivalent tests when the underlying
639             #               functionality is ported to OpenSSL.
640             'sources!': [
641               'cert/ct_objects_extractor_unittest.cc',
642               'cert/multi_log_ct_verifier_unittest.cc',
643               'cert/nss_cert_database_unittest.cc',
644               'cert/nss_cert_database_chromeos_unittest.cc',
645               'cert/nss_profile_filter_chromeos_unittest.cc',
646               'cert/x509_util_nss_unittest.cc',
647               'quic/test_tools/crypto_test_utils_nss.cc',
648             ],
649           }, {  # else !use_openssl: remove the unneeded files
650             'sources!': [
651               'cert/x509_util_openssl_unittest.cc',
652               'quic/test_tools/crypto_test_utils_openssl.cc',
653               'socket/ssl_client_socket_openssl_unittest.cc',
654               'socket/ssl_session_cache_openssl_unittest.cc',
655             ],
656           },
657         ],
658         [ 'use_openssl_certs == 0', {
659             'sources!': [
660               'ssl/openssl_client_key_store_unittest.cc',
661             ],
662         }],
663         [ 'enable_websockets != 1', {
664             'sources/': [
665               ['exclude', '^socket_stream/'],
666               ['exclude', '^websockets/'],
667               ['exclude', '^spdy/spdy_websocket_stream_unittest\\.cc$'],
668             ],
669         }],
670         ['disable_file_support==1', {
671           'sources!': [
672             'base/directory_lister_unittest.cc',
673             'url_request/url_request_file_job_unittest.cc',
674           ],
675         }],
676         [ 'disable_ftp_support==1', {
677             'sources/': [
678               ['exclude', '^ftp/'],
679             ],
680             'sources!': [
681               'url_request/url_request_ftp_job_unittest.cc',
682             ],
683           },
684         ],
685         [ 'enable_built_in_dns!=1', {
686             'sources!': [
687               'dns/address_sorter_posix_unittest.cc',
688               'dns/address_sorter_unittest.cc',
689             ],
690           },
691         ],
692         # Always need use_v8_in_net to be 1 to run gyp on Android, so just
693         # remove net_unittest's dependency on v8 when using icu alternatives
694         # instead of setting use_v8_in_net to 0.
695         [ 'use_v8_in_net==1 and use_icu_alternatives_on_android==0', {
696             'dependencies': [
697               'net_with_v8',
698             ],
699           }, {  # else: !use_v8_in_net
700             'sources!': [
701               'proxy/proxy_resolver_v8_unittest.cc',
702               'proxy/proxy_resolver_v8_tracing_unittest.cc',
703             ],
704           },
705         ],
707         [ 'enable_mdns != 1', {
708             'sources!' : [
709               'dns/mdns_cache_unittest.cc',
710               'dns/mdns_client_unittest.cc',
711               'dns/mdns_query_unittest.cc',
712               'dns/record_parsed_unittest.cc',
713               'dns/record_rdata_unittest.cc',
714             ],
715         }],
716         [ 'OS == "win"', {
717             'sources!': [
718               'dns/dns_config_service_posix_unittest.cc',
719               'http/http_auth_gssapi_posix_unittest.cc',
720             ],
721             'dependencies': [
722               '../third_party/nss/nss.gyp:nspr',
723               '../third_party/nss/nss.gyp:nss',
724               'third_party/nss/ssl.gyp:libssl',
725             ],
726             'conditions': [
727               [ 'icu_use_data_file_flag == 0', {
728                 # This is needed to trigger the dll copy step on windows.
729                 # TODO(mark): Specifying this here shouldn't be necessary.
730                 'dependencies': [
731                   '../third_party/icu/icu.gyp:icudata',
732                 ],
733               }],
734             ],
735             # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
736             'msvs_disabled_warnings': [4267, ],
737           },
738         ],
739         [ 'OS == "mac" and use_openssl == 0', {
740             'dependencies': [
741               '../third_party/nss/nss.gyp:nspr',
742               '../third_party/nss/nss.gyp:nss',
743               'third_party/nss/ssl.gyp:libssl',
744             ],
745           },
746         ],
747         [ 'OS == "ios"', {
748             'dependencies': [
749               '../third_party/nss/nss.gyp:nss',
750             ],
751             'actions': [
752               {
753                 'action_name': 'copy_test_data',
754                 'variables': {
755                   'test_data_files': [
756                     'data/ssl/certificates/',
757                     'data/test.html',
758                     'data/url_request_unittest/',
759                   ],
760                   'test_data_prefix': 'net',
761                 },
762                 'includes': [ '../build/copy_test_data_ios.gypi' ],
763               },
764             ],
765             'sources!': [
766               # TODO(droger): The following tests are disabled because the
767               # implementation is missing or incomplete.
768               # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
769               'base/keygen_handler_unittest.cc',
770               'disk_cache/backend_unittest.cc',
771               'disk_cache/blockfile/block_files_unittest.cc',
772               # Need to read input data files.
773               'filter/gzip_filter_unittest.cc',
774               'socket/ssl_server_socket_unittest.cc',
775               'spdy/fuzzing/hpack_fuzz_util_test.cc',
776               # Need TestServer.
777               'proxy/proxy_script_fetcher_impl_unittest.cc',
778               'socket/ssl_client_socket_unittest.cc',
779               'url_request/url_fetcher_impl_unittest.cc',
780               'url_request/url_request_context_builder_unittest.cc',
781               # Needs GetAppOutput().
782               'test/python_utils_unittest.cc',
784               # The following tests are disabled because they don't apply to
785               # iOS.
786               # OS is not "linux" or "freebsd" or "openbsd".
787               'socket/unix_domain_client_socket_posix_unittest.cc',
788               'socket/unix_domain_listen_socket_posix_unittest.cc',
789               'socket/unix_domain_server_socket_posix_unittest.cc',
791               # See bug http://crbug.com/344533.
792               'disk_cache/blockfile/index_table_v3_unittest.cc',
793             ],
794         }],
795         [ 'OS == "android"', {
796             'dependencies': [
797               '../third_party/boringssl/boringssl.gyp:boringssl',
798             ],
799             'sources!': [
800               'dns/dns_config_service_posix_unittest.cc',
801             ],
802           },
803         ],
804         ['OS == "android"', {
805           # TODO(mmenke):  This depends on test_support_base, which depends on
806           #                icu.  Figure out a way to remove that dependency.
807           'dependencies': [
808             '../testing/android/native_test.gyp:native_test_native_code',
809           ]
810         }],
811         [ 'use_icu_alternatives_on_android == 1', {
812             'dependencies!': [
813               '../base/base.gyp:base_i18n',
814             ],
815             'sources!': [
816               'base/filename_util_unittest.cc',
817               'base/net_util_icu_unittest.cc',
818             ],
819           },
820         ],
821       ],
822       'target_conditions': [
823         # These source files are excluded by default platform rules, but they
824         # are needed in specific cases on other platforms. Re-including them can
825         # only be done in target_conditions as it is evaluated after the
826         # platform rules.
827         ['OS == "android"', {
828           'sources/': [
829             ['include', '^base/address_tracker_linux_unittest\\.cc$'],
830           ],
831         }],
832       ],
833     },
834     {
835       'target_name': 'net_perftests',
836       'type': 'executable',
837       'dependencies': [
838         '../base/base.gyp:base',
839         '../base/base.gyp:base_i18n',
840         '../base/base.gyp:test_support_perf',
841         '../testing/gtest.gyp:gtest',
842         '../url/url.gyp:url_lib',
843         'net',
844         'net_test_support',
845       ],
846       'sources': [
847         'cookies/cookie_monster_perftest.cc',
848         'disk_cache/blockfile/disk_cache_perftest.cc',
849         'proxy/proxy_resolver_perftest.cc',
850       ],
851       'conditions': [
852         [ 'use_v8_in_net==1', {
853             'dependencies': [
854               'net_with_v8',
855             ],
856           }, {  # else: !use_v8_in_net
857             'sources!': [
858               'proxy/proxy_resolver_perftest.cc',
859             ],
860           },
861         ],
862         [ 'OS == "win"', {
863             'conditions': [
864               [ 'icu_use_data_file_flag == 0', {
865                 # This is needed to trigger the dll copy step on windows.
866                 # TODO(mark): Specifying this here shouldn't be necessary.
867                 'dependencies': [
868                   '../third_party/icu/icu.gyp:icudata',
869                 ],
870               }],
871             ],
872             # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
873             'msvs_disabled_warnings': [4267, ],
874         }],
875       ],
876     },
877     {
878       'target_name': 'net_test_support',
879       'type': 'static_library',
880       'dependencies': [
881         '../base/base.gyp:base',
882         '../base/base.gyp:test_support_base',
883         '../net/tools/tld_cleanup/tld_cleanup.gyp:tld_cleanup_util',
884         '../testing/gtest.gyp:gtest',
885         '../testing/gmock.gyp:gmock',
886         '../url/url.gyp:url_lib',
887         'net',
888       ],
889       'export_dependent_settings': [
890         '../base/base.gyp:base',
891         # TODO(mmenke):  This depends on icu, figure out a way to build tests
892         #                without icu.
893         '../base/base.gyp:test_support_base',
894         '../testing/gtest.gyp:gtest',
895         '../testing/gmock.gyp:gmock',
896       ],
897       'sources': [
898         'base/capturing_net_log.cc',
899         'base/capturing_net_log.h',
900         'base/load_timing_info_test_util.cc',
901         'base/load_timing_info_test_util.h',
902         'base/mock_file_stream.cc',
903         'base/mock_file_stream.h',
904         'base/test_completion_callback.cc',
905         'base/test_completion_callback.h',
906         'base/test_data_directory.cc',
907         'base/test_data_directory.h',
908         'cert/mock_cert_verifier.cc',
909         'cert/mock_cert_verifier.h',
910         'cookies/cookie_monster_store_test.cc',
911         'cookies/cookie_monster_store_test.h',
912         'cookies/cookie_store_test_callbacks.cc',
913         'cookies/cookie_store_test_callbacks.h',
914         'cookies/cookie_store_test_helpers.cc',
915         'cookies/cookie_store_test_helpers.h',
916         'disk_cache/disk_cache_test_base.cc',
917         'disk_cache/disk_cache_test_base.h',
918         'disk_cache/disk_cache_test_util.cc',
919         'disk_cache/disk_cache_test_util.h',
920         'dns/dns_test_util.cc',
921         'dns/dns_test_util.h',
922         'dns/mock_host_resolver.cc',
923         'dns/mock_host_resolver.h',
924         'dns/mock_mdns_socket_factory.cc',
925         'dns/mock_mdns_socket_factory.h',
926         'http/http_transaction_test_util.cc',
927         'http/http_transaction_test_util.h',
928         'proxy/mock_proxy_resolver.cc',
929         'proxy/mock_proxy_resolver.h',
930         'proxy/mock_proxy_script_fetcher.cc',
931         'proxy/mock_proxy_script_fetcher.h',
932         'proxy/proxy_config_service_common_unittest.cc',
933         'proxy/proxy_config_service_common_unittest.h',
934         'socket/socket_test_util.cc',
935         'socket/socket_test_util.h',
936         'test/cert_test_util.cc',
937         'test/cert_test_util.h',
938         'test/cert_test_util_nss.cc',
939         'test/ct_test_util.cc',
940         'test/ct_test_util.h',
941         'test/embedded_test_server/embedded_test_server.cc',
942         'test/embedded_test_server/embedded_test_server.h',
943         'test/embedded_test_server/http_connection.cc',
944         'test/embedded_test_server/http_connection.h',
945         'test/embedded_test_server/http_request.cc',
946         'test/embedded_test_server/http_request.h',
947         'test/embedded_test_server/http_response.cc',
948         'test/embedded_test_server/http_response.h',
949         'test/net_test_suite.cc',
950         'test/net_test_suite.h',
951         'test/python_utils.cc',
952         'test/python_utils.h',
953         'test/spawned_test_server/base_test_server.cc',
954         'test/spawned_test_server/base_test_server.h',
955         'test/spawned_test_server/local_test_server_posix.cc',
956         'test/spawned_test_server/local_test_server_win.cc',
957         'test/spawned_test_server/local_test_server.cc',
958         'test/spawned_test_server/local_test_server.h',
959         'test/spawned_test_server/remote_test_server.cc',
960         'test/spawned_test_server/remote_test_server.h',
961         'test/spawned_test_server/spawned_test_server.h',
962         'test/spawned_test_server/spawner_communicator.cc',
963         'test/spawned_test_server/spawner_communicator.h',
964         'url_request/test_url_fetcher_factory.cc',
965         'url_request/test_url_fetcher_factory.h',
966         'url_request/url_request_test_util.cc',
967         'url_request/url_request_test_util.h',
968       ],
969       'conditions': [
970         ['OS != "ios"', {
971           'dependencies': [
972             '../third_party/protobuf/protobuf.gyp:py_proto',
973           ],
974         }],
975         ['os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
976           'conditions': [
977             ['use_openssl==1', {
978               'dependencies': [
979                 '../third_party/boringssl/boringssl.gyp:boringssl',
980               ],
981             }, {
982               'dependencies': [
983                 '../build/linux/system.gyp:ssl',
984               ],
985             }],
986           ],
987         }],
988         ['os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
989           'conditions': [
990             ['use_allocator!="none"', {
991               'dependencies': [
992                 '../base/allocator/allocator.gyp:allocator',
993               ],
994             }],
995           ],
996         }],
997         ['OS != "android"', {
998           'sources!': [
999             'test/spawned_test_server/remote_test_server.cc',
1000             'test/spawned_test_server/remote_test_server.h',
1001             'test/spawned_test_server/spawner_communicator.cc',
1002             'test/spawned_test_server/spawner_communicator.h',
1003           ],
1004         }],
1005         ['OS == "ios"', {
1006           'dependencies': [
1007             '../third_party/nss/nss.gyp:nss',
1008           ],
1009         }],
1010         [ 'use_v8_in_net==1', {
1011             'dependencies': [
1012               'net_with_v8',
1013             ],
1014           },
1015         ],
1016         [ 'enable_mdns != 1', {
1017             'sources!' : [
1018               'dns/mock_mdns_socket_factory.cc',
1019               'dns/mock_mdns_socket_factory.h'
1020             ]
1021         }],
1022         [ 'use_nss != 1', {
1023             'sources!': [
1024               'test/cert_test_util_nss.cc',
1025             ],
1026         }],
1027       ],
1028       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1029       'msvs_disabled_warnings': [4267, ],
1030     },
1031     {
1032       'target_name': 'net_resources',
1033       'type': 'none',
1034       'variables': {
1035         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/net',
1036       },
1037       'actions': [
1038         {
1039           'action_name': 'net_resources',
1040           'variables': {
1041             'grit_grd_file': 'base/net_resources.grd',
1042           },
1043           'includes': [ '../build/grit_action.gypi' ],
1044         },
1045       ],
1046       'includes': [ '../build/grit_target.gypi' ],
1047     },
1048     {
1049       'target_name': 'http_server',
1050       'type': 'static_library',
1051       'variables': { 'enable_wexit_time_destructors': 1, },
1052       'dependencies': [
1053         '../base/base.gyp:base',
1054         'net',
1055       ],
1056       'sources': [
1057         'server/http_connection.cc',
1058         'server/http_connection.h',
1059         'server/http_server.cc',
1060         'server/http_server.h',
1061         'server/http_server_request_info.cc',
1062         'server/http_server_request_info.h',
1063         'server/http_server_response_info.cc',
1064         'server/http_server_response_info.h',
1065         'server/web_socket.cc',
1066         'server/web_socket.h',
1067       ],
1068       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1069       'msvs_disabled_warnings': [4267, ],
1070     },
1071     {
1072       'target_name': 'balsa',
1073       'type': 'static_library',
1074       'dependencies': [
1075         '../base/base.gyp:base',
1076         'net',
1077       ],
1078       'sources': [
1079         'tools/balsa/balsa_enums.h',
1080         'tools/balsa/balsa_frame.cc',
1081         'tools/balsa/balsa_frame.h',
1082         'tools/balsa/balsa_headers.cc',
1083         'tools/balsa/balsa_headers.h',
1084         'tools/balsa/balsa_headers_token_utils.cc',
1085         'tools/balsa/balsa_headers_token_utils.h',
1086         'tools/balsa/balsa_visitor_interface.h',
1087         'tools/balsa/http_message_constants.cc',
1088         'tools/balsa/http_message_constants.h',
1089         'tools/balsa/noop_balsa_visitor.h',
1090         'tools/balsa/simple_buffer.cc',
1091         'tools/balsa/simple_buffer.h',
1092         'tools/balsa/split.cc',
1093         'tools/balsa/split.h',
1094         'tools/balsa/string_piece_utils.h',
1095         'tools/quic/spdy_utils.cc',
1096         'tools/quic/spdy_utils.h',
1097       ],
1098     },
1099     {
1100       'target_name': 'dump_cache',
1101       'type': 'executable',
1102       'dependencies': [
1103         '../base/base.gyp:base',
1104         'net',
1105         'net_test_support',
1106       ],
1107       'sources': [
1108         'tools/dump_cache/cache_dumper.cc',
1109         'tools/dump_cache/cache_dumper.h',
1110         'tools/dump_cache/dump_cache.cc',
1111         'tools/dump_cache/dump_files.cc',
1112         'tools/dump_cache/dump_files.h',
1113         'tools/dump_cache/simple_cache_dumper.cc',
1114         'tools/dump_cache/simple_cache_dumper.h',
1115         'tools/dump_cache/upgrade_win.cc',
1116         'tools/dump_cache/upgrade_win.h',
1117         'tools/dump_cache/url_to_filename_encoder.cc',
1118         'tools/dump_cache/url_to_filename_encoder.h',
1119         'tools/dump_cache/url_utilities.h',
1120         'tools/dump_cache/url_utilities.cc',
1121       ],
1122       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1123       'msvs_disabled_warnings': [4267, ],
1124     },
1125     {
1126       # This is a temporary target which will be merged into 'net' once the
1127       # dependency on balsa is eliminated and the classes are actually used.
1128       'target_name': 'quic_tools',
1129       'type': 'static_library',
1130       'dependencies': [
1131         '../base/base.gyp:base',
1132         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
1133         '../url/url.gyp:url_lib',
1134         'net',
1135       ],
1136       'sources': [
1137         'quic/quic_dispatcher.cc',
1138         'quic/quic_dispatcher.h',
1139         'quic/quic_in_memory_cache.cc',
1140         'quic/quic_in_memory_cache.h',
1141         'quic/quic_per_connection_packet_writer.cc',
1142         'quic/quic_per_connection_packet_writer.h',
1143         'quic/quic_server.cc',
1144         'quic/quic_server.h',
1145         'quic/quic_server_packet_writer.cc',
1146         'quic/quic_server_packet_writer.h',
1147         'quic/quic_server_session.cc',
1148         'quic/quic_server_session.h',
1149         'quic/quic_spdy_server_stream.cc',
1150         'quic/quic_spdy_server_stream.h',
1151         'quic/quic_time_wait_list_manager.cc',
1152         'quic/quic_time_wait_list_manager.h',
1153       ],
1154     },
1155   ],
1156   'conditions': [
1157     ['use_v8_in_net == 1', {
1158       'targets': [
1159         {
1160           'target_name': 'net_with_v8',
1161           'type': '<(component)',
1162           'variables': { 'enable_wexit_time_destructors': 1, },
1163           'dependencies': [
1164             '../base/base.gyp:base',
1165             '../gin/gin.gyp:gin',
1166             '../url/url.gyp:url_lib',
1167             '../v8/tools/gyp/v8.gyp:v8',
1168             'net'
1169           ],
1170           'defines': [
1171             'NET_IMPLEMENTATION',
1172           ],
1173           'sources': [
1174             'proxy/proxy_resolver_v8.cc',
1175             'proxy/proxy_resolver_v8.h',
1176             'proxy/proxy_resolver_v8_tracing.cc',
1177             'proxy/proxy_resolver_v8_tracing.h',
1178             'proxy/proxy_service_v8.cc',
1179             'proxy/proxy_service_v8.h',
1180           ],
1181           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1182           'msvs_disabled_warnings': [4267, ],
1183         },
1184       ],
1185     }],
1186     ['OS != "ios" and OS != "android"', {
1187       'targets': [
1188         # iOS doesn't have the concept of simple executables, these targets
1189         # can't be compiled on the platform.
1190         {
1191           'target_name': 'crash_cache',
1192           'type': 'executable',
1193           'dependencies': [
1194             '../base/base.gyp:base',
1195             'net',
1196             'net_test_support',
1197           ],
1198           'sources': [
1199             'tools/crash_cache/crash_cache.cc',
1200           ],
1201           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1202           'msvs_disabled_warnings': [4267, ],
1203         },
1204         {
1205           'target_name': 'crl_set_dump',
1206           'type': 'executable',
1207           'dependencies': [
1208             '../base/base.gyp:base',
1209             'net',
1210           ],
1211           'sources': [
1212             'tools/crl_set_dump/crl_set_dump.cc',
1213           ],
1214           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1215           'msvs_disabled_warnings': [4267, ],
1216         },
1217         {
1218           'target_name': 'dns_fuzz_stub',
1219           'type': 'executable',
1220           'dependencies': [
1221             '../base/base.gyp:base',
1222             'net',
1223           ],
1224           'sources': [
1225             'tools/dns_fuzz_stub/dns_fuzz_stub.cc',
1226           ],
1227           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1228           'msvs_disabled_warnings': [4267, ],
1229         },
1230         {
1231           'target_name': 'gdig',
1232           'type': 'executable',
1233           'dependencies': [
1234             '../base/base.gyp:base',
1235             'net',
1236           ],
1237           'sources': [
1238             'tools/gdig/file_net_log.cc',
1239             'tools/gdig/gdig.cc',
1240           ],
1241         },
1242         {
1243           'target_name': 'get_server_time',
1244           'type': 'executable',
1245           'dependencies': [
1246             '../base/base.gyp:base',
1247             '../base/base.gyp:base_i18n',
1248             '../url/url.gyp:url_lib',
1249             'net',
1250           ],
1251           'sources': [
1252             'tools/get_server_time/get_server_time.cc',
1253           ],
1254           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1255           'msvs_disabled_warnings': [4267, ],
1256         },
1257         {
1258           'target_name': 'hpack_example_generator',
1259           'type': 'executable',
1260           'dependencies': [
1261             '../base/base.gyp:base',
1262             'net',
1263           ],
1264           'sources': [
1265             'spdy/fuzzing/hpack_example_generator.cc',
1266           ],
1267           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1268           'msvs_disabled_warnings': [4267, ],
1269         },
1270         {
1271           'target_name': 'hpack_fuzz_mutator',
1272           'type': 'executable',
1273           'dependencies': [
1274             '../base/base.gyp:base',
1275             'net',
1276           ],
1277           'sources': [
1278             'spdy/fuzzing/hpack_fuzz_mutator.cc',
1279           ],
1280           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1281           'msvs_disabled_warnings': [4267, ],
1282         },
1283         {
1284           'target_name': 'hpack_fuzz_wrapper',
1285           'type': 'executable',
1286           'dependencies': [
1287             '../base/base.gyp:base',
1288             'net',
1289           ],
1290           'sources': [
1291             'spdy/fuzzing/hpack_fuzz_wrapper.cc',
1292           ],
1293           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1294           'msvs_disabled_warnings': [4267, ],
1295         },
1296         {
1297           'target_name': 'net_watcher',
1298           'type': 'executable',
1299           'dependencies': [
1300             '../base/base.gyp:base',
1301             'net',
1302             'net_with_v8',
1303           ],
1304           'conditions': [
1305             [ 'use_glib == 1', {
1306                 'dependencies': [
1307                   '../build/linux/system.gyp:gconf',
1308                   '../build/linux/system.gyp:gio',
1309                 ],
1310               },
1311             ],
1312           ],
1313           'sources': [
1314             'tools/net_watcher/net_watcher.cc',
1315           ],
1316         },
1317         {
1318           'target_name': 'run_testserver',
1319           'type': 'executable',
1320           'dependencies': [
1321             '../base/base.gyp:base',
1322             '../base/base.gyp:test_support_base',
1323             '../testing/gtest.gyp:gtest',
1324             'net_test_support',
1325           ],
1326           'sources': [
1327             'tools/testserver/run_testserver.cc',
1328           ],
1329         },
1330         {
1331           'target_name': 'stress_cache',
1332           'type': 'executable',
1333           'dependencies': [
1334             '../base/base.gyp:base',
1335             'net',
1336             'net_test_support',
1337           ],
1338           'sources': [
1339             'disk_cache/blockfile/stress_cache.cc',
1340           ],
1341           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1342           'msvs_disabled_warnings': [4267, ],
1343         },
1344         {
1345           'target_name': 'tld_cleanup',
1346           'type': 'executable',
1347           'dependencies': [
1348             '../base/base.gyp:base',
1349             '../base/base.gyp:base_i18n',
1350             '../net/tools/tld_cleanup/tld_cleanup.gyp:tld_cleanup_util',
1351           ],
1352           'sources': [
1353             'tools/tld_cleanup/tld_cleanup.cc',
1354           ],
1355           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1356           'msvs_disabled_warnings': [4267, ],
1357         },
1358       ],
1359     }],
1360     ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
1361       'targets': [
1362         {
1363           'target_name': 'epoll_server',
1364           'type': 'static_library',
1365           'dependencies': [
1366             '../base/base.gyp:base',
1367             'net',
1368           ],
1369           'sources': [
1370             'tools/epoll_server/epoll_server.cc',
1371             'tools/epoll_server/epoll_server.h',
1372           ],
1373         },
1374         {
1375           'target_name': 'flip_in_mem_edsm_server_base',
1376           'type': 'static_library',
1377           'cflags': [
1378             '-Wno-deprecated',
1379           ],
1380           'dependencies': [
1381             '../base/base.gyp:base',
1382             '../third_party/boringssl/boringssl.gyp:boringssl',
1383             'balsa',
1384             'epoll_server',
1385             'net',
1386           ],
1387           'sources': [
1388             'tools/dump_cache/url_to_filename_encoder.cc',
1389             'tools/dump_cache/url_to_filename_encoder.h',
1390             'tools/dump_cache/url_utilities.h',
1391             'tools/dump_cache/url_utilities.cc',
1392             'tools/flip_server/acceptor_thread.h',
1393             'tools/flip_server/acceptor_thread.cc',
1394             'tools/flip_server/create_listener.cc',
1395             'tools/flip_server/create_listener.h',
1396             'tools/flip_server/constants.h',
1397             'tools/flip_server/flip_config.cc',
1398             'tools/flip_server/flip_config.h',
1399             'tools/flip_server/http_interface.cc',
1400             'tools/flip_server/http_interface.h',
1401             'tools/flip_server/loadtime_measurement.h',
1402             'tools/flip_server/mem_cache.h',
1403             'tools/flip_server/mem_cache.cc',
1404             'tools/flip_server/output_ordering.cc',
1405             'tools/flip_server/output_ordering.h',
1406             'tools/flip_server/ring_buffer.cc',
1407             'tools/flip_server/ring_buffer.h',
1408             'tools/flip_server/sm_connection.cc',
1409             'tools/flip_server/sm_connection.h',
1410             'tools/flip_server/sm_interface.h',
1411             'tools/flip_server/spdy_ssl.cc',
1412             'tools/flip_server/spdy_ssl.h',
1413             'tools/flip_server/spdy_interface.cc',
1414             'tools/flip_server/spdy_interface.h',
1415             'tools/flip_server/spdy_util.cc',
1416             'tools/flip_server/spdy_util.h',
1417             'tools/flip_server/streamer_interface.cc',
1418             'tools/flip_server/streamer_interface.h',
1419           ],
1420         },
1421         {
1422           'target_name': 'flip_in_mem_edsm_server_unittests',
1423           'type': 'executable',
1424           'dependencies': [
1425               '../testing/gtest.gyp:gtest',
1426               '../testing/gmock.gyp:gmock',
1427               '../third_party/boringssl/boringssl.gyp:boringssl',
1428               'flip_in_mem_edsm_server_base',
1429               'net',
1430               'net_test_support',
1431           ],
1432           'sources': [
1433             'tools/flip_server/flip_test_utils.cc',
1434             'tools/flip_server/flip_test_utils.h',
1435             'tools/flip_server/http_interface_test.cc',
1436             'tools/flip_server/mem_cache_test.cc',
1437             'tools/flip_server/run_all_tests.cc',
1438             'tools/flip_server/spdy_interface_test.cc',
1439           ],
1440         },
1441         {
1442           'target_name': 'flip_in_mem_edsm_server',
1443           'type': 'executable',
1444           'cflags': [
1445             '-Wno-deprecated',
1446           ],
1447           'dependencies': [
1448             '../base/base.gyp:base',
1449             'flip_in_mem_edsm_server_base',
1450             'net',
1451           ],
1452           'sources': [
1453             'tools/flip_server/flip_in_mem_edsm_server.cc',
1454           ],
1455         },
1456         {
1457           'target_name': 'quic_base',
1458           'type': 'static_library',
1459           'dependencies': [
1460             '../base/base.gyp:base',
1461             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
1462             '../url/url.gyp:url_lib',
1463             'balsa',
1464             'epoll_server',
1465             'net',
1466           ],
1467           'sources': [
1468             'tools/quic/quic_client.cc',
1469             'tools/quic/quic_client.h',
1470             'tools/quic/quic_client_session.cc',
1471             'tools/quic/quic_client_session.h',
1472             'tools/quic/quic_default_packet_writer.cc',
1473             'tools/quic/quic_default_packet_writer.h',
1474             'tools/quic/quic_dispatcher.h',
1475             'tools/quic/quic_dispatcher.cc',
1476             'tools/quic/quic_epoll_clock.cc',
1477             'tools/quic/quic_epoll_clock.h',
1478             'tools/quic/quic_epoll_connection_helper.cc',
1479             'tools/quic/quic_epoll_connection_helper.h',
1480             'tools/quic/quic_in_memory_cache.cc',
1481             'tools/quic/quic_in_memory_cache.h',
1482             'tools/quic/quic_packet_writer_wrapper.cc',
1483             'tools/quic/quic_packet_writer_wrapper.h',
1484             'tools/quic/quic_server.cc',
1485             'tools/quic/quic_server.h',
1486             'tools/quic/quic_server_session.cc',
1487             'tools/quic/quic_server_session.h',
1488             'tools/quic/quic_socket_utils.cc',
1489             'tools/quic/quic_socket_utils.h',
1490             'tools/quic/quic_spdy_client_stream.cc',
1491             'tools/quic/quic_spdy_client_stream.h',
1492             'tools/quic/quic_spdy_server_stream.cc',
1493             'tools/quic/quic_spdy_server_stream.h',
1494             'tools/quic/quic_time_wait_list_manager.h',
1495             'tools/quic/quic_time_wait_list_manager.cc',
1496           ],
1497         },
1498         {
1499           'target_name': 'quic_client',
1500           'type': 'executable',
1501           'dependencies': [
1502             '../base/base.gyp:base',
1503             'net',
1504             'quic_base',
1505           ],
1506           'sources': [
1507             'tools/quic/quic_client_bin.cc',
1508           ],
1509         },
1510         {
1511           'target_name': 'quic_server',
1512           'type': 'executable',
1513           'dependencies': [
1514             '../base/base.gyp:base',
1515             'net',
1516             'quic_tools',
1517           ],
1518           'sources': [
1519             'quic/quic_server_bin.cc',
1520           ],
1521         },
1522       ]
1523     }],
1524     ['OS=="android"', {
1525       'targets': [
1526         {
1527           'target_name': 'net_jni_headers',
1528           'type': 'none',
1529           'sources': [
1530             'android/java/src/org/chromium/net/AndroidCertVerifyResult.java',
1531             'android/java/src/org/chromium/net/AndroidKeyStore.java',
1532             'android/java/src/org/chromium/net/AndroidNetworkLibrary.java',
1533             'android/java/src/org/chromium/net/AndroidPrivateKey.java',
1534             'android/java/src/org/chromium/net/GURLUtils.java',
1535             'android/java/src/org/chromium/net/NetworkChangeNotifier.java',
1536             'android/java/src/org/chromium/net/ProxyChangeListener.java',
1537             'android/java/src/org/chromium/net/X509Util.java',
1538           ],
1539           'variables': {
1540             'jni_gen_package': 'net',
1541           },
1542           'includes': [ '../build/jni_generator.gypi' ],
1544           'conditions': [
1545             ['use_icu_alternatives_on_android==1', {
1546               'sources': [
1547                 'android/java/src/org/chromium/net/NetStringUtil.java',
1548               ],
1549             }],
1550           ],
1551         },
1552         {
1553           'target_name': 'net_test_jni_headers',
1554           'type': 'none',
1555           'sources': [
1556             'android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java',
1557           ],
1558           'variables': {
1559             'jni_gen_package': 'net',
1560           },
1561           'includes': [ '../build/jni_generator.gypi' ],
1562         },
1563         {
1564           'target_name': 'net_java',
1565           'type': 'none',
1566           'variables': {
1567             'java_in_dir': '../net/android/java',
1568           },
1569           'dependencies': [
1570             '../base/base.gyp:base',
1571             'cert_verify_status_android_java',
1572             'certificate_mime_types_java',
1573             'net_errors_java',
1574             'private_key_types_java',
1575             'remote_android_keystore_aidl',
1576           ],
1577           'includes': [ '../build/java.gypi' ],
1578         },
1579         {
1580           # Processes the interface files for communication with an Android KeyStore
1581           # running in a separate process.
1582           'target_name': 'remote_android_keystore_aidl',
1583           'type': 'none',
1584           'variables': {
1585             'aidl_interface_file': '../net/android/java/src/org/chromium/net/IRemoteAndroidKeyStoreInterface.aidl',
1586           },
1587           'sources': [
1588             '../net/android/java/src/org/chromium/net/IRemoteAndroidKeyStore.aidl',
1589             '../net/android/java/src/org/chromium/net/IRemoteAndroidKeyStoreCallbacks.aidl',
1590           ],
1591           'includes': [ '../build/java_aidl.gypi' ],
1592         },
1593         {
1594           'target_name': 'net_java_test_support',
1595           'type': 'none',
1596           'variables': {
1597             'java_in_dir': '../net/test/android/javatests',
1598           },
1599           'includes': [ '../build/java.gypi' ],
1600         },
1601         {
1602           'target_name': 'net_javatests',
1603           'type': 'none',
1604           'variables': {
1605             'java_in_dir': '../net/android/javatests',
1606           },
1607           'dependencies': [
1608             '../base/base.gyp:base',
1609             '../base/base.gyp:base_java_test_support',
1610             'net_java',
1611           ],
1612           'includes': [ '../build/java.gypi' ],
1613         },
1614         {
1615           'target_name': 'net_errors_java',
1616           'type': 'none',
1617           'sources': [
1618             'android/java/NetError.template',
1619           ],
1620           'variables': {
1621             'package_name': 'org/chromium/net',
1622             'template_deps': ['base/net_error_list.h'],
1623           },
1624           'includes': [ '../build/android/java_cpp_template.gypi' ],
1625         },
1626         {
1627           'target_name': 'certificate_mime_types_java',
1628           'type': 'none',
1629           'sources': [
1630             'android/java/CertificateMimeType.template',
1631           ],
1632           'variables': {
1633             'package_name': 'org/chromium/net',
1634             'template_deps': ['base/mime_util_certificate_type_list.h'],
1635           },
1636           'includes': [ '../build/android/java_cpp_template.gypi' ],
1637         },
1638         {
1639           'target_name': 'cert_verify_status_android_java',
1640           'type': 'none',
1641           'sources': [
1642             'android/java/CertVerifyStatusAndroid.template',
1643           ],
1644           'variables': {
1645             'package_name': 'org/chromium/net',
1646             'template_deps': ['android/cert_verify_status_android_list.h'],
1647           },
1648           'includes': [ '../build/android/java_cpp_template.gypi' ],
1649         },
1650         {
1651           'target_name': 'private_key_types_java',
1652           'type': 'none',
1653           'sources': [
1654             'android/java/PrivateKeyType.template',
1655           ],
1656           'variables': {
1657             'package_name': 'org/chromium/net',
1658             'template_deps': ['android/private_key_type_list.h'],
1659           },
1660           'includes': [ '../build/android/java_cpp_template.gypi' ],
1661         },
1662       ],
1663     }],
1664     ['OS == "android"', {
1665       'targets': [
1666         {
1667           'target_name': 'net_unittests_apk',
1668           'type': 'none',
1669           'dependencies': [
1670             'net_java',
1671             'net_javatests',
1672             'net_unittests',
1673           ],
1674           'variables': {
1675             'test_suite_name': 'net_unittests',
1676           },
1677           'includes': [ '../build/apk_test.gypi' ],
1678         },
1679       ],
1680     }],
1681     ['OS == "android" or OS == "linux"', {
1682       'targets': [
1683         {
1684           'target_name': 'disk_cache_memory_test',
1685           'type': 'executable',
1686           'dependencies': [
1687             '../base/base.gyp:base',
1688             'net',
1689           ],
1690           'sources': [
1691             'tools/disk_cache_memory_test/disk_cache_memory_test.cc',
1692           ],
1693         },
1694       ],
1695     }],
1696     ['test_isolation_mode != "noop"', {
1697       'targets': [
1698         {
1699           'target_name': 'net_unittests_run',
1700           'type': 'none',
1701           'dependencies': [
1702             'net_unittests',
1703           ],
1704           'includes': [
1705             '../build/isolate.gypi',
1706             'net_unittests.isolate',
1707           ],
1708           'sources': [
1709             'net_unittests.isolate',
1710           ],
1711         },
1712       ],
1713     }],
1714   ],