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