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