blob: 2fdc39083654c4d163e31884dea27df1aaf22090 [file] [log] [blame]
[email protected]4625ade2014-04-15 19:26:441# Copyright (c) 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
5import("//build/config/crypto.gni")
6import("//build/config/features.gni")
7import("//build/config/ui.gni")
rmcilroy5837d332014-12-17 14:30:588import("//build/module_args/v8.gni")
[email protected]8a3f8242014-06-05 18:05:129import("//url/config.gni")
qsrfb5251d12015-01-21 15:57:2210import("//testing/test.gni")
rockot9c67e5f2015-03-12 20:01:2111import("//third_party/icu/config.gni")
rtennetib6f1c0d2015-04-03 17:52:0612import("//third_party/protobuf/proto_library.gni")
[email protected]4625ade2014-04-15 19:26:4413
[email protected]26046b52014-07-16 00:11:0314# TODO(cjhopman): //build/config/android/rules.gni also imports grit_rule.gni.
15# Currently, that file can't be imported multiple times. Make this always
16# imported when http://crbug.com/393704 is fixed.
17if (!is_android) {
18 import("//tools/grit/grit_rule.gni")
19}
20
[email protected]4625ade2014-04-15 19:26:4421if (is_android) {
22 import("//build/config/android/config.gni")
[email protected]ef0eb442014-05-15 09:32:1823 import("//build/config/android/rules.gni")
[email protected]4625ade2014-04-15 19:26:4424} else if (is_mac) {
25 import("//build/config/mac/mac_sdk.gni")
26}
27
28# The list of net files is kept in net.gypi. Read it.
scottmg34fb7e52014-12-03 23:27:2429gypi_values = exec_script("//build/gypi_to_gn.py",
30 [ rebase_path("net.gypi") ],
31 "scope",
32 [ "net.gypi" ])
[email protected]4625ade2014-04-15 19:26:4433
34# Disable Kerberos on ChromeOS, Android and iOS, at least for now. It needs
35# configuration (krb5.conf and so on).
36use_kerberos = !is_chromeos && !is_android && !is_ios
37
38# The way the cache uses mmap() is inefficient on some Android devices. If
39# this flag is set, we hackily avoid using mmap() in the disk cache. We are
40# pretty confident that mmap-ing the index would not hurt any existing x86
41# android devices, but we cannot be so sure about the variety of ARM devices.
42# So enable it for x86 only for now.
dpranke43276212015-02-20 02:55:1943posix_avoid_mmap = is_android && current_cpu != "x86"
[email protected]4625ade2014-04-15 19:26:4444
45# WebSockets and socket stream code are used everywhere except iOS.
46enable_websockets = !is_ios
[email protected]8a3f8242014-06-05 18:05:1247use_v8_in_net = !is_ios
[email protected]4625ade2014-04-15 19:26:4448enable_built_in_dns = !is_ios
[email protected]8a3f8242014-06-05 18:05:1249disable_ftp_support = is_ios
[email protected]4625ade2014-04-15 19:26:4450
[email protected]384dab92014-06-04 20:26:0851declare_args() {
52 # Disables support for file URLs. File URL support requires use of icu.
53 disable_file_support = false
54}
[email protected]02494ec2014-05-07 15:05:2955
[email protected]4625ade2014-04-15 19:26:4456config("net_config") {
57 defines = []
58 if (posix_avoid_mmap) {
59 defines += [ "POSIX_AVOID_MMAP" ]
60 }
[email protected]02494ec2014-05-07 15:05:2961 if (disable_file_support) {
62 defines += [ "DISABLE_FILE_SUPPORT" ]
63 }
[email protected]4625ade2014-04-15 19:26:4464}
65
66component("net") {
67 sources =
scottmg34fb7e52014-12-03 23:27:2468 gypi_values.net_nacl_common_sources + gypi_values.net_non_nacl_sources
[email protected]4625ade2014-04-15 19:26:4469
70 cflags = []
[email protected]8603c5de2014-04-16 20:34:3171 defines = [
ellyjonesc7a5c502015-06-26 18:55:2072 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to
[email protected]8603c5de2014-04-16 20:34:3173 # 0) which implies that we run pkg_config on kerberos and link to that
74 # rather than setting this define which will dynamically open it. That
75 # doesn't seem to be set in the regular builds, so we're skipping this
76 # capability here.
77 "DLOPEN_KERBEROS",
scottmg34fb7e52014-12-03 23:27:2478 "NET_IMPLEMENTATION",
[email protected]8603c5de2014-04-16 20:34:3179 ]
dpranke43276212015-02-20 02:55:1980
brettwd1c719a2015-02-19 23:17:0481 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
82 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
Brett Wilsone53895272014-09-23 23:41:4683 public_configs = [ ":net_config" ]
[email protected]4625ade2014-04-15 19:26:4484 include_dirs = []
85
Brett Wilsone53895272014-09-23 23:41:4686 public_deps = [
brettw2e7db0a2015-04-24 22:59:1787 ":net_quic_proto",
Brett Wilsone53895272014-09-23 23:41:4688 "//crypto",
scottmg34fb7e52014-12-03 23:27:2489 "//crypto:platform",
brettwbc44c0a92015-02-20 22:30:3990 "//url",
Brett Wilsone53895272014-09-23 23:41:4691 ]
[email protected]4625ade2014-04-15 19:26:4492 deps = [
scottmg34fb7e52014-12-03 23:27:2493 ":net_resources",
[email protected]4625ade2014-04-15 19:26:4494 "//base",
[email protected]ad66db12014-07-10 12:43:4795 "//base:prefs",
[email protected]4625ade2014-04-15 19:26:4496 "//base/third_party/dynamic_annotations",
[email protected]8a3f8242014-06-05 18:05:1297 "//net/base/registry_controlled_domains",
[email protected]4625ade2014-04-15 19:26:4498 "//sdch",
rtennetib6f1c0d2015-04-03 17:52:0699 "//third_party/protobuf:protobuf_lite",
[email protected]4625ade2014-04-15 19:26:44100 "//third_party/zlib",
101 "//url",
102 ]
103
104 if (use_kerberos) {
105 defines += [ "USE_KERBEROS" ]
106 if (is_android) {
107 include_dirs += [ "/usr/include/kerberosV" ]
108 }
109 } else {
110 sources -= [
111 "http/http_auth_gssapi_posix.cc",
112 "http/http_auth_gssapi_posix.h",
[email protected]4625ade2014-04-15 19:26:44113 "http/http_auth_handler_negotiate.cc",
satorux933fc7a2015-02-13 07:09:10114 "http/http_auth_handler_negotiate.h",
[email protected]4625ade2014-04-15 19:26:44115 ]
116 }
117
118 if (is_posix) {
119 if (posix_avoid_mmap) {
120 sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
121 } else {
122 sources -= [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
123 }
124 }
125
[email protected]02494ec2014-05-07 15:05:29126 if (disable_file_support) {
127 sources -= [
128 "base/directory_lister.cc",
129 "base/directory_lister.h",
satorux933fc7a2015-02-13 07:09:10130 "url_request/file_protocol_handler.cc",
131 "url_request/file_protocol_handler.h",
[email protected]02494ec2014-05-07 15:05:29132 "url_request/url_request_file_dir_job.cc",
133 "url_request/url_request_file_dir_job.h",
134 "url_request/url_request_file_job.cc",
135 "url_request/url_request_file_job.h",
[email protected]02494ec2014-05-07 15:05:29136 ]
137 }
138
[email protected]8a3f8242014-06-05 18:05:12139 if (disable_ftp_support) {
[email protected]4625ade2014-04-15 19:26:44140 sources -= [
141 "ftp/ftp_auth_cache.cc",
142 "ftp/ftp_auth_cache.h",
143 "ftp/ftp_ctrl_response_buffer.cc",
144 "ftp/ftp_ctrl_response_buffer.h",
145 "ftp/ftp_directory_listing_parser.cc",
146 "ftp/ftp_directory_listing_parser.h",
147 "ftp/ftp_directory_listing_parser_ls.cc",
148 "ftp/ftp_directory_listing_parser_ls.h",
149 "ftp/ftp_directory_listing_parser_netware.cc",
150 "ftp/ftp_directory_listing_parser_netware.h",
151 "ftp/ftp_directory_listing_parser_os2.cc",
152 "ftp/ftp_directory_listing_parser_os2.h",
153 "ftp/ftp_directory_listing_parser_vms.cc",
154 "ftp/ftp_directory_listing_parser_vms.h",
155 "ftp/ftp_directory_listing_parser_windows.cc",
156 "ftp/ftp_directory_listing_parser_windows.h",
157 "ftp/ftp_network_layer.cc",
158 "ftp/ftp_network_layer.h",
159 "ftp/ftp_network_session.cc",
160 "ftp/ftp_network_session.h",
161 "ftp/ftp_network_transaction.cc",
162 "ftp/ftp_network_transaction.h",
163 "ftp/ftp_request_info.h",
164 "ftp/ftp_response_info.cc",
165 "ftp/ftp_response_info.h",
166 "ftp/ftp_server_type_histograms.cc",
167 "ftp/ftp_server_type_histograms.h",
168 "ftp/ftp_transaction.h",
169 "ftp/ftp_transaction_factory.h",
170 "ftp/ftp_util.cc",
171 "ftp/ftp_util.h",
172 "url_request/ftp_protocol_handler.cc",
173 "url_request/ftp_protocol_handler.h",
174 "url_request/url_request_ftp_job.cc",
175 "url_request/url_request_ftp_job.h",
176 ]
177 }
178
179 if (enable_built_in_dns) {
180 defines += [ "ENABLE_BUILT_IN_DNS" ]
181 } else {
182 sources -= [
183 "dns/address_sorter_posix.cc",
184 "dns/address_sorter_posix.h",
185 "dns/dns_client.cc",
186 ]
187 }
188
189 if (use_openssl) {
190 sources -= [
[email protected]4625ade2014-04-15 19:26:44191 "base/nss_memio.c",
192 "base/nss_memio.h",
[email protected]4625ade2014-04-15 19:26:44193 "cert/ct_log_verifier_nss.cc",
194 "cert/ct_objects_extractor_nss.cc",
195 "cert/jwk_serializer_nss.cc",
[email protected]4625ade2014-04-15 19:26:44196 "cert/scoped_nss_types.h",
[email protected]4625ade2014-04-15 19:26:44197 "cert/x509_util_nss.cc",
[email protected]4625ade2014-04-15 19:26:44198 "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",
[email protected]4625ade2014-04-15 19:26:44212 ]
[email protected]71d94dfce92014-04-30 16:47:24213 if (is_ios) {
214 # Always removed for !ios below.
215 sources -= [
216 "cert/cert_verify_proc_nss.cc",
217 "cert/cert_verify_proc_nss.h",
[email protected]71d94dfce92014-04-30 16:47:24218 ]
219 }
davidbend5587412014-10-30 21:44:16220 if (is_win) {
scottmg34fb7e52014-12-03 23:27:24221 sources -= [ "cert/sha256_legacy_support_nss_win.cc" ]
davidbend5587412014-10-30 21:44:16222 }
davidben2bcbc6b2015-04-22 02:36:41223 if (!use_nss_certs && !is_ios) {
224 sources -= [ "cert/x509_util_nss.h" ]
225 }
[email protected]4625ade2014-04-15 19:26:44226 } else {
227 sources -= [
[email protected]4625ade2014-04-15 19:26:44228 "cert/ct_log_verifier_openssl.cc",
229 "cert/ct_objects_extractor_openssl.cc",
230 "cert/jwk_serializer_openssl.cc",
231 "cert/x509_util_openssl.cc",
232 "cert/x509_util_openssl.h",
233 "quic/crypto/aead_base_decrypter_openssl.cc",
234 "quic/crypto/aead_base_encrypter_openssl.cc",
235 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc",
236 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc",
237 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc",
238 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc",
239 "quic/crypto/channel_id_openssl.cc",
240 "quic/crypto/p256_key_exchange_openssl.cc",
241 "quic/crypto/scoped_evp_aead_ctx.cc",
242 "quic/crypto/scoped_evp_aead_ctx.h",
243 "socket/ssl_client_socket_openssl.cc",
244 "socket/ssl_client_socket_openssl.h",
245 "socket/ssl_server_socket_openssl.cc",
[email protected]c8a80e92014-05-17 16:02:08246 "socket/ssl_server_socket_openssl.h",
[email protected]97a854f2014-07-29 07:51:36247 "ssl/openssl_platform_key.h",
davidben2bcbc6b2015-04-22 02:36:41248 "ssl/openssl_platform_key_nss.cc",
[email protected]97a854f2014-07-29 07:51:36249 "ssl/openssl_ssl_util.cc",
250 "ssl/openssl_ssl_util.h",
davidbendafe4e52015-04-08 22:53:52251 "ssl/ssl_client_session_cache_openssl.cc",
252 "ssl/ssl_client_session_cache_openssl.h",
[email protected]4625ade2014-04-15 19:26:44253 ]
[email protected]97a854f2014-07-29 07:51:36254 if (is_mac) {
scottmg34fb7e52014-12-03 23:27:24255 sources -= [ "ssl/openssl_platform_key_mac.cc" ]
[email protected]97a854f2014-07-29 07:51:36256 }
257 if (is_win) {
258 sources -= [
John Abd-El-Malek494329e2014-11-05 19:06:30259 "cert/sha256_legacy_support_openssl_win.cc",
[email protected]97a854f2014-07-29 07:51:36260 "ssl/openssl_platform_key_win.cc",
261 ]
262 }
[email protected]4625ade2014-04-15 19:26:44263 }
264
265 if (!use_openssl_certs) {
266 sources -= [
davidben2bcbc6b2015-04-22 02:36:41267 "base/crypto_module_openssl.cc",
isherman7e5de442014-09-25 23:00:18268 "base/keygen_handler_openssl.cc",
[email protected]4625ade2014-04-15 19:26:44269 "base/openssl_private_key_store.h",
270 "base/openssl_private_key_store_memory.cc",
271 "cert/cert_database_openssl.cc",
272 "cert/cert_verify_proc_openssl.cc",
273 "cert/cert_verify_proc_openssl.h",
274 "cert/test_root_certs_openssl.cc",
275 "cert/x509_certificate_openssl.cc",
276 "ssl/openssl_client_key_store.cc",
277 "ssl/openssl_client_key_store.h",
278 ]
279 if (is_android) {
scottmg34fb7e52014-12-03 23:27:24280 sources -= [ "base/openssl_private_key_store_android.cc" ]
[email protected]4625ade2014-04-15 19:26:44281 }
[email protected]1ea01752014-05-23 19:01:46282 } else if (is_android) {
283 # Android doesn't use these even when using OpenSSL.
284 sources -= [
285 "base/openssl_private_key_store_memory.cc",
286 "cert/cert_database_openssl.cc",
287 "cert/cert_verify_proc_openssl.cc",
288 "cert/test_root_certs_openssl.cc",
289 ]
[email protected]4625ade2014-04-15 19:26:44290 }
291
mukai77f8210a2014-10-07 16:35:14292 if (use_glib && !is_chromeos) {
[email protected]4625ade2014-04-15 19:26:44293 configs += [ "//build/config/linux:gconf" ]
294 deps += [ "//build/config/linux:gio" ]
295 }
296
297 if (is_linux) {
298 configs += [ "//build/config/linux:libresolv" ]
davidben2bcbc6b2015-04-22 02:36:41299 }
300
301 if (!use_nss_certs) {
[email protected]4625ade2014-04-15 19:26:44302 sources -= [
303 "base/crypto_module_nss.cc",
304 "base/keygen_handler_nss.cc",
305 "cert/cert_database_nss.cc",
306 "cert/nss_cert_database.cc",
307 "cert/nss_cert_database.h",
[email protected]4625ade2014-04-15 19:26:44308 "cert/x509_certificate_nss.cc",
davidben2bcbc6b2015-04-22 02:36:41309 "ssl/client_cert_store_nss.cc",
310 "ssl/client_cert_store_nss.h",
[email protected]4625ade2014-04-15 19:26:44311 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
312 "third_party/mozilla_security_manager/nsKeygenHandler.h",
313 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
314 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
315 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
316 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
317 ]
[email protected]e8ab6912014-04-21 20:54:51318 if (!is_ios) {
319 # These files are part of the partial implementation of NSS on iOS so
320 # keep them in that case (even though use_nss_certs is not set).
321 sources -= [
322 "cert/cert_verify_proc_nss.cc",
323 "cert/cert_verify_proc_nss.h",
davidben2bcbc6b2015-04-22 02:36:41324 "cert/test_root_certs_nss.cc",
325 "cert/x509_util_nss_certs.cc",
326 "cert_net/nss_ocsp.cc",
327 "cert_net/nss_ocsp.h",
[email protected]e8ab6912014-04-21 20:54:51328 ]
329 }
[email protected]4625ade2014-04-15 19:26:44330 if (is_chromeos) {
331 # These were already removed on non-ChromeOS.
332 sources -= [
davidben2bcbc6b2015-04-22 02:36:41333 "cert/nss_cert_database_chromeos.cc",
334 "cert/nss_cert_database_chromeos.h",
335 "cert/nss_profile_filter_chromeos.cc",
336 "cert/nss_profile_filter_chromeos.h",
[email protected]4625ade2014-04-15 19:26:44337 "ssl/client_cert_store_chromeos.cc",
338 "ssl/client_cert_store_chromeos.h",
339 ]
340 }
davidben2bcbc6b2015-04-22 02:36:41341 if (use_openssl) {
342 sources -= [ "ssl/openssl_platform_key_nss.cc" ]
343 }
344 } else if (use_openssl) {
345 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's
346 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file
347 # in directly.
348 sources += [ "third_party/nss/ssl/cmpcert.c" ]
[email protected]4625ade2014-04-15 19:26:44349 }
350
351 if (!enable_websockets) {
352 sources -= [
[email protected]4625ade2014-04-15 19:26:44353 "websockets/websocket_basic_handshake_stream.cc",
354 "websockets/websocket_basic_handshake_stream.h",
355 "websockets/websocket_basic_stream.cc",
356 "websockets/websocket_basic_stream.h",
357 "websockets/websocket_channel.cc",
358 "websockets/websocket_channel.h",
359 "websockets/websocket_deflate_predictor.h",
360 "websockets/websocket_deflate_predictor_impl.cc",
361 "websockets/websocket_deflate_predictor_impl.h",
362 "websockets/websocket_deflate_stream.cc",
363 "websockets/websocket_deflate_stream.h",
364 "websockets/websocket_deflater.cc",
365 "websockets/websocket_deflater.h",
366 "websockets/websocket_errors.cc",
367 "websockets/websocket_errors.h",
368 "websockets/websocket_extension.cc",
369 "websockets/websocket_extension.h",
370 "websockets/websocket_extension_parser.cc",
371 "websockets/websocket_extension_parser.h",
372 "websockets/websocket_frame.cc",
373 "websockets/websocket_frame.h",
374 "websockets/websocket_frame_parser.cc",
375 "websockets/websocket_frame_parser.h",
ricea11bdcd02014-11-20 09:57:07376 "websockets/websocket_handshake_challenge.cc",
377 "websockets/websocket_handshake_challenge.h",
satorux933fc7a2015-02-13 07:09:10378 "websockets/websocket_handshake_constants.cc",
379 "websockets/websocket_handshake_constants.h",
[email protected]4625ade2014-04-15 19:26:44380 "websockets/websocket_handshake_request_info.cc",
381 "websockets/websocket_handshake_request_info.h",
382 "websockets/websocket_handshake_response_info.cc",
383 "websockets/websocket_handshake_response_info.h",
384 "websockets/websocket_handshake_stream_base.h",
385 "websockets/websocket_handshake_stream_create_helper.cc",
386 "websockets/websocket_handshake_stream_create_helper.h",
387 "websockets/websocket_inflater.cc",
388 "websockets/websocket_inflater.h",
[email protected]4625ade2014-04-15 19:26:44389 "websockets/websocket_mux.h",
[email protected]4625ade2014-04-15 19:26:44390 "websockets/websocket_stream.cc",
391 "websockets/websocket_stream.h",
[email protected]4625ade2014-04-15 19:26:44392 ]
393 }
394
395 if (!enable_mdns) {
396 sources -= [
397 "dns/mdns_cache.cc",
398 "dns/mdns_cache.h",
399 "dns/mdns_client.cc",
400 "dns/mdns_client.h",
401 "dns/mdns_client_impl.cc",
402 "dns/mdns_client_impl.h",
403 "dns/record_parsed.cc",
404 "dns/record_parsed.h",
405 "dns/record_rdata.cc",
406 "dns/record_rdata.h",
407 ]
408 }
409
410 if (is_win) {
411 sources -= [
412 "http/http_auth_handler_ntlm_portable.cc",
[email protected]2ef2b0e2014-07-09 21:12:34413 "socket/socket_libevent.cc",
414 "socket/socket_libevent.h",
[email protected]4625ade2014-04-15 19:26:44415 "socket/tcp_socket_libevent.cc",
416 "socket/tcp_socket_libevent.h",
417 "udp/udp_socket_libevent.cc",
418 "udp/udp_socket_libevent.h",
419 ]
[email protected]4625ade2014-04-15 19:26:44420 } else { # !is_win
421 sources -= [
422 "base/winsock_init.cc",
423 "base/winsock_init.h",
424 "base/winsock_util.cc",
425 "base/winsock_util.h",
426 "proxy/proxy_resolver_winhttp.cc",
427 "proxy/proxy_resolver_winhttp.h",
428 ]
429 }
430
431 if (is_mac) {
[email protected]4625ade2014-04-15 19:26:44432 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19433 "Foundation.framework",
434 "Security.framework",
435 "SystemConfiguration.framework",
436 "resolv",
[email protected]4625ade2014-04-15 19:26:44437 ]
438 }
439
440 if (is_ios) {
davidben2bcbc6b2015-04-22 02:36:41441 # Add back some sources that were otherwise filtered out. iOS needs some Mac
442 # files.
[email protected]b2b2bf52014-05-28 20:26:57443 set_sources_assignment_filter([])
444 sources += [
445 "base/network_change_notifier_mac.cc",
446 "base/network_config_watcher_mac.cc",
eromanc69886a42015-06-03 18:19:52447 "base/network_interfaces_mac.cc",
448 "base/network_interfaces_mac.h",
[email protected]b2b2bf52014-05-28 20:26:57449 "base/platform_mime_util_mac.mm",
satorux933fc7a2015-02-13 07:09:10450 "proxy/proxy_resolver_mac.cc",
451 "proxy/proxy_server_mac.cc",
[email protected]b2b2bf52014-05-28 20:26:57452 ]
453 set_sources_assignment_filter(sources_assignment_filter)
454
[email protected]4625ade2014-04-15 19:26:44455 sources -= [ "disk_cache/blockfile/file_posix.cc" ]
[email protected]4625ade2014-04-15 19:26:44456 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19457 "CFNetwork.framework",
458 "MobileCoreServices.framework",
459 "Security.framework",
460 "SystemConfiguration.framework",
461 "resolv",
[email protected]4625ade2014-04-15 19:26:44462 ]
463 }
464
erikchen006a7cf2014-12-03 22:27:11465 if (is_ios || is_mac) {
466 sources += gypi_values.net_base_mac_ios_sources
467 }
468
[email protected]4625ade2014-04-15 19:26:44469 if (is_android) {
[email protected]b2b2bf52014-05-28 20:26:57470 # Add some Linux sources that were excluded by the filter, but which
471 # are needed.
472 set_sources_assignment_filter([])
473 sources += [
[email protected]b2b2bf52014-05-28 20:26:57474 "base/address_tracker_linux.cc",
475 "base/address_tracker_linux.h",
eromanc69886a42015-06-03 18:19:52476 "base/network_interfaces_linux.cc",
477 "base/network_interfaces_linux.h",
satorux933fc7a2015-02-13 07:09:10478 "base/platform_mime_util_linux.cc",
[email protected]b2b2bf52014-05-28 20:26:57479 ]
480 set_sources_assignment_filter(sources_assignment_filter)
tornefe8398d2015-04-07 18:47:26481 deps += [ ":net_jni_headers" ]
[email protected]4625ade2014-04-15 19:26:44482 }
[email protected]ad66db12014-07-10 12:43:47483
[email protected]85191ed2014-05-15 00:41:49484 if (use_icu_alternatives_on_android) {
[email protected]85191ed2014-05-15 00:41:49485 sources += [
486 "base/net_string_util_icu_alternatives_android.cc",
487 "base/net_string_util_icu_alternatives_android.h",
488 ]
mefdc8e94b2015-03-11 19:49:05489 } else {
490 deps += [
491 "//base:i18n",
492 "//third_party/icu",
493 ]
494 sources += [
495 "base/filename_util_icu.cc",
496 "base/net_string_util_icu.cc",
497 "base/net_util_icu.cc",
498 ]
[email protected]85191ed2014-05-15 00:41:49499 }
[email protected]4625ade2014-04-15 19:26:44500}
501
502grit("net_resources") {
503 source = "base/net_resources.grd"
[email protected]7ae52902014-08-18 22:36:01504 use_qualified_include = true
[email protected]b89c53842014-07-23 16:32:32505 outputs = [
506 "grit/net_resources.h",
507 "net_resources.pak",
508 "net_resources.rc",
509 ]
[email protected]4625ade2014-04-15 19:26:44510}
511
rtennetib6f1c0d2015-04-03 17:52:06512proto_library("net_quic_proto") {
brettw2e7db0a2015-04-24 22:59:17513 visibility = [ "//net" ] # Part of the net component.
514
rtennetib6f1c0d2015-04-03 17:52:06515 sources = [
516 "quic/proto/cached_network_parameters.proto",
517 "quic/proto/source_address_token.proto",
518 ]
519 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:"
520 cc_include = "net/base/net_export.h"
521
522 defines = [ "NET_IMPLEMENTATION" ]
523
524 extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
525}
526
Brett Wilson83fd4242014-09-02 19:45:33527static_library("extras") {
mef327a8e42014-08-29 17:10:03528 sources = gypi_values.net_extras_sources
529 configs += [ "//build/config/compiler:wexit_time_destructors" ]
530 deps = [
531 ":net",
brettwbc44c0a92015-02-20 22:30:39532 "//base",
mef327a8e42014-08-29 17:10:03533 "//sql:sql",
534 ]
535}
536
[email protected]8a3f8242014-06-05 18:05:12537static_library("http_server") {
[email protected]4625ade2014-04-15 19:26:44538 sources = [
539 "server/http_connection.cc",
540 "server/http_connection.h",
541 "server/http_server.cc",
542 "server/http_server.h",
543 "server/http_server_request_info.cc",
544 "server/http_server_request_info.h",
545 "server/http_server_response_info.cc",
546 "server/http_server_response_info.h",
547 "server/web_socket.cc",
548 "server/web_socket.h",
dgozmana6e70092014-12-12 14:46:21549 "server/web_socket_encoder.cc",
550 "server/web_socket_encoder.h",
[email protected]4625ade2014-04-15 19:26:44551 ]
jambc6cc8e2014-11-14 17:56:29552 configs += [
brettwd1c719a2015-02-19 23:17:04553 "//build/config/compiler:no_size_t_to_int_warning",
jambc6cc8e2014-11-14 17:56:29554 "//build/config/compiler:wexit_time_destructors",
jambc6cc8e2014-11-14 17:56:29555 ]
[email protected]4625ade2014-04-15 19:26:44556 deps = [
557 ":net",
558 "//base",
559 ]
560}
561
[email protected]8603c5de2014-04-16 20:34:31562executable("dump_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24563 testonly = true
[email protected]8603c5de2014-04-16 20:34:31564 sources = [
565 "tools/dump_cache/cache_dumper.cc",
566 "tools/dump_cache/cache_dumper.h",
567 "tools/dump_cache/dump_cache.cc",
568 "tools/dump_cache/dump_files.cc",
569 "tools/dump_cache/dump_files.h",
570 "tools/dump_cache/simple_cache_dumper.cc",
571 "tools/dump_cache/simple_cache_dumper.h",
[email protected]8603c5de2014-04-16 20:34:31572 "tools/dump_cache/url_to_filename_encoder.cc",
573 "tools/dump_cache/url_to_filename_encoder.h",
[email protected]8603c5de2014-04-16 20:34:31574 "tools/dump_cache/url_utilities.cc",
satorux933fc7a2015-02-13 07:09:10575 "tools/dump_cache/url_utilities.h",
[email protected]8603c5de2014-04-16 20:34:31576 ]
[email protected]4625ade2014-04-15 19:26:44577
brettwd1c719a2015-02-19 23:17:04578 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
579 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31580
581 deps = [
582 "//base",
583 ":net",
[email protected]b2b2bf52014-05-28 20:26:57584 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31585 ]
586}
587
[email protected]b2b2bf52014-05-28 20:26:57588source_set("test_support") {
Brett Wilson8f80ad0b2014-09-08 19:50:24589 testonly = true
[email protected]8603c5de2014-04-16 20:34:31590 sources = [
[email protected]8603c5de2014-04-16 20:34:31591 "base/load_timing_info_test_util.cc",
592 "base/load_timing_info_test_util.h",
593 "base/mock_file_stream.cc",
594 "base/mock_file_stream.h",
595 "base/test_completion_callback.cc",
596 "base/test_completion_callback.h",
597 "base/test_data_directory.cc",
598 "base/test_data_directory.h",
599 "cert/mock_cert_verifier.cc",
600 "cert/mock_cert_verifier.h",
601 "cookies/cookie_monster_store_test.cc",
602 "cookies/cookie_monster_store_test.h",
603 "cookies/cookie_store_test_callbacks.cc",
604 "cookies/cookie_store_test_callbacks.h",
605 "cookies/cookie_store_test_helpers.cc",
606 "cookies/cookie_store_test_helpers.h",
607 "disk_cache/disk_cache_test_base.cc",
608 "disk_cache/disk_cache_test_base.h",
609 "disk_cache/disk_cache_test_util.cc",
610 "disk_cache/disk_cache_test_util.h",
611 "dns/dns_test_util.cc",
612 "dns/dns_test_util.h",
613 "dns/mock_host_resolver.cc",
614 "dns/mock_host_resolver.h",
615 "dns/mock_mdns_socket_factory.cc",
616 "dns/mock_mdns_socket_factory.h",
[email protected]8a3f8242014-06-05 18:05:12617 "http/http_transaction_test_util.cc",
618 "http/http_transaction_test_util.h",
vishal.b62985ca92015-04-17 08:45:51619 "log/test_net_log.cc",
620 "log/test_net_log.h",
mmenke43758e62015-05-04 21:09:46621 "log/test_net_log_entry.cc",
622 "log/test_net_log_entry.h",
mmenke0034c542015-05-05 22:34:59623 "log/test_net_log_util.cc",
mmenke43758e62015-05-04 21:09:46624 "log/test_net_log_util.h",
[email protected]8603c5de2014-04-16 20:34:31625 "proxy/mock_proxy_resolver.cc",
626 "proxy/mock_proxy_resolver.h",
627 "proxy/mock_proxy_script_fetcher.cc",
628 "proxy/mock_proxy_script_fetcher.h",
629 "proxy/proxy_config_service_common_unittest.cc",
630 "proxy/proxy_config_service_common_unittest.h",
631 "socket/socket_test_util.cc",
632 "socket/socket_test_util.h",
633 "test/cert_test_util.cc",
634 "test/cert_test_util.h",
[email protected]83e1ae32014-07-18 10:57:07635 "test/cert_test_util_nss.cc",
nharper2e171cf2015-06-01 20:29:23636 "test/channel_id_test_util.cc",
637 "test/channel_id_test_util.h",
[email protected]8603c5de2014-04-16 20:34:31638 "test/ct_test_util.cc",
639 "test/ct_test_util.h",
640 "test/embedded_test_server/embedded_test_server.cc",
641 "test/embedded_test_server/embedded_test_server.h",
642 "test/embedded_test_server/http_connection.cc",
643 "test/embedded_test_server/http_connection.h",
644 "test/embedded_test_server/http_request.cc",
645 "test/embedded_test_server/http_request.h",
646 "test/embedded_test_server/http_response.cc",
647 "test/embedded_test_server/http_response.h",
xunjieli0f1bd6252015-06-03 21:57:20648 "test/embedded_test_server/stream_listen_socket.cc",
649 "test/embedded_test_server/stream_listen_socket.h",
650 "test/embedded_test_server/tcp_listen_socket.cc",
651 "test/embedded_test_server/tcp_listen_socket.h",
sammc6ac3fe52015-02-25 06:00:28652 "test/event_waiter.h",
[email protected]8603c5de2014-04-16 20:34:31653 "test/net_test_suite.cc",
654 "test/net_test_suite.h",
655 "test/python_utils.cc",
656 "test/python_utils.h",
657 "test/spawned_test_server/base_test_server.cc",
658 "test/spawned_test_server/base_test_server.h",
[email protected]8603c5de2014-04-16 20:34:31659 "test/spawned_test_server/local_test_server.cc",
660 "test/spawned_test_server/local_test_server.h",
satorux933fc7a2015-02-13 07:09:10661 "test/spawned_test_server/local_test_server_posix.cc",
662 "test/spawned_test_server/local_test_server_win.cc",
[email protected]8603c5de2014-04-16 20:34:31663 "test/spawned_test_server/remote_test_server.cc",
664 "test/spawned_test_server/remote_test_server.h",
665 "test/spawned_test_server/spawned_test_server.h",
666 "test/spawned_test_server/spawner_communicator.cc",
667 "test/spawned_test_server/spawner_communicator.h",
Brett Wilson32ce17a2014-11-10 17:45:30668 "test/url_request/url_request_failed_job.cc",
669 "test/url_request/url_request_failed_job.h",
mef3e826cf2014-12-13 18:40:40670 "test/url_request/url_request_mock_data_job.cc",
671 "test/url_request/url_request_mock_data_job.h",
jam8e45cd72015-01-20 16:33:44672 "test/url_request/url_request_slow_download_job.cc",
673 "test/url_request/url_request_slow_download_job.h",
[email protected]8603c5de2014-04-16 20:34:31674 "url_request/test_url_fetcher_factory.cc",
675 "url_request/test_url_fetcher_factory.h",
676 "url_request/url_request_test_util.cc",
677 "url_request/url_request_test_util.h",
678 ]
679
brettwd1c719a2015-02-19 23:17:04680 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
681 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31682
Brett Wilsone53895272014-09-23 23:41:46683 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31684 "//base",
685 "//base/test:test_support",
[email protected]22fe91d2014-08-12 17:07:12686 "//crypto",
[email protected]59ff2d42014-04-22 22:25:23687 "//net",
[email protected]8603c5de2014-04-16 20:34:31688 "//net/tools/tld_cleanup",
689 "//testing/gmock",
690 "//testing/gtest",
691 "//url",
692 ]
693
jamb533b7e2015-03-04 17:12:05694 if (!is_ios) {
695 public_deps += [ "//third_party/protobuf:py_proto" ]
696 }
697
davidben15d69d482014-09-29 18:24:08698 if (!use_openssl && (use_nss_certs || is_ios)) {
scottmg34fb7e52014-12-03 23:27:24699 public_deps += [ "//crypto:platform" ]
[email protected]8603c5de2014-04-16 20:34:31700 }
701
702 if (!is_android) {
703 sources -= [
704 "test/spawned_test_server/remote_test_server.cc",
705 "test/spawned_test_server/remote_test_server.h",
706 "test/spawned_test_server/spawner_communicator.cc",
707 "test/spawned_test_server/spawner_communicator.h",
708 ]
709 }
710
711 if (use_v8_in_net) {
Brett Wilsone53895272014-09-23 23:41:46712 public_deps += [ ":net_with_v8" ]
[email protected]8603c5de2014-04-16 20:34:31713 }
714
715 if (!enable_mdns) {
716 sources -= [
717 "dns/mock_mdns_socket_factory.cc",
718 "dns/mock_mdns_socket_factory.h",
719 ]
720 }
721
davidben15d69d482014-09-29 18:24:08722 if (!use_nss_certs) {
scottmg34fb7e52014-12-03 23:27:24723 sources -= [ "test/cert_test_util_nss.cc" ]
[email protected]83e1ae32014-07-18 10:57:07724 }
xunjielia6888202015-04-14 21:34:25725
726 if (!disable_file_support) {
727 sources += [
728 "test/url_request/url_request_mock_http_job.cc",
729 "test/url_request/url_request_mock_http_job.h",
730 "url_request/test_url_request_interceptor.cc",
731 "url_request/test_url_request_interceptor.h",
732 ]
733 }
[email protected]8603c5de2014-04-16 20:34:31734}
735
[email protected]ceeaac792014-06-25 05:14:43736source_set("balsa") {
737 sources = [
738 "tools/balsa/balsa_enums.h",
739 "tools/balsa/balsa_frame.cc",
740 "tools/balsa/balsa_frame.h",
741 "tools/balsa/balsa_headers.cc",
742 "tools/balsa/balsa_headers.h",
743 "tools/balsa/balsa_headers_token_utils.cc",
744 "tools/balsa/balsa_headers_token_utils.h",
745 "tools/balsa/balsa_visitor_interface.h",
746 "tools/balsa/http_message_constants.cc",
747 "tools/balsa/http_message_constants.h",
748 "tools/balsa/noop_balsa_visitor.h",
749 "tools/balsa/simple_buffer.cc",
750 "tools/balsa/simple_buffer.h",
751 "tools/balsa/split.cc",
752 "tools/balsa/split.h",
753 "tools/balsa/string_piece_utils.h",
rtennetie0ee6eb2015-05-01 00:55:09754 "tools/quic/spdy_balsa_utils.cc",
755 "tools/quic/spdy_balsa_utils.h",
[email protected]ceeaac792014-06-25 05:14:43756 ]
757 deps = [
758 ":net",
759 "//base",
[email protected]22fe91d2014-08-12 17:07:12760 "//url",
[email protected]ceeaac792014-06-25 05:14:43761 ]
762}
763
[email protected]8603c5de2014-04-16 20:34:31764if (use_v8_in_net) {
765 component("net_with_v8") {
766 sources = [
767 "proxy/proxy_resolver_v8.cc",
768 "proxy/proxy_resolver_v8.h",
769 "proxy/proxy_resolver_v8_tracing.cc",
770 "proxy/proxy_resolver_v8_tracing.h",
771 "proxy/proxy_service_v8.cc",
772 "proxy/proxy_service_v8.h",
773 ]
774
775 defines = [ "NET_IMPLEMENTATION" ]
776 configs += [
brettwd1c719a2015-02-19 23:17:04777 "//build/config/compiler:no_size_t_to_int_warning",
[email protected]8603c5de2014-04-16 20:34:31778 "//build/config/compiler:wexit_time_destructors",
779 ]
780
Brett Wilsone53895272014-09-23 23:41:46781 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31782 ":net",
Brett Wilsone53895272014-09-23 23:41:46783 ]
784 deps = [
[email protected]8603c5de2014-04-16 20:34:31785 "//base",
786 "//gin",
787 "//url",
788 "//v8",
789 ]
790 }
791}
792
amistry7e6ebfdc82015-02-13 04:19:11793if (use_v8_in_net && !is_android) {
794 source_set("net_browser_services") {
795 sources = [
796 "dns/mojo_host_resolver_impl.cc",
797 "dns/mojo_host_resolver_impl.h",
amistry6e1ed1b2015-03-12 05:24:01798 "proxy/in_process_mojo_proxy_resolver_factory.cc",
799 "proxy/in_process_mojo_proxy_resolver_factory.h",
sammc1d5df4d2015-05-05 05:06:17800 "proxy/mojo_proxy_resolver_factory.h",
eromandcacef22015-06-01 19:36:35801 "proxy/proxy_resolver_factory_mojo.cc",
802 "proxy/proxy_resolver_factory_mojo.h",
amistry6e1ed1b2015-03-12 05:24:01803 "proxy/proxy_service_mojo.cc",
804 "proxy/proxy_service_mojo.h",
amistry7e6ebfdc82015-02-13 04:19:11805 ]
806
807 public_deps = [
808 ":mojo_type_converters",
809 ":net",
brettwbc44c0a92015-02-20 22:30:39810 "//base",
amistry07ff1402015-03-10 07:34:07811 "//mojo/common",
amistry7e6ebfdc82015-02-13 04:19:11812 "//net/interfaces",
813 "//third_party/mojo/src/mojo/public/cpp/bindings",
amistry6e1ed1b2015-03-12 05:24:01814
815 # NOTE(amistry): As long as we support in-process Mojo v8 PAC, we need
816 # this dependency since in_process_mojo_proxy_resolver_factory creates
817 # the utility process side Mojo services in the browser process.
818 # Ultimately, this will go away when we only support out-of-process.
819 ":net_utility_services",
amistry7e6ebfdc82015-02-13 04:19:11820 ]
821 }
822
823 source_set("mojo_type_converters") {
824 sources = [
amistry7ec58112015-02-26 06:03:00825 "dns/mojo_host_type_converters.cc",
826 "dns/mojo_host_type_converters.h",
827 "proxy/mojo_proxy_type_converters.cc",
828 "proxy/mojo_proxy_type_converters.h",
amistry7e6ebfdc82015-02-13 04:19:11829 ]
830
831 public_deps = [
832 ":net",
833 "//net/interfaces",
834 "//third_party/mojo/src/mojo/public/cpp/bindings",
835 ]
836 }
sammc5403aa1d2015-02-25 04:59:21837
838 source_set("net_utility_services") {
839 sources = [
sammc6ac3fe52015-02-25 06:00:28840 "dns/host_resolver_mojo.cc",
841 "dns/host_resolver_mojo.h",
sammcc804b532015-03-12 10:02:34842 "proxy/load_state_change_coalescer.cc",
843 "proxy/load_state_change_coalescer.h",
sammc352f7492015-02-25 09:45:24844 "proxy/mojo_proxy_resolver_factory_impl.cc",
845 "proxy/mojo_proxy_resolver_factory_impl.h",
sammc5403aa1d2015-02-25 04:59:21846 "proxy/mojo_proxy_resolver_impl.cc",
847 "proxy/mojo_proxy_resolver_impl.h",
sammc359a8b742015-05-15 12:20:59848 "proxy/proxy_resolver_error_observer_mojo.cc",
849 "proxy/proxy_resolver_error_observer_mojo.h",
sammc5403aa1d2015-02-25 04:59:21850 ]
851
rockot9509ec82015-04-14 02:50:56852 deps = [
853 ":net_with_v8",
854 ]
855
sammc5403aa1d2015-02-25 04:59:21856 public_deps = [
857 ":mojo_type_converters",
858 ":net",
859 "//mojo/common",
860 "//net/interfaces",
861 "//third_party/mojo/src/mojo/public/cpp/bindings",
862 ]
863 }
amistry7e6ebfdc82015-02-13 04:19:11864}
865
[email protected]8603c5de2014-04-16 20:34:31866if (!is_ios && !is_android) {
867 executable("crash_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24868 testonly = true
scottmg34fb7e52014-12-03 23:27:24869 sources = [
870 "tools/crash_cache/crash_cache.cc",
871 ]
dpranke43276212015-02-20 02:55:19872
brettwd1c719a2015-02-19 23:17:04873 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
874 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31875 deps = [
876 ":net",
[email protected]b2b2bf52014-05-28 20:26:57877 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31878 "//base",
879 ]
880 }
881
882 executable("crl_set_dump") {
Brett Wilson8f80ad0b2014-09-08 19:50:24883 testonly = true
scottmg34fb7e52014-12-03 23:27:24884 sources = [
885 "tools/crl_set_dump/crl_set_dump.cc",
886 ]
dpranke43276212015-02-20 02:55:19887
brettwd1c719a2015-02-19 23:17:04888 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
889 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31890 deps = [
891 ":net",
892 "//base",
893 ]
894 }
895
896 executable("dns_fuzz_stub") {
Brett Wilson8f80ad0b2014-09-08 19:50:24897 testonly = true
scottmg34fb7e52014-12-03 23:27:24898 sources = [
899 "tools/dns_fuzz_stub/dns_fuzz_stub.cc",
900 ]
dpranke43276212015-02-20 02:55:19901
brettwd1c719a2015-02-19 23:17:04902 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
903 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31904 deps = [
905 ":net",
906 "//base",
907 ]
908 }
909
910 executable("gdig") {
Brett Wilson8f80ad0b2014-09-08 19:50:24911 testonly = true
[email protected]8603c5de2014-04-16 20:34:31912 sources = [
913 "tools/gdig/file_net_log.cc",
914 "tools/gdig/gdig.cc",
915 ]
916 deps = [
917 ":net",
918 "//base",
919 ]
920 }
921
922 executable("get_server_time") {
Brett Wilson8f80ad0b2014-09-08 19:50:24923 testonly = true
scottmg34fb7e52014-12-03 23:27:24924 sources = [
925 "tools/get_server_time/get_server_time.cc",
926 ]
dpranke43276212015-02-20 02:55:19927
brettwd1c719a2015-02-19 23:17:04928 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
929 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31930 deps = [
931 ":net",
932 "//base",
933 "//base:i18n",
934 "//url",
935 ]
936 }
937
rockot9c67e5f2015-03-12 20:01:21938 executable("hpack_example_generator") {
939 testonly = true
940 sources = [
941 "spdy/fuzzing/hpack_example_generator.cc",
942 ]
943
944 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
945 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
946 deps = [
947 "//base",
948 ":net",
949 ]
950 }
951
952 executable("hpack_fuzz_mutator") {
953 testonly = true
954 sources = [
955 "spdy/fuzzing/hpack_fuzz_mutator.cc",
956 ]
957
958 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
959 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
960 deps = [
961 "//base",
962 ":net",
963 ]
964 }
965
966 executable("hpack_fuzz_wrapper") {
967 testonly = true
968 sources = [
969 "spdy/fuzzing/hpack_fuzz_wrapper.cc",
970 ]
971
972 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
973 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
974 deps = [
975 "//base",
976 ":net",
977 ]
978 }
979
[email protected]8603c5de2014-04-16 20:34:31980 if (use_v8_in_net) {
981 executable("net_watcher") {
Brett Wilson8f80ad0b2014-09-08 19:50:24982 testonly = true
scottmg34fb7e52014-12-03 23:27:24983 sources = [
984 "tools/net_watcher/net_watcher.cc",
985 ]
[email protected]8603c5de2014-04-16 20:34:31986 deps = [
987 ":net",
988 ":net_with_v8",
989 "//base",
990 ]
991
mukai77f8210a2014-10-07 16:35:14992 if (is_desktop_linux) {
[email protected]22fe91d2014-08-12 17:07:12993 configs += [
994 "//build/config/linux:gconf",
995 "//build/config/linux:glib",
996 ]
[email protected]8603c5de2014-04-16 20:34:31997 deps += [ "//build/config/linux:gio" ]
998 }
999 }
1000 }
1001
1002 executable("run_testserver") {
Brett Wilson8f80ad0b2014-09-08 19:50:241003 testonly = true
scottmg34fb7e52014-12-03 23:27:241004 sources = [
1005 "tools/testserver/run_testserver.cc",
1006 ]
[email protected]8603c5de2014-04-16 20:34:311007 deps = [
1008 ":net", # TODO(brettw) bug 363749: this shouldn't be necessary. It's not
1009 # in the GYP build, and can be removed when the bug is fixed.
rockot9c67e5f2015-03-12 20:01:211010
[email protected]b2b2bf52014-05-28 20:26:571011 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311012 "//base",
1013 "//base/test:test_support",
1014 "//testing/gtest",
1015 ]
1016 }
1017
1018 executable("stress_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:241019 testonly = true
scottmg34fb7e52014-12-03 23:27:241020 sources = [
rvargase23fcf652015-03-04 19:59:221021 "tools/stress_cache/stress_cache.cc",
scottmg34fb7e52014-12-03 23:27:241022 ]
dpranke43276212015-02-20 02:55:191023
brettwd1c719a2015-02-19 23:17:041024 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1025 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311026 deps = [
1027 ":net",
[email protected]b2b2bf52014-05-28 20:26:571028 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311029 "//base",
1030 ]
1031 }
1032
1033 executable("tld_cleanup") {
scottmg34fb7e52014-12-03 23:27:241034 sources = [
1035 "tools/tld_cleanup/tld_cleanup.cc",
1036 ]
dpranke43276212015-02-20 02:55:191037
brettwd1c719a2015-02-19 23:17:041038 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1039 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311040 deps = [
1041 "//base",
1042 "//base:i18n",
1043 "//net/tools/tld_cleanup",
1044 ]
1045 }
1046}
1047
rch6983a3f2015-03-30 03:47:281048if (is_linux) {
[email protected]8a3f8242014-06-05 18:05:121049 static_library("epoll_server") {
[email protected]8603c5de2014-04-16 20:34:311050 sources = [
1051 "tools/epoll_server/epoll_server.cc",
1052 "tools/epoll_server/epoll_server.h",
1053 ]
1054 deps = [
1055 ":net",
1056 "//base",
1057 ]
1058 }
1059
[email protected]8a3f8242014-06-05 18:05:121060 static_library("flip_in_mem_edsm_server_base") {
Brett Wilson8f80ad0b2014-09-08 19:50:241061 testonly = true
[email protected]8603c5de2014-04-16 20:34:311062 sources = [
1063 "tools/dump_cache/url_to_filename_encoder.cc",
1064 "tools/dump_cache/url_to_filename_encoder.h",
[email protected]8603c5de2014-04-16 20:34:311065 "tools/dump_cache/url_utilities.cc",
satorux933fc7a2015-02-13 07:09:101066 "tools/dump_cache/url_utilities.h",
[email protected]8603c5de2014-04-16 20:34:311067 "tools/flip_server/acceptor_thread.cc",
satorux933fc7a2015-02-13 07:09:101068 "tools/flip_server/acceptor_thread.h",
1069 "tools/flip_server/constants.h",
[email protected]8603c5de2014-04-16 20:34:311070 "tools/flip_server/create_listener.cc",
1071 "tools/flip_server/create_listener.h",
[email protected]8603c5de2014-04-16 20:34:311072 "tools/flip_server/flip_config.cc",
1073 "tools/flip_server/flip_config.h",
1074 "tools/flip_server/http_interface.cc",
1075 "tools/flip_server/http_interface.h",
1076 "tools/flip_server/loadtime_measurement.h",
[email protected]8603c5de2014-04-16 20:34:311077 "tools/flip_server/mem_cache.cc",
satorux933fc7a2015-02-13 07:09:101078 "tools/flip_server/mem_cache.h",
[email protected]8603c5de2014-04-16 20:34:311079 "tools/flip_server/output_ordering.cc",
1080 "tools/flip_server/output_ordering.h",
1081 "tools/flip_server/ring_buffer.cc",
1082 "tools/flip_server/ring_buffer.h",
1083 "tools/flip_server/sm_connection.cc",
1084 "tools/flip_server/sm_connection.h",
1085 "tools/flip_server/sm_interface.h",
[email protected]8603c5de2014-04-16 20:34:311086 "tools/flip_server/spdy_interface.cc",
1087 "tools/flip_server/spdy_interface.h",
satorux933fc7a2015-02-13 07:09:101088 "tools/flip_server/spdy_ssl.cc",
1089 "tools/flip_server/spdy_ssl.h",
[email protected]8603c5de2014-04-16 20:34:311090 "tools/flip_server/spdy_util.cc",
1091 "tools/flip_server/spdy_util.h",
1092 "tools/flip_server/streamer_interface.cc",
1093 "tools/flip_server/streamer_interface.h",
1094 ]
1095 deps = [
1096 ":balsa",
1097 ":epoll_server",
1098 ":net",
1099 "//base",
[email protected]edfd0f42014-07-22 18:20:371100 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311101 ]
1102 }
1103
1104 executable("flip_in_mem_edsm_server_unittests") {
Brett Wilson8f80ad0b2014-09-08 19:50:241105 testonly = true
[email protected]8603c5de2014-04-16 20:34:311106 sources = [
1107 "tools/flip_server/flip_test_utils.cc",
1108 "tools/flip_server/flip_test_utils.h",
1109 "tools/flip_server/http_interface_test.cc",
1110 "tools/flip_server/mem_cache_test.cc",
1111 "tools/flip_server/run_all_tests.cc",
1112 "tools/flip_server/spdy_interface_test.cc",
1113 ]
1114 deps = [
brettwbc44c0a92015-02-20 22:30:391115 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311116 ":flip_in_mem_edsm_server_base",
1117 ":net",
[email protected]b2b2bf52014-05-28 20:26:571118 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311119 "//testing/gtest",
1120 "//testing/gmock",
[email protected]edfd0f42014-07-22 18:20:371121 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311122 ]
1123 }
1124
1125 executable("flip_in_mem_edsm_server") {
Brett Wilson8f80ad0b2014-09-08 19:50:241126 testonly = true
scottmg34fb7e52014-12-03 23:27:241127 sources = [
1128 "tools/flip_server/flip_in_mem_edsm_server.cc",
1129 ]
[email protected]8603c5de2014-04-16 20:34:311130 deps = [
brettwbc44c0a92015-02-20 22:30:391131 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311132 ":flip_in_mem_edsm_server_base",
1133 ":net",
1134 "//base",
1135 ]
1136 }
1137
rch216445c2015-03-27 00:23:281138 source_set("epoll_quic_tools") {
[email protected]8603c5de2014-04-16 20:34:311139 sources = [
1140 "tools/quic/quic_client.cc",
1141 "tools/quic/quic_client.h",
[email protected]8603c5de2014-04-16 20:34:311142 "tools/quic/quic_default_packet_writer.cc",
1143 "tools/quic/quic_default_packet_writer.h",
[email protected]8603c5de2014-04-16 20:34:311144 "tools/quic/quic_epoll_clock.cc",
1145 "tools/quic/quic_epoll_clock.h",
1146 "tools/quic/quic_epoll_connection_helper.cc",
1147 "tools/quic/quic_epoll_connection_helper.h",
rtennetifb3fa6c2015-03-16 23:04:551148 "tools/quic/quic_packet_reader.cc",
1149 "tools/quic/quic_packet_reader.h",
[email protected]8603c5de2014-04-16 20:34:311150 "tools/quic/quic_packet_writer_wrapper.cc",
1151 "tools/quic/quic_packet_writer_wrapper.h",
1152 "tools/quic/quic_server.cc",
1153 "tools/quic/quic_server.h",
[email protected]8603c5de2014-04-16 20:34:311154 "tools/quic/quic_socket_utils.cc",
1155 "tools/quic/quic_socket_utils.h",
[email protected]8603c5de2014-04-16 20:34:311156 ]
1157 deps = [
1158 ":balsa",
1159 ":epoll_server",
1160 ":net",
1161 "//base",
1162 "//base/third_party/dynamic_annotations",
1163 "//crypto",
[email protected]edfd0f42014-07-22 18:20:371164 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311165 "//url",
1166 ]
1167 }
1168
rch216445c2015-03-27 00:23:281169 executable("epoll_quic_client") {
scottmg34fb7e52014-12-03 23:27:241170 sources = [
1171 "tools/quic/quic_client_bin.cc",
1172 ]
[email protected]8603c5de2014-04-16 20:34:311173 deps = [
brettwbc44c0a92015-02-20 22:30:391174 ":balsa",
1175 ":epoll_server",
rch216445c2015-03-27 00:23:281176 ":epoll_quic_tools",
1177 ":net",
1178 ":simple_quic_tools",
1179 "//base",
1180 "//third_party/boringssl",
1181 ]
1182 }
1183
1184 executable("epoll_quic_server") {
1185 sources = [
1186 "tools/quic/quic_server_bin.cc",
1187 ]
1188 deps = [
1189 ":balsa",
1190 ":epoll_server",
1191 ":epoll_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311192 ":net",
rchda78df5a2015-03-22 05:16:371193 ":simple_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311194 "//base",
[email protected]edfd0f42014-07-22 18:20:371195 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311196 ]
1197 }
[email protected]8603c5de2014-04-16 20:34:311198}
1199
[email protected]ef0eb442014-05-15 09:32:181200if (is_android) {
1201 generate_jni("net_jni_headers") {
1202 sources = [
1203 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1204 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1205 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
1206 "android/java/src/org/chromium/net/AndroidPrivateKey.java",
1207 "android/java/src/org/chromium/net/GURLUtils.java",
1208 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1209 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1210 "android/java/src/org/chromium/net/X509Util.java",
1211 ]
1212 jni_package = "net"
1213 }
cjhopmandad5f4272014-09-05 01:00:551214 generate_jni("net_test_jni_headers") {
1215 sources = [
1216 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
1217 ]
1218 jni_package = "net"
1219 }
[email protected]ef0eb442014-05-15 09:32:181220}
[email protected]8603c5de2014-04-16 20:34:311221
1222if (is_android || is_linux) {
1223 executable("disk_cache_memory_test") {
Brett Wilson8f80ad0b2014-09-08 19:50:241224 testonly = true
scottmg34fb7e52014-12-03 23:27:241225 sources = [
1226 "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1227 ]
[email protected]8603c5de2014-04-16 20:34:311228 deps = [
1229 ":net",
1230 "//base",
1231 ]
1232 }
1233}
[email protected]8a3f8242014-06-05 18:05:121234
rch47ad01f2015-03-20 21:17:231235source_set("simple_quic_tools") {
rcha9d12ce12015-03-19 23:06:491236 sources = [
rched113b22015-03-26 04:54:051237 "tools/quic/quic_client_session.cc",
1238 "tools/quic/quic_client_session.h",
rchc99f380c2015-03-26 19:50:561239 "tools/quic/quic_dispatcher.cc",
1240 "tools/quic/quic_dispatcher.h",
rch0e945472015-03-26 15:19:211241 "tools/quic/quic_in_memory_cache.cc",
1242 "tools/quic/quic_in_memory_cache.h",
rchc99f380c2015-03-26 19:50:561243 "tools/quic/quic_per_connection_packet_writer.cc",
1244 "tools/quic/quic_per_connection_packet_writer.h",
rch0e945472015-03-26 15:19:211245 "tools/quic/quic_server_session.cc",
1246 "tools/quic/quic_server_session.h",
rcha9d12ce12015-03-19 23:06:491247 "tools/quic/quic_simple_client.cc",
1248 "tools/quic/quic_simple_client.h",
rch216445c2015-03-27 00:23:281249 "tools/quic/quic_simple_per_connection_packet_writer.cc",
1250 "tools/quic/quic_simple_per_connection_packet_writer.h",
1251 "tools/quic/quic_simple_server.cc",
1252 "tools/quic/quic_simple_server.h",
1253 "tools/quic/quic_simple_server_packet_writer.cc",
1254 "tools/quic/quic_simple_server_packet_writer.h",
rched113b22015-03-26 04:54:051255 "tools/quic/quic_spdy_client_stream.cc",
1256 "tools/quic/quic_spdy_client_stream.h",
rch0e945472015-03-26 15:19:211257 "tools/quic/quic_spdy_server_stream.cc",
1258 "tools/quic/quic_spdy_server_stream.h",
1259 "tools/quic/quic_time_wait_list_manager.cc",
1260 "tools/quic/quic_time_wait_list_manager.h",
rchda78df5a2015-03-22 05:16:371261 "tools/quic/synchronous_host_resolver.cc",
1262 "tools/quic/synchronous_host_resolver.h",
rcha9d12ce12015-03-19 23:06:491263 ]
1264 deps = [
1265 ":net",
1266 "//base",
rch47ad01f2015-03-20 21:17:231267 "//base/third_party/dynamic_annotations",
1268 "//url",
1269 ]
1270}
1271
rch216445c2015-03-27 00:23:281272executable("quic_client") {
rch47ad01f2015-03-20 21:17:231273 sources = [
1274 "tools/quic/quic_simple_client_bin.cc",
1275 ]
1276 deps = [
1277 ":net",
1278 ":simple_quic_tools",
1279 "//base",
rcha9d12ce12015-03-19 23:06:491280 "//url",
1281 ]
1282}
1283
rch216445c2015-03-27 00:23:281284executable("quic_server") {
1285 sources = [
1286 "tools/quic/quic_simple_server_bin.cc",
1287 ]
1288 deps = [
1289 ":net",
1290 ":simple_quic_tools",
1291 "//base",
1292 "//third_party/boringssl",
brettw2e7db0a2015-04-24 22:59:171293 "//third_party/protobuf:protobuf_lite",
rch216445c2015-03-27 00:23:281294 ]
1295}
1296
[email protected]8a3f8242014-06-05 18:05:121297# TODO(GYP) make this compile on Android, we need some native test deps done.
dprankecf8465db72014-11-10 23:51:221298# TODO(GYP) Also doesn't work on Mac, need to figure out why not.
brettw690c96672015-04-21 16:19:541299if (!is_android && !is_mac) {
scottmg34fb7e52014-12-03 23:27:241300 test("net_unittests") {
1301 sources = gypi_values.net_test_sources
erikchen006a7cf2014-12-03 22:27:111302
brettwd1c719a2015-02-19 23:17:041303 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1304 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
scottmg34fb7e52014-12-03 23:27:241305 defines = []
[email protected]8a3f8242014-06-05 18:05:121306
scottmg34fb7e52014-12-03 23:27:241307 deps = [
brettw690c96672015-04-21 16:19:541308 ":balsa",
scottmg34fb7e52014-12-03 23:27:241309 ":extras",
1310 ":http_server",
1311 ":net",
rcha6d42cd2015-03-22 05:13:581312 ":simple_quic_tools",
scottmg34fb7e52014-12-03 23:27:241313 ":test_support",
1314 "//base",
1315 "//base:i18n",
1316 "//base:prefs_test_support",
1317 "//base/allocator",
1318 "//base/third_party/dynamic_annotations",
1319 "//crypto",
1320 "//crypto:platform",
1321 "//crypto:test_support",
brettwbc44c0a92015-02-20 22:30:391322 "//gin",
scottmg34fb7e52014-12-03 23:27:241323 "//net/base/registry_controlled_domains",
brettwbc44c0a92015-02-20 22:30:391324 "//sql",
scottmg34fb7e52014-12-03 23:27:241325 "//testing/gmock",
1326 "//testing/gtest",
1327 "//third_party/zlib",
1328 "//url",
[email protected]8a3f8242014-06-05 18:05:121329 ]
[email protected]8a3f8242014-06-05 18:05:121330
brettw690c96672015-04-21 16:19:541331 if (is_desktop_linux) {
1332 deps += [ ":epoll_quic_tools" ]
1333 }
scottmg34fb7e52014-12-03 23:27:241334 if (is_linux) {
1335 sources += gypi_values.net_linux_test_sources
1336 deps += [
1337 ":balsa",
1338 ":epoll_server",
1339 ":flip_in_mem_edsm_server_base",
rch216445c2015-03-27 00:23:281340 ":epoll_quic_tools",
[email protected]b2f44d12014-06-10 17:48:031341 ]
1342 }
[email protected]8a3f8242014-06-05 18:05:121343
scottmg34fb7e52014-12-03 23:27:241344 if (is_mac || is_ios) {
1345 sources += gypi_values.net_base_test_mac_ios_sources
1346 }
1347
brettwc859f18f2014-09-18 23:34:501348 if (is_chromeos) {
scottmg34fb7e52014-12-03 23:27:241349 sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
1350 }
1351
1352 if (is_android) {
brettwc859f18f2014-09-18 23:34:501353 sources -= [
scottmg34fb7e52014-12-03 23:27:241354 # See bug http://crbug.com/344533.
1355 "disk_cache/blockfile/index_table_v3_unittest.cc",
1356
1357 # No res_ninit() et al on Android, so this doesn't make a lot of
1358 # sense.
1359 "dns/dns_config_service_posix_unittest.cc",
1360 ]
cjhopmand4910ab2015-05-12 22:23:491361 deps += [ ":net_test_jni_headers" ]
mikecase56d80d72015-06-03 00:57:261362 isolate_file = "net_unittests.isolate"
brettwc859f18f2014-09-18 23:34:501363 }
scottmg34fb7e52014-12-03 23:27:241364
rmcilroy5837d332014-12-17 14:30:581365 if (v8_use_external_startup_data) {
1366 deps += [ "//gin" ]
1367 }
1368
scottmg34fb7e52014-12-03 23:27:241369 if (!use_nss_certs) {
davidben2bcbc6b2015-04-22 02:36:411370 sources -= [
1371 "cert/nss_cert_database_unittest.cc",
1372 "ssl/client_cert_store_nss_unittest.cc",
1373 ]
scottmg34fb7e52014-12-03 23:27:241374 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
davidben2bcbc6b2015-04-22 02:36:411375 sources -= [
1376 "cert/nss_cert_database_chromeos_unittest.cc",
1377 "cert/nss_profile_filter_chromeos_unittest.cc",
1378 "ssl/client_cert_store_chromeos_unittest.cc",
1379 ]
scottmg34fb7e52014-12-03 23:27:241380 }
1381 }
1382
1383 if (use_openssl) {
1384 # When building for OpenSSL, we need to exclude NSS specific tests
1385 # or functionality not supported by OpenSSL yet.
1386 # TODO(bulach): Add equivalent tests when the underlying
1387 # functionality is ported to OpenSSL.
nharper8a251152015-06-02 01:01:191388 sources -= [ "quic/test_tools/crypto_test_utils_nss.cc" ]
scottmg34fb7e52014-12-03 23:27:241389 } else {
1390 sources -= [
1391 "cert/x509_util_openssl_unittest.cc",
1392 "quic/test_tools/crypto_test_utils_openssl.cc",
1393 "socket/ssl_client_socket_openssl_unittest.cc",
davidbendafe4e52015-04-08 22:53:521394 "ssl/ssl_client_session_cache_openssl_unittest.cc",
scottmg34fb7e52014-12-03 23:27:241395 ]
scottmg34fb7e52014-12-03 23:27:241396 }
1397
1398 if (use_kerberos) {
1399 defines += [ "USE_KERBEROS" ]
1400 } else {
1401 sources -= [
1402 "http/http_auth_gssapi_posix_unittest.cc",
1403 "http/http_auth_handler_negotiate_unittest.cc",
1404 "http/mock_gssapi_library_posix.cc",
1405 "http/mock_gssapi_library_posix.h",
1406 ]
1407 }
1408
1409 if (use_openssl || (!is_desktop_linux && !is_chromeos && !is_ios)) {
1410 # Only include this test when on Posix and using NSS for
1411 # cert verification or on iOS (which also uses NSS for certs).
eromaned744f32015-04-09 06:35:491412 sources -= [ "cert_net/nss_ocsp_unittest.cc" ]
scottmg34fb7e52014-12-03 23:27:241413 }
1414
1415 if (!use_openssl_certs) {
1416 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1417 }
1418
1419 if (!enable_websockets) {
1420 sources -= [
dgozmana6e70092014-12-12 14:46:211421 "server/http_connection_unittest.cc",
1422 "server/http_server_response_info_unittest.cc",
1423 "server/http_server_unittest.cc",
1424 "server/web_socket_encoder_unittest.cc",
scottmg34fb7e52014-12-03 23:27:241425 "websockets/websocket_basic_stream_test.cc",
1426 "websockets/websocket_channel_test.cc",
1427 "websockets/websocket_deflate_predictor_impl_test.cc",
1428 "websockets/websocket_deflate_stream_test.cc",
1429 "websockets/websocket_deflater_test.cc",
ricea433bdab2015-01-26 07:25:371430 "websockets/websocket_end_to_end_test.cc",
satorux933fc7a2015-02-13 07:09:101431 "websockets/websocket_errors_test.cc",
scottmg34fb7e52014-12-03 23:27:241432 "websockets/websocket_extension_parser_test.cc",
1433 "websockets/websocket_frame_parser_test.cc",
1434 "websockets/websocket_frame_test.cc",
1435 "websockets/websocket_handshake_challenge_test.cc",
1436 "websockets/websocket_handshake_stream_create_helper_test.cc",
1437 "websockets/websocket_inflater_test.cc",
1438 "websockets/websocket_stream_test.cc",
1439 "websockets/websocket_test_util.cc",
1440 "websockets/websocket_test_util.h",
1441 ]
dgozmana6e70092014-12-12 14:46:211442 deps -= [ ":http_server" ]
scottmg34fb7e52014-12-03 23:27:241443 }
1444
1445 if (disable_file_support) {
1446 sources -= [
1447 "base/directory_lister_unittest.cc",
1448 "url_request/url_request_file_job_unittest.cc",
1449 ]
1450 }
1451
1452 if (disable_ftp_support) {
1453 sources -= [
1454 "ftp/ftp_auth_cache_unittest.cc",
1455 "ftp/ftp_ctrl_response_buffer_unittest.cc",
1456 "ftp/ftp_directory_listing_parser_ls_unittest.cc",
1457 "ftp/ftp_directory_listing_parser_netware_unittest.cc",
1458 "ftp/ftp_directory_listing_parser_os2_unittest.cc",
1459 "ftp/ftp_directory_listing_parser_unittest.cc",
1460 "ftp/ftp_directory_listing_parser_unittest.h",
1461 "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1462 "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1463 "ftp/ftp_network_transaction_unittest.cc",
1464 "ftp/ftp_util_unittest.cc",
1465 "url_request/url_request_ftp_job_unittest.cc",
1466 ]
1467 }
1468
1469 if (!enable_built_in_dns) {
1470 sources -= [
1471 "dns/address_sorter_posix_unittest.cc",
1472 "dns/address_sorter_unittest.cc",
1473 ]
1474 }
1475
1476 # Always need use_v8_in_net to be 1 to run on Android, so just remove
1477 # net_unittest's dependency on v8 when using icu alternatives instead of
1478 # setting use_v8_in_net to 0.
1479 if (use_v8_in_net && !use_icu_alternatives_on_android) {
1480 deps += [ ":net_with_v8" ]
1481 } else {
1482 sources -= [
scottmg34fb7e52014-12-03 23:27:241483 "proxy/proxy_resolver_v8_tracing_unittest.cc",
satorux933fc7a2015-02-13 07:09:101484 "proxy/proxy_resolver_v8_unittest.cc",
scottmg34fb7e52014-12-03 23:27:241485 ]
1486 }
1487
amistry7e6ebfdc82015-02-13 04:19:111488 if (use_v8_in_net && !is_android) {
1489 deps += [
1490 ":net_browser_services",
sammc5403aa1d2015-02-25 04:59:211491 ":net_utility_services",
amistry7e6ebfdc82015-02-13 04:19:111492 "//mojo/environment:chromium",
1493 "//third_party/mojo/src/mojo/edk/system",
1494 ]
1495 } else {
sammc5403aa1d2015-02-25 04:59:211496 sources -= [
sammc6ac3fe52015-02-25 06:00:281497 "dns/host_resolver_mojo_unittest.cc",
sammc5403aa1d2015-02-25 04:59:211498 "dns/mojo_host_resolver_impl_unittest.cc",
sammcc804b532015-03-12 10:02:341499 "proxy/load_state_change_coalescer_unittest.cc",
sammc352f7492015-02-25 09:45:241500 "proxy/mojo_proxy_resolver_factory_impl_unittest.cc",
sammc5403aa1d2015-02-25 04:59:211501 "proxy/mojo_proxy_resolver_impl_unittest.cc",
sammc359a8b742015-05-15 12:20:591502 "proxy/proxy_resolver_error_observer_mojo_unittest.cc",
eromandcacef22015-06-01 19:36:351503 "proxy/proxy_resolver_factory_mojo_unittest.cc",
amistry6e1ed1b2015-03-12 05:24:011504 "proxy/proxy_service_mojo_unittest.cc",
sammc5403aa1d2015-02-25 04:59:211505 ]
amistry7e6ebfdc82015-02-13 04:19:111506 }
1507
scottmg34fb7e52014-12-03 23:27:241508 if (!enable_mdns) {
1509 sources -= [
1510 "dns/mdns_cache_unittest.cc",
1511 "dns/mdns_client_unittest.cc",
1512 "dns/record_parsed_unittest.cc",
1513 "dns/record_rdata_unittest.cc",
1514 ]
1515 }
1516
1517 if (is_ios) {
1518 # TODO(GYP)
1519 # 'actions': [
1520 # {
1521 # 'action_name': 'copy_test_data',
1522 # 'variables': {
1523 # 'test_data_files': [
1524 # 'data/ssl/certificates/',
1525 # 'data/test.html',
1526 # 'data/url_request_unittest/',
1527 # ],
1528 # 'test_data_prefix': 'net',
1529 # },
1530 # 'includes': [ '../build/copy_test_data_ios.gypi' ],
1531 # },
1532 # ],
1533 sources -= [
1534 # TODO(droger): The following tests are disabled because the
1535 # implementation is missing or incomplete.
1536 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1537 "base/keygen_handler_unittest.cc",
1538 "disk_cache/backend_unittest.cc",
1539 "disk_cache/blockfile/block_files_unittest.cc",
1540
1541 # Need to read input data files.
1542 "filter/gzip_filter_unittest.cc",
1543 "socket/ssl_server_socket_unittest.cc",
1544 "spdy/fuzzing/hpack_fuzz_util_test.cc",
1545
1546 # Need TestServer.
eroman0fad62b2015-04-08 18:54:111547 "cert_net/cert_net_fetcher_impl_unittest.cc",
scottmg34fb7e52014-12-03 23:27:241548 "proxy/proxy_script_fetcher_impl_unittest.cc",
1549 "socket/ssl_client_socket_unittest.cc",
1550 "url_request/url_fetcher_impl_unittest.cc",
1551 "url_request/url_request_context_builder_unittest.cc",
1552
1553 # Needs GetAppOutput().
1554 "test/python_utils_unittest.cc",
1555
1556 # The following tests are disabled because they don't apply to
1557 # iOS.
1558 # OS is not "linux" or "freebsd" or "openbsd".
1559 "socket/unix_domain_client_socket_posix_unittest.cc",
1560 "socket/unix_domain_listen_socket_posix_unittest.cc",
1561 "socket/unix_domain_server_socket_posix_unittest.cc",
1562
1563 # See bug http://crbug.com/344533.
1564 "disk_cache/blockfile/index_table_v3_unittest.cc",
1565 ]
1566 }
1567
1568 if (is_android) {
1569 sources -= [ "dns/dns_config_service_posix_unittest.cc" ]
1570
1571 # TODO(GYP)
1572 # # TODO(mmenke): This depends on test_support_base, which depends on
1573 # # icu. Figure out a way to remove that dependency.
1574 # 'dependencies': [
1575 # '../testing/android/native_test.gyp:native_test_native_code',
1576 # ]
1577
1578 set_sources_assignment_filter([])
1579 sources += [ "base/address_tracker_linux_unittest.cc" ]
1580 set_sources_assignment_filter(sources_assignment_filter)
1581 }
1582
1583 if (use_icu_alternatives_on_android) {
1584 sources -= [
1585 "base/filename_util_unittest.cc",
1586 "base/net_util_icu_unittest.cc",
1587 ]
1588 deps -= [ "//base:i18n" ]
[email protected]8a3f8242014-06-05 18:05:121589 }
1590 }
dougke0f2b8f2015-03-16 22:40:331591} # !is_android && !is_win && !is_mac
[email protected]8a3f8242014-06-05 18:05:121592
rockot9c67e5f2015-03-12 20:01:211593executable("net_perftests") {
1594 testonly = true
1595 sources = [
ricea10eb9f5e2015-05-19 18:51:571596 "base/mime_sniffer_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211597 "cookies/cookie_monster_perftest.cc",
1598 "disk_cache/blockfile/disk_cache_perftest.cc",
rohitrao1860223c2015-05-16 01:07:141599 "extras/sqlite/sqlite_persistent_cookie_store_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211600 "proxy/proxy_resolver_perftest.cc",
1601 "udp/udp_socket_perftest.cc",
1602 ]
1603
1604 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1605 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
1606 deps = [
1607 "//base",
1608 "//base:i18n",
1609 "//base/test:test_support_perf",
1610 "//testing/gtest",
1611 "//url",
rohitrao1860223c2015-05-16 01:07:141612 ":extras",
rockot9c67e5f2015-03-12 20:01:211613 ":net",
1614 ":test_support",
1615 ]
1616
1617 if (enable_websockets) {
1618 sources += [ "websockets/websocket_frame_perftest.cc" ]
1619 }
1620
1621 if (use_v8_in_net) {
1622 deps += [ ":net_with_v8" ]
1623 } else {
1624 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1625 }
1626
1627 if (is_win && icu_use_data_file) {
1628 # This is needed to trigger the dll copy step on windows.
1629 # TODO(mark): Specifying this here shouldn't be necessary.
1630 deps += [ "//third_party/icu:icudata" ]
1631 }
1632}