blob: 49519d4ac00a8d88af19928be65e6e6335591d44 [file] [log] [blame]
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001# Copyright 2013 The Chromium Authors. All rights reserved.
Torne (Richard Coles)58218062012-11-14 11:43:16 +00002# 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,
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010010 'use_tracing_cache_backend%': 0,
Torne (Richard Coles)58218062012-11-14 11:43:16 +000011 'conditions': [
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +000012 ['chromeos==1 or embedded==1 or OS=="android" or OS=="ios"', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +000013 # Disable Kerberos on ChromeOS, Android and iOS, at least for now.
14 # It needs configuration (krb5.conf and so on).
15 'use_kerberos%': 0,
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +000016 }, { # chromeos == 0 and embedded==0 and OS!="android" and OS!="ios"
Torne (Richard Coles)58218062012-11-14 11:43:16 +000017 'use_kerberos%': 1,
18 }],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000019 ['OS=="android" and target_arch != "ia32"', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +000020 # 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.
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000022 # 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.
Torne (Richard Coles)58218062012-11-14 11:43:16 +000025 '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',
Ben Murdocha02191e2014-04-16 11:17:03 +010044 'net.gypi',
Torne (Richard Coles)58218062012-11-14 11:43:16 +000045 ],
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',
Torne (Richard Coles)58218062012-11-14 11:43:16 +000055 '../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',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +010060 '../url/url.gyp:url_lib',
Torne (Richard Coles)58218062012-11-14 11:43:16 +000061 'net_resources',
62 ],
63 'sources': [
Ben Murdocha02191e2014-04-16 11:17:03 +010064 '<@(net_nacl_common_sources)',
65 '<@(net_non_nacl_sources)',
Torne (Richard Coles)58218062012-11-14 11:43:16 +000066 ],
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!': [
Torne (Richard Coles)a1401312014-03-18 10:20:56 +0000124 'disk_cache/blockfile/mapped_file_posix.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000125 ],
126 }, { # else
127 'sources!': [
Torne (Richard Coles)a1401312014-03-18 10:20:56 +0000128 'disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000129 ],
130 }],
131 ['disable_ftp_support==1', {
132 'sources/': [
133 ['exclude', '^ftp/'],
134 ],
135 'sources!': [
136 'url_request/ftp_protocol_handler.cc',
137 'url_request/ftp_protocol_handler.h',
138 'url_request/url_request_ftp_job.cc',
139 'url_request/url_request_ftp_job.h',
140 ],
141 }],
142 ['enable_built_in_dns==1', {
143 'defines': [
144 'ENABLE_BUILT_IN_DNS',
145 ]
146 }, { # else
147 'sources!': [
148 'dns/address_sorter_posix.cc',
149 'dns/address_sorter_posix.h',
150 'dns/dns_client.cc',
151 ],
152 }],
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100153 ['use_tracing_cache_backend==1', {
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000154 'defines': [
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100155 'USE_TRACING_CACHE_BACKEND'
156 ],
157 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000158 ['use_openssl==1', {
159 'sources!': [
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000160 'base/crypto_module_nss.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000161 'base/keygen_handler_nss.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000162 'base/nss_memio.c',
163 'base/nss_memio.h',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100164 'cert/cert_database_nss.cc',
165 'cert/cert_verify_proc_nss.cc',
166 'cert/cert_verify_proc_nss.h',
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000167 'cert/ct_log_verifier_nss.cc',
168 'cert/ct_objects_extractor_nss.cc',
Ben Murdochbb1529c2013-08-08 10:24:53 +0100169 'cert/jwk_serializer_nss.cc',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100170 'cert/nss_cert_database.cc',
171 'cert/nss_cert_database.h',
Ben Murdochc5cede92014-04-10 11:22:14 +0100172 'cert/nss_cert_database_chromeos.cc',
173 'cert/nss_cert_database_chromeos.h',
174 'cert/nss_profile_filter_chromeos.cc',
175 'cert/nss_profile_filter_chromeos.h',
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000176 'cert/scoped_nss_types.h',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100177 'cert/test_root_certs_nss.cc',
178 'cert/x509_certificate_nss.cc',
179 'cert/x509_util_nss.cc',
180 'cert/x509_util_nss.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000181 'ocsp/nss_ocsp.cc',
182 'ocsp/nss_ocsp.h',
Torne (Richard Coles)a1401312014-03-18 10:20:56 +0000183 'quic/crypto/aead_base_decrypter_nss.cc',
184 'quic/crypto/aead_base_encrypter_nss.cc',
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100185 'quic/crypto/aes_128_gcm_12_decrypter_nss.cc',
186 'quic/crypto/aes_128_gcm_12_encrypter_nss.cc',
Torne (Richard Coles)a1401312014-03-18 10:20:56 +0000187 'quic/crypto/chacha20_poly1305_decrypter_nss.cc',
188 'quic/crypto/chacha20_poly1305_encrypter_nss.cc',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100189 'quic/crypto/channel_id_nss.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000190 'quic/crypto/p256_key_exchange_nss.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000191 'socket/nss_ssl_util.cc',
192 'socket/nss_ssl_util.h',
193 'socket/ssl_client_socket_nss.cc',
194 'socket/ssl_client_socket_nss.h',
195 'socket/ssl_server_socket_nss.cc',
196 'socket/ssl_server_socket_nss.h',
197 'third_party/mozilla_security_manager/nsKeygenHandler.cpp',
198 'third_party/mozilla_security_manager/nsKeygenHandler.h',
199 'third_party/mozilla_security_manager/nsNSSCertificateDB.cpp',
200 'third_party/mozilla_security_manager/nsNSSCertificateDB.h',
201 'third_party/mozilla_security_manager/nsPKCS12Blob.cpp',
202 'third_party/mozilla_security_manager/nsPKCS12Blob.h',
203 ],
Ben Murdocheffb81e2014-03-31 11:51:25 +0100204 'dependencies': [
205 '../third_party/openssl/openssl.gyp:openssl',
206 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000207 },
208 { # else !use_openssl: remove the unneeded files
209 'sources!': [
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000210 'base/crypto_module_openssl.cc',
211 'base/keygen_handler_openssl.cc',
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000212 'cert/ct_log_verifier_openssl.cc',
213 'cert/ct_objects_extractor_openssl.cc',
Ben Murdochbb1529c2013-08-08 10:24:53 +0100214 'cert/jwk_serializer_openssl.cc',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100215 'cert/x509_util_openssl.cc',
216 'cert/x509_util_openssl.h',
Torne (Richard Coles)a1401312014-03-18 10:20:56 +0000217 'quic/crypto/aead_base_decrypter_openssl.cc',
218 'quic/crypto/aead_base_encrypter_openssl.cc',
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100219 'quic/crypto/aes_128_gcm_12_decrypter_openssl.cc',
220 'quic/crypto/aes_128_gcm_12_encrypter_openssl.cc',
Torne (Richard Coles)a1401312014-03-18 10:20:56 +0000221 'quic/crypto/chacha20_poly1305_decrypter_openssl.cc',
222 'quic/crypto/chacha20_poly1305_encrypter_openssl.cc',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100223 'quic/crypto/channel_id_openssl.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000224 'quic/crypto/p256_key_exchange_openssl.cc',
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +0000225 'quic/crypto/scoped_evp_aead_ctx.cc',
226 'quic/crypto/scoped_evp_aead_ctx.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000227 'socket/ssl_client_socket_openssl.cc',
228 'socket/ssl_client_socket_openssl.h',
229 'socket/ssl_server_socket_openssl.cc',
Torne (Richard Coles)a3f6a492013-12-18 16:25:09 +0000230 'socket/ssl_session_cache_openssl.cc',
231 'socket/ssl_session_cache_openssl.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000232 ],
233 },
234 ],
Ben Murdocheffb81e2014-03-31 11:51:25 +0100235 [ 'use_openssl_certs == 0', {
236 'sources!': [
237 'base/openssl_private_key_store.h',
238 'base/openssl_private_key_store_android.cc',
239 'base/openssl_private_key_store_memory.cc',
240 'cert/cert_database_openssl.cc',
241 'cert/cert_verify_proc_openssl.cc',
242 'cert/cert_verify_proc_openssl.h',
243 'cert/test_root_certs_openssl.cc',
244 'cert/x509_certificate_openssl.cc',
245 'ssl/openssl_client_key_store.cc',
246 'ssl/openssl_client_key_store.h',
247 ],
248 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000249 [ 'use_glib == 1', {
250 'dependencies': [
251 '../build/linux/system.gyp:gconf',
252 '../build/linux/system.gyp:gio',
253 ],
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000254 }],
255 [ 'desktop_linux == 1 or chromeos == 1', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000256 'conditions': [
Ben Murdocheffb81e2014-03-31 11:51:25 +0100257 ['use_openssl == 0', {
258 # use NSS
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000259 'dependencies': [
260 '../build/linux/system.gyp:ssl',
261 ],
262 }],
263 ['os_bsd==1', {
264 'sources!': [
265 'base/network_change_notifier_linux.cc',
266 'base/network_change_notifier_netlink_linux.cc',
267 'proxy/proxy_config_service_linux.cc',
268 ],
269 },{
270 'dependencies': [
271 '../build/linux/system.gyp:libresolv',
272 ],
273 }],
274 ['OS=="solaris"', {
275 'link_settings': {
276 'ldflags': [
277 '-R/usr/lib/mps',
278 ],
279 },
280 }],
281 ],
282 },
283 { # else: OS is not in the above list
284 'sources!': [
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000285 'base/crypto_module_nss.cc',
286 'base/keygen_handler_nss.cc',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100287 'cert/cert_database_nss.cc',
288 'cert/nss_cert_database.cc',
289 'cert/nss_cert_database.h',
290 'cert/test_root_certs_nss.cc',
291 'cert/x509_certificate_nss.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000292 'ocsp/nss_ocsp.cc',
293 'ocsp/nss_ocsp.h',
294 'third_party/mozilla_security_manager/nsKeygenHandler.cpp',
295 'third_party/mozilla_security_manager/nsKeygenHandler.h',
296 'third_party/mozilla_security_manager/nsNSSCertificateDB.cpp',
297 'third_party/mozilla_security_manager/nsNSSCertificateDB.h',
298 'third_party/mozilla_security_manager/nsPKCS12Blob.cpp',
299 'third_party/mozilla_security_manager/nsPKCS12Blob.h',
300 ],
301 },
302 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000303 [ 'use_nss != 1', {
304 'sources!': [
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100305 'cert/cert_verify_proc_nss.cc',
306 'cert/cert_verify_proc_nss.h',
Torne (Richard Coles)a3f6a492013-12-18 16:25:09 +0000307 'ssl/client_cert_store_nss.cc',
308 'ssl/client_cert_store_nss.h',
Ben Murdochc5cede92014-04-10 11:22:14 +0100309 'ssl/client_cert_store_chromeos.cc',
310 'ssl/client_cert_store_chromeos.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000311 ],
312 }],
313 [ 'enable_websockets != 1', {
314 'sources/': [
315 ['exclude', '^socket_stream/'],
316 ['exclude', '^websockets/'],
317 ],
318 'sources!': [
319 'spdy/spdy_websocket_stream.cc',
320 'spdy/spdy_websocket_stream.h',
321 ],
322 }],
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100323 [ 'enable_mdns != 1', {
324 'sources!' : [
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100325 'dns/mdns_cache.cc',
326 'dns/mdns_cache.h',
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100327 'dns/mdns_client.cc',
328 'dns/mdns_client.h',
329 'dns/mdns_client_impl.cc',
330 'dns/mdns_client_impl.h',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100331 'dns/record_parsed.cc',
332 'dns/record_parsed.h',
333 'dns/record_rdata.cc',
334 'dns/record_rdata.h',
335 ]
336 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000337 [ 'OS == "win"', {
338 'sources!': [
339 'http/http_auth_handler_ntlm_portable.cc',
Torne (Richard Coles)58537e22013-09-12 12:10:22 +0100340 'socket/tcp_socket_libevent.cc',
341 'socket/tcp_socket_libevent.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000342 'udp/udp_socket_libevent.cc',
343 'udp/udp_socket_libevent.h',
344 ],
345 'dependencies': [
346 '../third_party/nss/nss.gyp:nspr',
347 '../third_party/nss/nss.gyp:nss',
348 'third_party/nss/ssl.gyp:libssl',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000349 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000350 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
351 'msvs_disabled_warnings': [4267, ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000352 }, { # else: OS != "win"
353 'sources!': [
354 'base/winsock_init.cc',
355 'base/winsock_init.h',
356 'base/winsock_util.cc',
357 'base/winsock_util.h',
358 'proxy/proxy_resolver_winhttp.cc',
359 'proxy/proxy_resolver_winhttp.h',
360 ],
361 },
362 ],
363 [ 'OS == "mac"', {
Ben Murdocheffb81e2014-03-31 11:51:25 +0100364 'conditions': [
365 [ 'use_openssl == 0', {
366 'dependencies': [
367 # defaults to nss
368 '../third_party/nss/nss.gyp:nspr',
369 '../third_party/nss/nss.gyp:nss',
370 'third_party/nss/ssl.gyp:libssl',
371 ],
372 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000373 ],
374 'link_settings': {
375 'libraries': [
376 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
377 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
378 '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
379 '$(SDKROOT)/usr/lib/libresolv.dylib',
380 ]
381 },
382 },
383 ],
384 [ 'OS == "ios"', {
385 'dependencies': [
386 '../third_party/nss/nss.gyp:nss',
387 'third_party/nss/ssl.gyp:libssl',
388 ],
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +0000389 'sources!': [
Ben Murdochc5cede92014-04-10 11:22:14 +0100390 'disk_cache/blockfile/file_posix.cc',
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +0000391 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000392 'link_settings': {
393 'libraries': [
394 '$(SDKROOT)/System/Library/Frameworks/CFNetwork.framework',
395 '$(SDKROOT)/System/Library/Frameworks/MobileCoreServices.framework',
396 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
397 '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
398 '$(SDKROOT)/usr/lib/libresolv.dylib',
399 ],
400 },
401 },
402 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000403 ['OS=="android" and _toolset=="target" and android_webview_build == 0', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000404 'dependencies': [
405 'net_java',
406 ],
407 }],
408 [ 'OS == "android"', {
409 'dependencies': [
410 '../third_party/openssl/openssl.gyp:openssl',
411 'net_jni_headers',
412 ],
413 'sources!': [
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000414 'base/openssl_private_key_store_memory.cc',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100415 'cert/cert_database_openssl.cc',
416 'cert/cert_verify_proc_openssl.cc',
417 'cert/test_root_certs_openssl.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000418 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000419 # The net/android/keystore_openssl.cc source file needs to
420 # access an OpenSSL-internal header.
421 'include_dirs': [
422 '../third_party/openssl',
423 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000424 },
425 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000426 ],
427 'target_conditions': [
428 # These source files are excluded by default platform rules, but they
429 # are needed in specific cases on other platforms. Re-including them can
430 # only be done in target_conditions as it is evaluated after the
431 # platform rules.
432 ['OS == "android"', {
433 'sources/': [
434 ['include', '^base/platform_mime_util_linux\\.cc$'],
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +0000435 ['include', '^base/address_tracker_linux\\.cc$'],
436 ['include', '^base/address_tracker_linux\\.h$'],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000437 ],
438 }],
439 ['OS == "ios"', {
440 'sources/': [
441 ['include', '^base/network_change_notifier_mac\\.cc$'],
442 ['include', '^base/network_config_watcher_mac\\.cc$'],
443 ['include', '^base/platform_mime_util_mac\\.mm$'],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000444 # The iOS implementation only partially uses NSS and thus does not
445 # defines |use_nss|. In particular the |USE_NSS| preprocessor
446 # definition is not used. The following files are needed though:
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100447 ['include', '^cert/cert_verify_proc_nss\\.cc$'],
448 ['include', '^cert/cert_verify_proc_nss\\.h$'],
449 ['include', '^cert/test_root_certs_nss\\.cc$'],
450 ['include', '^cert/x509_util_nss\\.cc$'],
451 ['include', '^cert/x509_util_nss\\.h$'],
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100452 ['include', '^proxy/proxy_resolver_mac\\.cc$'],
453 ['include', '^proxy/proxy_server_mac\\.cc$'],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000454 ['include', '^ocsp/nss_ocsp\\.cc$'],
455 ['include', '^ocsp/nss_ocsp\\.h$'],
456 ],
457 }],
458 ],
459 },
460 {
461 'target_name': 'net_unittests',
462 'type': '<(gtest_target_type)',
463 'dependencies': [
464 '../base/base.gyp:base',
465 '../base/base.gyp:base_i18n',
466 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000467 '../crypto/crypto.gyp:crypto',
468 '../testing/gmock.gyp:gmock',
469 '../testing/gtest.gyp:gtest',
470 '../third_party/zlib/zlib.gyp:zlib',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100471 '../url/url.gyp:url_lib',
Ben Murdocha3f7b4e2013-07-24 10:36:34 +0100472 'http_server',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000473 'net',
Ben Murdocha3f7b4e2013-07-24 10:36:34 +0100474 'net_test_support'
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000475 ],
476 'sources': [
Ben Murdocha02191e2014-04-16 11:17:03 +0100477 '<@(net_test_sources)',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000478 ],
479 'conditions': [
Ben Murdocha3f7b4e2013-07-24 10:36:34 +0100480 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
481 'dependencies': [
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +0100482 'balsa',
483 'epoll_server',
484 'flip_in_mem_edsm_server_base',
485 'quic_base',
Ben Murdocha3f7b4e2013-07-24 10:36:34 +0100486 ],
487 'sources': [
Ben Murdocha02191e2014-04-16 11:17:03 +0100488 '<@(net_linux_test_sources)',
Ben Murdocha3f7b4e2013-07-24 10:36:34 +0100489 ],
490 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000491 ['chromeos==1', {
492 'sources!': [
493 'base/network_change_notifier_linux_unittest.cc',
494 'proxy/proxy_config_service_linux_unittest.cc',
495 ],
496 }],
497 [ 'OS == "android"', {
498 'sources!': [
Ben Murdocheffb81e2014-03-31 11:51:25 +0100499 # See bug http://crbug.com/344533.
500 'disk_cache/blockfile/index_table_v3_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000501 # No res_ninit() et al on Android, so this doesn't make a lot of
502 # sense.
503 'dns/dns_config_service_posix_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000504 ],
505 'dependencies': [
506 'net_javatests',
507 'net_test_jni_headers',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000508 ],
509 }],
Torne (Richard Coles)a3f6a492013-12-18 16:25:09 +0000510 [ 'use_nss != 1', {
511 'sources!': [
512 'ssl/client_cert_store_nss_unittest.cc',
Ben Murdochc5cede92014-04-10 11:22:14 +0100513 'ssl/client_cert_store_chromeos_unittest.cc',
Torne (Richard Coles)a3f6a492013-12-18 16:25:09 +0000514 ],
515 }],
516 [ 'use_openssl == 1', {
517 # Avoid compiling/linking with the system library.
518 'dependencies': [
519 '../third_party/openssl/openssl.gyp:openssl',
520 ],
521 }, { # use_openssl == 0
522 'conditions': [
523 [ 'desktop_linux == 1 or chromeos == 1', {
524 'dependencies': [
525 '../build/linux/system.gyp:ssl',
526 ],
527 }, { # desktop_linux == 0 and chromeos == 0
528 'sources!': [
529 'cert/nss_cert_database_unittest.cc',
530 ],
531 }],
532 ],
533 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000534 [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
535 'conditions': [
Torne (Richard Coles)a1401312014-03-18 10:20:56 +0000536 # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
537 ['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000538 'dependencies': [
539 '../base/allocator/allocator.gyp:allocator',
540 ],
541 }],
542 ],
543 }],
544 [ 'use_kerberos==1', {
545 'defines': [
546 'USE_KERBEROS',
547 ],
548 }, { # use_kerberos == 0
549 'sources!': [
550 'http/http_auth_gssapi_posix_unittest.cc',
551 'http/http_auth_handler_negotiate_unittest.cc',
552 'http/mock_gssapi_library_posix.cc',
553 'http/mock_gssapi_library_posix.h',
554 ],
555 }],
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000556 [ 'use_openssl == 1 or (desktop_linux == 0 and chromeos == 0 and OS != "ios")', {
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100557 # Only include this test when on Posix and using NSS for
558 # cert verification or on iOS (which also uses NSS for certs).
559 'sources!': [
560 'ocsp/nss_ocsp_unittest.cc',
561 ],
562 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000563 [ 'use_openssl==1', {
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000564 # When building for OpenSSL, we need to exclude NSS specific tests
565 # or functionality not supported by OpenSSL yet.
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000566 # TODO(bulach): Add equivalent tests when the underlying
567 # functionality is ported to OpenSSL.
568 'sources!': [
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000569 'cert/ct_objects_extractor_unittest.cc',
570 'cert/multi_log_ct_verifier_unittest.cc',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100571 'cert/nss_cert_database_unittest.cc',
Ben Murdochc5cede92014-04-10 11:22:14 +0100572 'cert/nss_cert_database_chromeos_unittest.cc',
573 'cert/nss_profile_filter_chromeos_unittest.cc',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100574 'cert/x509_util_nss_unittest.cc',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100575 'quic/test_tools/crypto_test_utils_nss.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000576 ],
577 }, { # else !use_openssl: remove the unneeded files
578 'sources!': [
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100579 'cert/x509_util_openssl_unittest.cc',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100580 'quic/test_tools/crypto_test_utils_openssl.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000581 'socket/ssl_client_socket_openssl_unittest.cc',
Torne (Richard Coles)a3f6a492013-12-18 16:25:09 +0000582 'socket/ssl_session_cache_openssl_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000583 ],
584 },
585 ],
Ben Murdocheffb81e2014-03-31 11:51:25 +0100586 [ 'use_openssl_certs == 0', {
587 'sources!': [
588 'ssl/openssl_client_key_store_unittest.cc',
589 ],
590 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000591 [ 'enable_websockets != 1', {
592 'sources/': [
593 ['exclude', '^socket_stream/'],
594 ['exclude', '^websockets/'],
Ben Murdocheb525c52013-07-10 11:40:50 +0100595 ['exclude', '^spdy/spdy_websocket_stream_unittest\\.cc$'],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000596 ],
597 }],
598 [ 'disable_ftp_support==1', {
599 'sources/': [
600 ['exclude', '^ftp/'],
601 ],
602 'sources!': [
603 'url_request/url_request_ftp_job_unittest.cc',
604 ],
605 },
606 ],
607 [ 'enable_built_in_dns!=1', {
608 'sources!': [
609 'dns/address_sorter_posix_unittest.cc',
610 'dns/address_sorter_unittest.cc',
611 ],
612 },
613 ],
614 [ 'use_v8_in_net==1', {
615 'dependencies': [
616 'net_with_v8',
617 ],
618 }, { # else: !use_v8_in_net
619 'sources!': [
620 'proxy/proxy_resolver_v8_unittest.cc',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000621 'proxy/proxy_resolver_v8_tracing_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000622 ],
623 },
624 ],
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100625
626 [ 'enable_mdns != 1', {
627 'sources!' : [
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100628 'dns/mdns_cache_unittest.cc',
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100629 'dns/mdns_client_unittest.cc',
630 'dns/mdns_query_unittest.cc',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100631 'dns/record_parsed_unittest.cc',
632 'dns/record_rdata_unittest.cc',
633 ],
634 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000635 [ 'OS == "win"', {
636 'sources!': [
637 'dns/dns_config_service_posix_unittest.cc',
638 'http/http_auth_gssapi_posix_unittest.cc',
639 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000640 'dependencies': [
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000641 '../third_party/nss/nss.gyp:nspr',
642 '../third_party/nss/nss.gyp:nss',
643 'third_party/nss/ssl.gyp:libssl',
644 ],
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +0000645 'conditions': [
646 [ 'icu_use_data_file_flag == 0', {
647 # This is needed to trigger the dll copy step on windows.
648 # TODO(mark): Specifying this here shouldn't be necessary.
649 'dependencies': [
650 '../third_party/icu/icu.gyp:icudata',
651 ],
652 }],
653 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000654 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
655 'msvs_disabled_warnings': [4267, ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000656 },
657 ],
Ben Murdocheffb81e2014-03-31 11:51:25 +0100658 [ 'OS == "mac" and use_openssl == 0', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000659 'dependencies': [
660 '../third_party/nss/nss.gyp:nspr',
661 '../third_party/nss/nss.gyp:nss',
662 'third_party/nss/ssl.gyp:libssl',
663 ],
664 },
665 ],
666 [ 'OS == "ios"', {
667 'dependencies': [
668 '../third_party/nss/nss.gyp:nss',
669 ],
670 'actions': [
671 {
672 'action_name': 'copy_test_data',
673 'variables': {
674 'test_data_files': [
675 'data/ssl/certificates/',
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100676 'data/test.html',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000677 'data/url_request_unittest/',
678 ],
679 'test_data_prefix': 'net',
680 },
681 'includes': [ '../build/copy_test_data_ios.gypi' ],
682 },
683 ],
684 'sources!': [
685 # TODO(droger): The following tests are disabled because the
686 # implementation is missing or incomplete.
687 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
688 'base/keygen_handler_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000689 'disk_cache/backend_unittest.cc',
Torne (Richard Coles)a1401312014-03-18 10:20:56 +0000690 'disk_cache/blockfile/block_files_unittest.cc',
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +0000691 # Need to read input data files.
692 'filter/gzip_filter_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000693 'socket/ssl_server_socket_unittest.cc',
Bo Liu5c02ac12014-05-01 10:37:37 -0700694 'spdy/fuzzing/hpack_fuzz_util_test.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000695 # Need TestServer.
696 'proxy/proxy_script_fetcher_impl_unittest.cc',
697 'socket/ssl_client_socket_unittest.cc',
698 'url_request/url_fetcher_impl_unittest.cc',
699 'url_request/url_request_context_builder_unittest.cc',
700 # Needs GetAppOutput().
701 'test/python_utils_unittest.cc',
702
703 # The following tests are disabled because they don't apply to
704 # iOS.
705 # OS is not "linux" or "freebsd" or "openbsd".
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100706 'socket/unix_domain_socket_posix_unittest.cc',
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +0000707
Ben Murdocheffb81e2014-03-31 11:51:25 +0100708 # See bug http://crbug.com/344533.
709 'disk_cache/blockfile/index_table_v3_unittest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000710 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000711 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000712 [ 'OS == "android"', {
713 'dependencies': [
714 '../third_party/openssl/openssl.gyp:openssl',
715 ],
716 'sources!': [
717 'dns/dns_config_service_posix_unittest.cc',
718 ],
719 },
720 ],
721 ['OS == "android" and gtest_target_type == "shared_library"', {
722 'dependencies': [
723 '../testing/android/native_test.gyp:native_test_native_code',
724 ]
725 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000726 ],
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +0000727 'target_conditions': [
728 # These source files are excluded by default platform rules, but they
729 # are needed in specific cases on other platforms. Re-including them can
730 # only be done in target_conditions as it is evaluated after the
731 # platform rules.
732 ['OS == "android"', {
733 'sources/': [
734 ['include', '^base/address_tracker_linux_unittest\\.cc$'],
735 ],
736 }],
737 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000738 },
739 {
740 'target_name': 'net_perftests',
741 'type': 'executable',
742 'dependencies': [
743 '../base/base.gyp:base',
744 '../base/base.gyp:base_i18n',
745 '../base/base.gyp:test_support_perf',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000746 '../testing/gtest.gyp:gtest',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100747 '../url/url.gyp:url_lib',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000748 'net',
749 'net_test_support',
750 ],
751 'sources': [
752 'cookies/cookie_monster_perftest.cc',
Torne (Richard Coles)a1401312014-03-18 10:20:56 +0000753 'disk_cache/blockfile/disk_cache_perftest.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000754 'proxy/proxy_resolver_perftest.cc',
755 ],
756 'conditions': [
757 [ 'use_v8_in_net==1', {
758 'dependencies': [
759 'net_with_v8',
760 ],
761 }, { # else: !use_v8_in_net
762 'sources!': [
763 'proxy/proxy_resolver_perftest.cc',
764 ],
765 },
766 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000767 [ 'OS == "win"', {
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +0000768 'conditions': [
769 [ 'icu_use_data_file_flag == 0', {
770 # This is needed to trigger the dll copy step on windows.
771 # TODO(mark): Specifying this here shouldn't be necessary.
772 'dependencies': [
773 '../third_party/icu/icu.gyp:icudata',
774 ],
775 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000776 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000777 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
778 'msvs_disabled_warnings': [4267, ],
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +0000779 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000780 ],
781 },
782 {
783 'target_name': 'net_test_support',
784 'type': 'static_library',
785 'dependencies': [
786 '../base/base.gyp:base',
787 '../base/base.gyp:test_support_base',
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +0100788 '../net/tools/tld_cleanup/tld_cleanup.gyp:tld_cleanup_util',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000789 '../testing/gtest.gyp:gtest',
Ben Murdocheb525c52013-07-10 11:40:50 +0100790 '../testing/gmock.gyp:gmock',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100791 '../url/url.gyp:url_lib',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000792 'net',
793 ],
794 'export_dependent_settings': [
795 '../base/base.gyp:base',
796 '../base/base.gyp:test_support_base',
797 '../testing/gtest.gyp:gtest',
Ben Murdocheb525c52013-07-10 11:40:50 +0100798 '../testing/gmock.gyp:gmock',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000799 ],
800 'sources': [
801 'base/capturing_net_log.cc',
802 'base/capturing_net_log.h',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000803 'base/load_timing_info_test_util.cc',
804 'base/load_timing_info_test_util.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000805 'base/mock_file_stream.cc',
806 'base/mock_file_stream.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000807 'base/test_completion_callback.cc',
808 'base/test_completion_callback.h',
809 'base/test_data_directory.cc',
810 'base/test_data_directory.h',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100811 'cert/mock_cert_verifier.cc',
812 'cert/mock_cert_verifier.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000813 'cookies/cookie_monster_store_test.cc',
814 'cookies/cookie_monster_store_test.h',
815 'cookies/cookie_store_test_callbacks.cc',
816 'cookies/cookie_store_test_callbacks.h',
817 'cookies/cookie_store_test_helpers.cc',
818 'cookies/cookie_store_test_helpers.h',
819 'disk_cache/disk_cache_test_base.cc',
820 'disk_cache/disk_cache_test_base.h',
821 'disk_cache/disk_cache_test_util.cc',
822 'disk_cache/disk_cache_test_util.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000823 'dns/dns_test_util.cc',
824 'dns/dns_test_util.h',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000825 'dns/mock_host_resolver.cc',
826 'dns/mock_host_resolver.h',
Ben Murdocheb525c52013-07-10 11:40:50 +0100827 'dns/mock_mdns_socket_factory.cc',
828 'dns/mock_mdns_socket_factory.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000829 'proxy/mock_proxy_resolver.cc',
830 'proxy/mock_proxy_resolver.h',
831 'proxy/mock_proxy_script_fetcher.cc',
832 'proxy/mock_proxy_script_fetcher.h',
833 'proxy/proxy_config_service_common_unittest.cc',
834 'proxy/proxy_config_service_common_unittest.h',
835 'socket/socket_test_util.cc',
836 'socket/socket_test_util.h',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100837 'test/cert_test_util.cc',
838 'test/cert_test_util.h',
Torne (Richard Coles)0f1bc082013-11-06 12:27:47 +0000839 'test/ct_test_util.cc',
840 'test/ct_test_util.h',
Torne (Richard Coles)b2df76e2013-05-13 16:52:09 +0100841 'test/embedded_test_server/embedded_test_server.cc',
842 'test/embedded_test_server/embedded_test_server.h',
843 'test/embedded_test_server/http_connection.cc',
844 'test/embedded_test_server/http_connection.h',
845 'test/embedded_test_server/http_request.cc',
846 'test/embedded_test_server/http_request.h',
847 'test/embedded_test_server/http_response.cc',
848 'test/embedded_test_server/http_response.h',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000849 'test/net_test_suite.cc',
850 'test/net_test_suite.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000851 'test/python_utils.cc',
852 'test/python_utils.h',
Torne (Richard Coles)b2df76e2013-05-13 16:52:09 +0100853 'test/spawned_test_server/base_test_server.cc',
854 'test/spawned_test_server/base_test_server.h',
855 'test/spawned_test_server/local_test_server_posix.cc',
856 'test/spawned_test_server/local_test_server_win.cc',
857 'test/spawned_test_server/local_test_server.cc',
858 'test/spawned_test_server/local_test_server.h',
859 'test/spawned_test_server/remote_test_server.cc',
860 'test/spawned_test_server/remote_test_server.h',
861 'test/spawned_test_server/spawned_test_server.h',
862 'test/spawned_test_server/spawner_communicator.cc',
863 'test/spawned_test_server/spawner_communicator.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000864 'url_request/test_url_fetcher_factory.cc',
865 'url_request/test_url_fetcher_factory.h',
866 'url_request/url_request_test_util.cc',
867 'url_request/url_request_test_util.h',
868 ],
869 'conditions': [
Torne (Richard Coles)b2df76e2013-05-13 16:52:09 +0100870 ['OS != "ios"', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000871 'dependencies': [
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000872 '../third_party/protobuf/protobuf.gyp:py_proto',
873 ],
874 }],
875 ['os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
876 'conditions': [
877 ['use_openssl==1', {
878 'dependencies': [
879 '../third_party/openssl/openssl.gyp:openssl',
880 ],
881 }, {
882 'dependencies': [
883 '../build/linux/system.gyp:ssl',
884 ],
885 }],
886 ],
887 }],
888 ['os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
889 'conditions': [
Torne (Richard Coles)a1401312014-03-18 10:20:56 +0000890 # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
891 ['(use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1)', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000892 'dependencies': [
893 '../base/allocator/allocator.gyp:allocator',
894 ],
895 }],
896 ],
897 }],
898 ['OS != "android"', {
899 'sources!': [
Torne (Richard Coles)b2df76e2013-05-13 16:52:09 +0100900 'test/spawned_test_server/remote_test_server.cc',
901 'test/spawned_test_server/remote_test_server.h',
902 'test/spawned_test_server/spawner_communicator.cc',
903 'test/spawned_test_server/spawner_communicator.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000904 ],
905 }],
906 ['OS == "ios"', {
907 'dependencies': [
908 '../third_party/nss/nss.gyp:nss',
909 ],
910 }],
911 [ 'use_v8_in_net==1', {
912 'dependencies': [
913 'net_with_v8',
914 ],
915 },
916 ],
Ben Murdocheb525c52013-07-10 11:40:50 +0100917 [ 'enable_mdns != 1', {
918 'sources!' : [
919 'dns/mock_mdns_socket_factory.cc',
920 'dns/mock_mdns_socket_factory.h'
921 ]
922 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000923 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000924 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
925 'msvs_disabled_warnings': [4267, ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000926 },
927 {
928 'target_name': 'net_resources',
929 'type': 'none',
930 'variables': {
931 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/net',
932 },
933 'actions': [
934 {
935 'action_name': 'net_resources',
936 'variables': {
937 'grit_grd_file': 'base/net_resources.grd',
938 },
939 'includes': [ '../build/grit_action.gypi' ],
940 },
941 ],
942 'includes': [ '../build/grit_target.gypi' ],
943 },
944 {
945 'target_name': 'http_server',
946 'type': 'static_library',
947 'variables': { 'enable_wexit_time_destructors': 1, },
948 'dependencies': [
949 '../base/base.gyp:base',
950 'net',
951 ],
952 'sources': [
953 'server/http_connection.cc',
954 'server/http_connection.h',
955 'server/http_server.cc',
956 'server/http_server.h',
957 'server/http_server_request_info.cc',
958 'server/http_server_request_info.h',
Ben Murdocha3f7b4e2013-07-24 10:36:34 +0100959 'server/http_server_response_info.cc',
960 'server/http_server_response_info.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000961 'server/web_socket.cc',
962 'server/web_socket.h',
963 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000964 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
965 'msvs_disabled_warnings': [4267, ],
966 },
967 {
968 'target_name': 'dump_cache',
969 'type': 'executable',
970 'dependencies': [
971 '../base/base.gyp:base',
972 'net',
973 'net_test_support',
974 ],
975 'sources': [
976 'tools/dump_cache/cache_dumper.cc',
977 'tools/dump_cache/cache_dumper.h',
978 'tools/dump_cache/dump_cache.cc',
979 'tools/dump_cache/dump_files.cc',
980 'tools/dump_cache/dump_files.h',
981 'tools/dump_cache/simple_cache_dumper.cc',
982 'tools/dump_cache/simple_cache_dumper.h',
983 'tools/dump_cache/upgrade_win.cc',
984 'tools/dump_cache/upgrade_win.h',
985 'tools/dump_cache/url_to_filename_encoder.cc',
986 'tools/dump_cache/url_to_filename_encoder.h',
987 'tools/dump_cache/url_utilities.h',
988 'tools/dump_cache/url_utilities.cc',
989 ],
990 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
991 'msvs_disabled_warnings': [4267, ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000992 },
993 ],
994 'conditions': [
995 ['use_v8_in_net == 1', {
996 'targets': [
997 {
998 'target_name': 'net_with_v8',
999 'type': '<(component)',
1000 'variables': { 'enable_wexit_time_destructors': 1, },
1001 'dependencies': [
1002 '../base/base.gyp:base',
Ben Murdochc5cede92014-04-10 11:22:14 +01001003 '../gin/gin.gyp:gin',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +01001004 '../url/url.gyp:url_lib',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001005 '../v8/tools/gyp/v8.gyp:v8',
1006 'net'
1007 ],
1008 'defines': [
1009 'NET_IMPLEMENTATION',
1010 ],
1011 'sources': [
1012 'proxy/proxy_resolver_v8.cc',
1013 'proxy/proxy_resolver_v8.h',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001014 'proxy/proxy_resolver_v8_tracing.cc',
1015 'proxy/proxy_resolver_v8_tracing.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001016 'proxy/proxy_service_v8.cc',
1017 'proxy/proxy_service_v8.h',
1018 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001019 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1020 'msvs_disabled_warnings': [4267, ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001021 },
1022 ],
1023 }],
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +00001024 ['OS != "ios" and OS != "android"', {
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001025 'targets': [
1026 # iOS doesn't have the concept of simple executables, these targets
1027 # can't be compiled on the platform.
1028 {
1029 'target_name': 'crash_cache',
1030 'type': 'executable',
1031 'dependencies': [
1032 '../base/base.gyp:base',
1033 'net',
1034 'net_test_support',
1035 ],
1036 'sources': [
1037 'tools/crash_cache/crash_cache.cc',
1038 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001039 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1040 'msvs_disabled_warnings': [4267, ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001041 },
1042 {
1043 'target_name': 'crl_set_dump',
1044 'type': 'executable',
1045 'dependencies': [
1046 '../base/base.gyp:base',
1047 'net',
1048 ],
1049 'sources': [
1050 'tools/crl_set_dump/crl_set_dump.cc',
1051 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001052 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1053 'msvs_disabled_warnings': [4267, ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001054 },
1055 {
1056 'target_name': 'dns_fuzz_stub',
1057 'type': 'executable',
1058 'dependencies': [
1059 '../base/base.gyp:base',
1060 'net',
1061 ],
1062 'sources': [
1063 'tools/dns_fuzz_stub/dns_fuzz_stub.cc',
1064 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001065 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1066 'msvs_disabled_warnings': [4267, ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001067 },
1068 {
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001069 'target_name': 'gdig',
1070 'type': 'executable',
1071 'dependencies': [
1072 '../base/base.gyp:base',
1073 'net',
1074 ],
1075 'sources': [
1076 'tools/gdig/file_net_log.cc',
1077 'tools/gdig/gdig.cc',
1078 ],
1079 },
1080 {
1081 'target_name': 'get_server_time',
1082 'type': 'executable',
1083 'dependencies': [
1084 '../base/base.gyp:base',
1085 '../base/base.gyp:base_i18n',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +01001086 '../url/url.gyp:url_lib',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001087 'net',
1088 ],
1089 'sources': [
1090 'tools/get_server_time/get_server_time.cc',
1091 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001092 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1093 'msvs_disabled_warnings': [4267, ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001094 },
1095 {
1096 'target_name': 'net_watcher',
1097 'type': 'executable',
1098 'dependencies': [
1099 '../base/base.gyp:base',
1100 'net',
1101 'net_with_v8',
1102 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001103 'conditions': [
1104 [ 'use_glib == 1', {
1105 'dependencies': [
1106 '../build/linux/system.gyp:gconf',
1107 '../build/linux/system.gyp:gio',
1108 ],
1109 },
1110 ],
1111 ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001112 'sources': [
1113 'tools/net_watcher/net_watcher.cc',
1114 ],
1115 },
1116 {
1117 'target_name': 'run_testserver',
1118 'type': 'executable',
1119 'dependencies': [
1120 '../base/base.gyp:base',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001121 '../base/base.gyp:test_support_base',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001122 '../testing/gtest.gyp:gtest',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001123 'net_test_support',
1124 ],
1125 'sources': [
1126 'tools/testserver/run_testserver.cc',
1127 ],
1128 },
1129 {
1130 'target_name': 'stress_cache',
1131 'type': 'executable',
1132 'dependencies': [
1133 '../base/base.gyp:base',
1134 'net',
1135 'net_test_support',
1136 ],
1137 'sources': [
Torne (Richard Coles)a1401312014-03-18 10:20:56 +00001138 'disk_cache/blockfile/stress_cache.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001139 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001140 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1141 'msvs_disabled_warnings': [4267, ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001142 },
1143 {
1144 'target_name': 'tld_cleanup',
1145 'type': 'executable',
1146 'dependencies': [
1147 '../base/base.gyp:base',
1148 '../base/base.gyp:base_i18n',
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +01001149 '../net/tools/tld_cleanup/tld_cleanup.gyp:tld_cleanup_util',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001150 ],
1151 'sources': [
1152 'tools/tld_cleanup/tld_cleanup.cc',
1153 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001154 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1155 'msvs_disabled_warnings': [4267, ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001156 },
1157 ],
1158 }],
1159 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
1160 'targets': [
1161 {
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +01001162 'target_name': 'balsa',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001163 'type': 'static_library',
1164 'dependencies': [
1165 '../base/base.gyp:base',
1166 'net',
1167 ],
1168 'sources': [
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +01001169 'tools/balsa/balsa_enums.h',
1170 'tools/balsa/balsa_frame.cc',
1171 'tools/balsa/balsa_frame.h',
1172 'tools/balsa/balsa_headers.cc',
1173 'tools/balsa/balsa_headers.h',
1174 'tools/balsa/balsa_headers_token_utils.cc',
1175 'tools/balsa/balsa_headers_token_utils.h',
1176 'tools/balsa/balsa_visitor_interface.h',
1177 'tools/balsa/http_message_constants.cc',
1178 'tools/balsa/http_message_constants.h',
1179 'tools/balsa/noop_balsa_visitor.h',
1180 'tools/balsa/simple_buffer.cc',
1181 'tools/balsa/simple_buffer.h',
1182 'tools/balsa/split.cc',
1183 'tools/balsa/split.h',
Torne (Richard Coles)a3f6a492013-12-18 16:25:09 +00001184 'tools/balsa/string_piece_utils.h',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001185 ],
1186 },
1187 {
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +01001188 'target_name': 'epoll_server',
1189 'type': 'static_library',
1190 'dependencies': [
1191 '../base/base.gyp:base',
1192 'net',
1193 ],
1194 'sources': [
1195 'tools/epoll_server/epoll_server.cc',
1196 'tools/epoll_server/epoll_server.h',
1197 ],
1198 },
1199 {
1200 'target_name': 'flip_in_mem_edsm_server_base',
Ben Murdoch2385ea32013-08-06 11:01:04 +01001201 'type': 'static_library',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001202 'cflags': [
1203 '-Wno-deprecated',
1204 ],
1205 'dependencies': [
1206 '../base/base.gyp:base',
1207 '../third_party/openssl/openssl.gyp:openssl',
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +01001208 'balsa',
1209 'epoll_server',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001210 'net',
1211 ],
1212 'sources': [
1213 'tools/dump_cache/url_to_filename_encoder.cc',
1214 'tools/dump_cache/url_to_filename_encoder.h',
1215 'tools/dump_cache/url_utilities.h',
1216 'tools/dump_cache/url_utilities.cc',
1217 'tools/flip_server/acceptor_thread.h',
1218 'tools/flip_server/acceptor_thread.cc',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001219 'tools/flip_server/create_listener.cc',
1220 'tools/flip_server/create_listener.h',
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +01001221 'tools/flip_server/constants.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001222 'tools/flip_server/flip_config.cc',
1223 'tools/flip_server/flip_config.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001224 'tools/flip_server/http_interface.cc',
1225 'tools/flip_server/http_interface.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001226 'tools/flip_server/loadtime_measurement.h',
1227 'tools/flip_server/mem_cache.h',
1228 'tools/flip_server/mem_cache.cc',
1229 'tools/flip_server/output_ordering.cc',
1230 'tools/flip_server/output_ordering.h',
1231 'tools/flip_server/ring_buffer.cc',
1232 'tools/flip_server/ring_buffer.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001233 'tools/flip_server/sm_connection.cc',
1234 'tools/flip_server/sm_connection.h',
1235 'tools/flip_server/sm_interface.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001236 'tools/flip_server/spdy_ssl.cc',
1237 'tools/flip_server/spdy_ssl.h',
1238 'tools/flip_server/spdy_interface.cc',
1239 'tools/flip_server/spdy_interface.h',
1240 'tools/flip_server/spdy_util.cc',
1241 'tools/flip_server/spdy_util.h',
1242 'tools/flip_server/streamer_interface.cc',
1243 'tools/flip_server/streamer_interface.h',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001244 ],
1245 },
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001246 {
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +00001247 'target_name': 'flip_in_mem_edsm_server_unittests',
1248 'type': 'executable',
1249 'dependencies': [
1250 '../testing/gtest.gyp:gtest',
1251 '../testing/gmock.gyp:gmock',
1252 '../third_party/openssl/openssl.gyp:openssl',
1253 'flip_in_mem_edsm_server_base',
1254 'net',
1255 'net_test_support',
1256 ],
1257 'sources': [
1258 'tools/flip_server/flip_test_utils.cc',
1259 'tools/flip_server/flip_test_utils.h',
1260 'tools/flip_server/http_interface_test.cc',
1261 'tools/flip_server/mem_cache_test.cc',
1262 'tools/flip_server/run_all_tests.cc',
1263 'tools/flip_server/spdy_interface_test.cc',
1264 ],
1265 },
1266 {
Ben Murdoch2385ea32013-08-06 11:01:04 +01001267 'target_name': 'flip_in_mem_edsm_server',
1268 'type': 'executable',
1269 'cflags': [
1270 '-Wno-deprecated',
1271 ],
1272 'dependencies': [
1273 '../base/base.gyp:base',
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +01001274 'flip_in_mem_edsm_server_base',
Ben Murdoch2385ea32013-08-06 11:01:04 +01001275 'net',
1276 ],
1277 'sources': [
1278 'tools/flip_server/flip_in_mem_edsm_server.cc',
1279 ],
1280 },
1281 {
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +01001282 'target_name': 'quic_base',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001283 'type': 'static_library',
1284 'dependencies': [
1285 '../base/base.gyp:base',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001286 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +01001287 '../crypto/crypto.gyp:crypto',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001288 '../third_party/openssl/openssl.gyp:openssl',
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +01001289 '../url/url.gyp:url_lib',
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +01001290 'balsa',
1291 'epoll_server',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001292 'net',
1293 ],
1294 'sources': [
1295 'tools/quic/quic_client.cc',
1296 'tools/quic/quic_client.h',
1297 'tools/quic/quic_client_session.cc',
1298 'tools/quic/quic_client_session.h',
Torne (Richard Coles)1e9bf3e2013-10-31 11:16:26 +00001299 'tools/quic/quic_default_packet_writer.cc',
1300 'tools/quic/quic_default_packet_writer.h',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001301 'tools/quic/quic_dispatcher.h',
1302 'tools/quic/quic_dispatcher.cc',
1303 'tools/quic/quic_epoll_clock.cc',
1304 'tools/quic/quic_epoll_clock.h',
1305 'tools/quic/quic_epoll_connection_helper.cc',
1306 'tools/quic/quic_epoll_connection_helper.h',
1307 'tools/quic/quic_in_memory_cache.cc',
1308 'tools/quic/quic_in_memory_cache.h',
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +00001309 'tools/quic/quic_packet_writer_wrapper.cc',
1310 'tools/quic/quic_packet_writer_wrapper.h',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001311 'tools/quic/quic_server.cc',
1312 'tools/quic/quic_server.h',
1313 'tools/quic/quic_server_session.cc',
1314 'tools/quic/quic_server_session.h',
1315 'tools/quic/quic_socket_utils.cc',
1316 'tools/quic/quic_socket_utils.h',
1317 'tools/quic/quic_spdy_client_stream.cc',
1318 'tools/quic/quic_spdy_client_stream.h',
1319 'tools/quic/quic_spdy_server_stream.cc',
1320 'tools/quic/quic_spdy_server_stream.h',
1321 'tools/quic/quic_time_wait_list_manager.h',
1322 'tools/quic/quic_time_wait_list_manager.cc',
1323 'tools/quic/spdy_utils.cc',
1324 'tools/quic/spdy_utils.h',
1325 ],
1326 },
1327 {
1328 'target_name': 'quic_client',
1329 'type': 'executable',
1330 'dependencies': [
1331 '../base/base.gyp:base',
1332 '../third_party/openssl/openssl.gyp:openssl',
1333 'net',
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +01001334 'quic_base',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001335 ],
1336 'sources': [
1337 'tools/quic/quic_client_bin.cc',
1338 ],
1339 },
1340 {
1341 'target_name': 'quic_server',
1342 'type': 'executable',
1343 'dependencies': [
1344 '../base/base.gyp:base',
1345 '../third_party/openssl/openssl.gyp:openssl',
1346 'net',
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +01001347 'quic_base',
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001348 ],
1349 'sources': [
1350 'tools/quic/quic_server_bin.cc',
1351 ],
Bo Liu5c02ac12014-05-01 10:37:37 -07001352 },
1353 {
1354 'target_name': 'hpack_example_generator',
1355 'type': 'executable',
1356 'dependencies': [
1357 '../base/base.gyp:base',
1358 'net',
1359 ],
1360 'sources': [
1361 'spdy/fuzzing/hpack_example_generator.cc',
1362 ],
1363 },
1364 {
1365 'target_name': 'hpack_fuzz_mutator',
1366 'type': 'executable',
1367 'dependencies': [
1368 '../base/base.gyp:base',
1369 'net',
1370 ],
1371 'sources': [
1372 'spdy/fuzzing/hpack_fuzz_mutator.cc',
1373 ],
1374 },
1375 {
1376 'target_name': 'hpack_fuzz_wrapper',
1377 'type': 'executable',
1378 'dependencies': [
1379 '../base/base.gyp:base',
1380 'net',
1381 ],
1382 'sources': [
1383 'spdy/fuzzing/hpack_fuzz_wrapper.cc',
1384 ],
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +01001385 }
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001386 ]
1387 }],
1388 ['OS=="android"', {
1389 'targets': [
1390 {
1391 'target_name': 'net_jni_headers',
1392 'type': 'none',
1393 'sources': [
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +00001394 'android/java/src/org/chromium/net/AndroidCertVerifyResult.java',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001395 'android/java/src/org/chromium/net/AndroidKeyStore.java',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001396 'android/java/src/org/chromium/net/AndroidNetworkLibrary.java',
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +00001397 'android/java/src/org/chromium/net/AndroidPrivateKey.java',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001398 'android/java/src/org/chromium/net/GURLUtils.java',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001399 'android/java/src/org/chromium/net/NetworkChangeNotifier.java',
1400 'android/java/src/org/chromium/net/ProxyChangeListener.java',
Torne (Richard Coles)1e9bf3e2013-10-31 11:16:26 +00001401 'android/java/src/org/chromium/net/X509Util.java',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001402 ],
1403 'variables': {
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001404 'jni_gen_package': 'net',
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +00001405 'jni_generator_ptr_type': 'long',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001406 },
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001407 'includes': [ '../build/jni_generator.gypi' ],
1408 },
1409 {
1410 'target_name': 'net_test_jni_headers',
1411 'type': 'none',
1412 'sources': [
1413 'android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java',
1414 ],
1415 'variables': {
1416 'jni_gen_package': 'net',
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +00001417 'jni_generator_ptr_type': 'long',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001418 },
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001419 'includes': [ '../build/jni_generator.gypi' ],
1420 },
1421 {
1422 'target_name': 'net_java',
1423 'type': 'none',
1424 'variables': {
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001425 'java_in_dir': '../net/android/java',
1426 },
1427 'dependencies': [
1428 '../base/base.gyp:base',
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +00001429 'cert_verify_status_android_java',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001430 'certificate_mime_types_java',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001431 'net_errors_java',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001432 'private_key_types_java',
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +00001433 'remote_android_keystore_aidl',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001434 ],
1435 'includes': [ '../build/java.gypi' ],
1436 },
1437 {
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +00001438 # Processes the interface files for communication with an Android KeyStore
1439 # running in a separate process.
1440 'target_name': 'remote_android_keystore_aidl',
1441 'type': 'none',
1442 'variables': {
1443 'aidl_interface_file': '../net/android/java/src/org/chromium/net/IRemoteAndroidKeyStoreInterface.aidl',
1444 },
1445 'sources': [
1446 '../net/android/java/src/org/chromium/net/IRemoteAndroidKeyStore.aidl',
1447 '../net/android/java/src/org/chromium/net/IRemoteAndroidKeyStoreCallbacks.aidl',
1448 ],
1449 'includes': [ '../build/java_aidl.gypi' ],
1450 },
1451 {
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001452 'target_name': 'net_java_test_support',
1453 'type': 'none',
1454 'variables': {
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001455 'java_in_dir': '../net/test/android/javatests',
1456 },
1457 'includes': [ '../build/java.gypi' ],
1458 },
1459 {
1460 'target_name': 'net_javatests',
1461 'type': 'none',
1462 'variables': {
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001463 'java_in_dir': '../net/android/javatests',
1464 },
1465 'dependencies': [
1466 '../base/base.gyp:base',
1467 '../base/base.gyp:base_java_test_support',
1468 'net_java',
1469 ],
1470 'includes': [ '../build/java.gypi' ],
1471 },
1472 {
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001473 'target_name': 'net_errors_java',
1474 'type': 'none',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001475 'sources': [
1476 'android/java/NetError.template',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001477 ],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001478 'variables': {
1479 'package_name': 'org/chromium/net',
1480 'template_deps': ['base/net_error_list.h'],
1481 },
1482 'includes': [ '../build/android/java_cpp_template.gypi' ],
1483 },
1484 {
1485 'target_name': 'certificate_mime_types_java',
1486 'type': 'none',
1487 'sources': [
1488 'android/java/CertificateMimeType.template',
1489 ],
1490 'variables': {
1491 'package_name': 'org/chromium/net',
1492 'template_deps': ['base/mime_util_certificate_type_list.h'],
1493 },
1494 'includes': [ '../build/android/java_cpp_template.gypi' ],
1495 },
1496 {
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +00001497 'target_name': 'cert_verify_status_android_java',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001498 'type': 'none',
1499 'sources': [
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +00001500 'android/java/CertVerifyStatusAndroid.template',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001501 ],
1502 'variables': {
1503 'package_name': 'org/chromium/net',
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +00001504 'template_deps': ['android/cert_verify_status_android_list.h'],
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001505 },
1506 'includes': [ '../build/android/java_cpp_template.gypi' ],
1507 },
1508 {
1509 'target_name': 'private_key_types_java',
1510 'type': 'none',
1511 'sources': [
1512 'android/java/PrivateKeyType.template',
1513 ],
1514 'variables': {
1515 'package_name': 'org/chromium/net',
1516 'template_deps': ['android/private_key_type_list.h'],
1517 },
1518 'includes': [ '../build/android/java_cpp_template.gypi' ],
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001519 },
1520 ],
1521 }],
1522 # Special target to wrap a gtest_target_type==shared_library
1523 # net_unittests into an android apk for execution.
1524 # See base.gyp for TODO(jrg)s about this strategy.
1525 ['OS == "android" and gtest_target_type == "shared_library"', {
1526 'targets': [
1527 {
1528 'target_name': 'net_unittests_apk',
1529 'type': 'none',
1530 'dependencies': [
1531 'net_java',
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00001532 'net_javatests',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001533 'net_unittests',
1534 ],
1535 'variables': {
1536 'test_suite_name': 'net_unittests',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001537 },
1538 'includes': [ '../build/apk_test.gypi' ],
1539 },
1540 ],
1541 }],
Torne (Richard Coles)424c4d72013-08-30 15:14:49 +01001542 ['OS == "android" or OS == "linux"', {
1543 'targets': [
1544 {
1545 'target_name': 'disk_cache_memory_test',
1546 'type': 'executable',
1547 'dependencies': [
1548 '../base/base.gyp:base',
1549 'net',
1550 ],
1551 'sources': [
1552 'tools/disk_cache_memory_test/disk_cache_memory_test.cc',
1553 ],
1554 },
1555 ],
1556 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001557 ['test_isolation_mode != "noop"', {
1558 'targets': [
1559 {
1560 'target_name': 'net_unittests_run',
1561 'type': 'none',
1562 'dependencies': [
1563 'net_unittests',
1564 ],
1565 'includes': [
Ben Murdoch7dbb3d52013-07-17 14:55:54 +01001566 '../build/isolate.gypi',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001567 'net_unittests.isolate',
1568 ],
Ben Murdoch7dbb3d52013-07-17 14:55:54 +01001569 'sources': [
1570 'net_unittests.isolate',
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001571 ],
1572 },
1573 ],
1574 }],
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001575 ],
1576}