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