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