blob: 05f1106d41178772105d1701113a8599313a4b07 [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 = [
72 # TODO(GYP) Note that he GYP file supports linux_link_kerberos (defaults to
73 # 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 = [
87 "//crypto",
scottmg34fb7e52014-12-03 23:27:2488 "//crypto:platform",
brettwbc44c0a92015-02-20 22:30:3989 "//url",
Brett Wilsone53895272014-09-23 23:41:4690 ]
[email protected]4625ade2014-04-15 19:26:4491 deps = [
scottmg34fb7e52014-12-03 23:27:2492 ":net_resources",
rtennetib6f1c0d2015-04-03 17:52:0693 ":net_quic_proto",
[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",
mukai77f8210a2014-10-07 16:35:14197 "cert/test_root_certs_nss.cc",
[email protected]4625ade2014-04-15 19:26:44198 "cert/x509_util_nss.cc",
199 "cert/x509_util_nss.h",
eromaned744f32015-04-09 06:35:49200 "cert_net/nss_ocsp.cc",
201 "cert_net/nss_ocsp.h",
[email protected]4625ade2014-04-15 19:26:44202 "quic/crypto/aead_base_decrypter_nss.cc",
203 "quic/crypto/aead_base_encrypter_nss.cc",
204 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc",
205 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc",
206 "quic/crypto/chacha20_poly1305_decrypter_nss.cc",
207 "quic/crypto/chacha20_poly1305_encrypter_nss.cc",
208 "quic/crypto/channel_id_nss.cc",
209 "quic/crypto/p256_key_exchange_nss.cc",
210 "socket/nss_ssl_util.cc",
211 "socket/nss_ssl_util.h",
212 "socket/ssl_client_socket_nss.cc",
213 "socket/ssl_client_socket_nss.h",
214 "socket/ssl_server_socket_nss.cc",
215 "socket/ssl_server_socket_nss.h",
[email protected]4625ade2014-04-15 19:26:44216 ]
[email protected]71d94dfce92014-04-30 16:47:24217 if (is_chromeos) {
218 sources -= [
219 "cert/nss_cert_database_chromeos.cc",
220 "cert/nss_cert_database_chromeos.h",
221 "cert/nss_profile_filter_chromeos.cc",
222 "cert/nss_profile_filter_chromeos.h",
223 ]
224 }
225 if (is_linux) {
226 # These are always removed for non-Linux cases below.
227 sources -= [
228 "base/crypto_module_nss.cc",
229 "base/keygen_handler_nss.cc",
230 "cert/cert_database_nss.cc",
231 "cert/nss_cert_database.cc",
232 "cert/nss_cert_database.h",
233 "cert/x509_certificate_nss.cc",
234 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
235 "third_party/mozilla_security_manager/nsKeygenHandler.h",
236 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
237 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
238 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
239 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
240 ]
241 }
242 if (is_ios) {
243 # Always removed for !ios below.
244 sources -= [
245 "cert/cert_verify_proc_nss.cc",
246 "cert/cert_verify_proc_nss.h",
[email protected]71d94dfce92014-04-30 16:47:24247 ]
248 }
davidbend5587412014-10-30 21:44:16249 if (is_win) {
scottmg34fb7e52014-12-03 23:27:24250 sources -= [ "cert/sha256_legacy_support_nss_win.cc" ]
davidbend5587412014-10-30 21:44:16251 }
[email protected]4625ade2014-04-15 19:26:44252 } else {
253 sources -= [
254 "base/crypto_module_openssl.cc",
[email protected]4625ade2014-04-15 19:26:44255 "cert/ct_log_verifier_openssl.cc",
256 "cert/ct_objects_extractor_openssl.cc",
257 "cert/jwk_serializer_openssl.cc",
258 "cert/x509_util_openssl.cc",
259 "cert/x509_util_openssl.h",
260 "quic/crypto/aead_base_decrypter_openssl.cc",
261 "quic/crypto/aead_base_encrypter_openssl.cc",
262 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc",
263 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc",
264 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc",
265 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc",
266 "quic/crypto/channel_id_openssl.cc",
267 "quic/crypto/p256_key_exchange_openssl.cc",
268 "quic/crypto/scoped_evp_aead_ctx.cc",
269 "quic/crypto/scoped_evp_aead_ctx.h",
270 "socket/ssl_client_socket_openssl.cc",
271 "socket/ssl_client_socket_openssl.h",
272 "socket/ssl_server_socket_openssl.cc",
[email protected]c8a80e92014-05-17 16:02:08273 "socket/ssl_server_socket_openssl.h",
[email protected]97a854f2014-07-29 07:51:36274 "ssl/openssl_platform_key.h",
275 "ssl/openssl_ssl_util.cc",
276 "ssl/openssl_ssl_util.h",
davidbendafe4e52015-04-08 22:53:52277 "ssl/ssl_client_session_cache_openssl.cc",
278 "ssl/ssl_client_session_cache_openssl.h",
[email protected]4625ade2014-04-15 19:26:44279 ]
[email protected]97a854f2014-07-29 07:51:36280 if (is_mac) {
scottmg34fb7e52014-12-03 23:27:24281 sources -= [ "ssl/openssl_platform_key_mac.cc" ]
[email protected]97a854f2014-07-29 07:51:36282 }
283 if (is_win) {
284 sources -= [
John Abd-El-Malek494329e2014-11-05 19:06:30285 "cert/sha256_legacy_support_openssl_win.cc",
[email protected]97a854f2014-07-29 07:51:36286 "ssl/openssl_platform_key_win.cc",
287 ]
288 }
[email protected]4625ade2014-04-15 19:26:44289 }
290
291 if (!use_openssl_certs) {
292 sources -= [
isherman7e5de442014-09-25 23:00:18293 "base/keygen_handler_openssl.cc",
[email protected]4625ade2014-04-15 19:26:44294 "base/openssl_private_key_store.h",
295 "base/openssl_private_key_store_memory.cc",
296 "cert/cert_database_openssl.cc",
297 "cert/cert_verify_proc_openssl.cc",
298 "cert/cert_verify_proc_openssl.h",
299 "cert/test_root_certs_openssl.cc",
300 "cert/x509_certificate_openssl.cc",
301 "ssl/openssl_client_key_store.cc",
302 "ssl/openssl_client_key_store.h",
303 ]
304 if (is_android) {
scottmg34fb7e52014-12-03 23:27:24305 sources -= [ "base/openssl_private_key_store_android.cc" ]
[email protected]4625ade2014-04-15 19:26:44306 }
[email protected]1ea01752014-05-23 19:01:46307 } else if (is_android) {
308 # Android doesn't use these even when using OpenSSL.
309 sources -= [
310 "base/openssl_private_key_store_memory.cc",
311 "cert/cert_database_openssl.cc",
312 "cert/cert_verify_proc_openssl.cc",
313 "cert/test_root_certs_openssl.cc",
314 ]
[email protected]4625ade2014-04-15 19:26:44315 }
316
mukai77f8210a2014-10-07 16:35:14317 if (use_glib && !is_chromeos) {
[email protected]4625ade2014-04-15 19:26:44318 configs += [ "//build/config/linux:gconf" ]
319 deps += [ "//build/config/linux:gio" ]
320 }
321
322 if (is_linux) {
323 configs += [ "//build/config/linux:libresolv" ]
324 } else {
325 sources -= [
326 "base/crypto_module_nss.cc",
327 "base/keygen_handler_nss.cc",
328 "cert/cert_database_nss.cc",
329 "cert/nss_cert_database.cc",
330 "cert/nss_cert_database.h",
[email protected]4625ade2014-04-15 19:26:44331 "cert/x509_certificate_nss.cc",
[email protected]4625ade2014-04-15 19:26:44332 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
333 "third_party/mozilla_security_manager/nsKeygenHandler.h",
334 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
335 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
336 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
337 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
338 ]
[email protected]e8ab6912014-04-21 20:54:51339
mukai77f8210a2014-10-07 16:35:14340 if (!is_ios && !use_openssl) {
[email protected]e8ab6912014-04-21 20:54:51341 # These files are part of the partial implementation of NSS on iOS so
342 # keep them in that case.
343 sources -= [
344 "cert/test_root_certs_nss.cc",
eromaned744f32015-04-09 06:35:49345 "cert_net/nss_ocsp.cc",
346 "cert_net/nss_ocsp.h",
[email protected]e8ab6912014-04-21 20:54:51347 ]
348 }
[email protected]4625ade2014-04-15 19:26:44349 }
350
[email protected]e8ab6912014-04-21 20:54:51351 if (!use_nss_certs) {
[email protected]4625ade2014-04-15 19:26:44352 sources -= [
[email protected]4625ade2014-04-15 19:26:44353 "ssl/client_cert_store_nss.cc",
354 "ssl/client_cert_store_nss.h",
355 ]
[email protected]e8ab6912014-04-21 20:54:51356 if (!is_ios) {
357 # These files are part of the partial implementation of NSS on iOS so
358 # keep them in that case (even though use_nss_certs is not set).
359 sources -= [
360 "cert/cert_verify_proc_nss.cc",
361 "cert/cert_verify_proc_nss.h",
362 ]
363 }
[email protected]4625ade2014-04-15 19:26:44364 if (is_chromeos) {
365 # These were already removed on non-ChromeOS.
366 sources -= [
367 "ssl/client_cert_store_chromeos.cc",
368 "ssl/client_cert_store_chromeos.h",
369 ]
370 }
371 }
372
373 if (!enable_websockets) {
374 sources -= [
[email protected]4625ade2014-04-15 19:26:44375 "websockets/websocket_basic_handshake_stream.cc",
376 "websockets/websocket_basic_handshake_stream.h",
377 "websockets/websocket_basic_stream.cc",
378 "websockets/websocket_basic_stream.h",
379 "websockets/websocket_channel.cc",
380 "websockets/websocket_channel.h",
381 "websockets/websocket_deflate_predictor.h",
382 "websockets/websocket_deflate_predictor_impl.cc",
383 "websockets/websocket_deflate_predictor_impl.h",
384 "websockets/websocket_deflate_stream.cc",
385 "websockets/websocket_deflate_stream.h",
386 "websockets/websocket_deflater.cc",
387 "websockets/websocket_deflater.h",
388 "websockets/websocket_errors.cc",
389 "websockets/websocket_errors.h",
390 "websockets/websocket_extension.cc",
391 "websockets/websocket_extension.h",
392 "websockets/websocket_extension_parser.cc",
393 "websockets/websocket_extension_parser.h",
394 "websockets/websocket_frame.cc",
395 "websockets/websocket_frame.h",
396 "websockets/websocket_frame_parser.cc",
397 "websockets/websocket_frame_parser.h",
ricea11bdcd02014-11-20 09:57:07398 "websockets/websocket_handshake_challenge.cc",
399 "websockets/websocket_handshake_challenge.h",
satorux933fc7a2015-02-13 07:09:10400 "websockets/websocket_handshake_constants.cc",
401 "websockets/websocket_handshake_constants.h",
[email protected]4625ade2014-04-15 19:26:44402 "websockets/websocket_handshake_request_info.cc",
403 "websockets/websocket_handshake_request_info.h",
404 "websockets/websocket_handshake_response_info.cc",
405 "websockets/websocket_handshake_response_info.h",
406 "websockets/websocket_handshake_stream_base.h",
407 "websockets/websocket_handshake_stream_create_helper.cc",
408 "websockets/websocket_handshake_stream_create_helper.h",
409 "websockets/websocket_inflater.cc",
410 "websockets/websocket_inflater.h",
[email protected]4625ade2014-04-15 19:26:44411 "websockets/websocket_mux.h",
[email protected]4625ade2014-04-15 19:26:44412 "websockets/websocket_stream.cc",
413 "websockets/websocket_stream.h",
[email protected]4625ade2014-04-15 19:26:44414 ]
415 }
416
417 if (!enable_mdns) {
418 sources -= [
419 "dns/mdns_cache.cc",
420 "dns/mdns_cache.h",
421 "dns/mdns_client.cc",
422 "dns/mdns_client.h",
423 "dns/mdns_client_impl.cc",
424 "dns/mdns_client_impl.h",
425 "dns/record_parsed.cc",
426 "dns/record_parsed.h",
427 "dns/record_rdata.cc",
428 "dns/record_rdata.h",
429 ]
430 }
431
432 if (is_win) {
433 sources -= [
434 "http/http_auth_handler_ntlm_portable.cc",
[email protected]2ef2b0e2014-07-09 21:12:34435 "socket/socket_libevent.cc",
436 "socket/socket_libevent.h",
[email protected]4625ade2014-04-15 19:26:44437 "socket/tcp_socket_libevent.cc",
438 "socket/tcp_socket_libevent.h",
439 "udp/udp_socket_libevent.cc",
440 "udp/udp_socket_libevent.h",
441 ]
[email protected]4625ade2014-04-15 19:26:44442 } else { # !is_win
443 sources -= [
444 "base/winsock_init.cc",
445 "base/winsock_init.h",
446 "base/winsock_util.cc",
447 "base/winsock_util.h",
448 "proxy/proxy_resolver_winhttp.cc",
449 "proxy/proxy_resolver_winhttp.h",
450 ]
451 }
452
453 if (is_mac) {
[email protected]4625ade2014-04-15 19:26:44454 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19455 "Foundation.framework",
456 "Security.framework",
457 "SystemConfiguration.framework",
458 "resolv",
[email protected]4625ade2014-04-15 19:26:44459 ]
460 }
461
462 if (is_ios) {
[email protected]b2b2bf52014-05-28 20:26:57463 # Add back some sources that were otherwise filtered out. iOS additionally
464 # doesn't set USE_NSS but needs some of the files.
465 set_sources_assignment_filter([])
466 sources += [
guoweis7eb7ab52014-11-14 17:42:56467 "base/net_util_mac.cc",
468 "base/net_util_mac.h",
[email protected]b2b2bf52014-05-28 20:26:57469 "base/network_change_notifier_mac.cc",
470 "base/network_config_watcher_mac.cc",
471 "base/platform_mime_util_mac.mm",
472 "cert/cert_verify_proc_nss.cc",
473 "cert/cert_verify_proc_nss.h",
474 "cert/test_root_certs_nss.cc",
475 "cert/x509_util_nss.cc",
476 "cert/x509_util_nss.h",
eromaned744f32015-04-09 06:35:49477 "cert_net/nss_ocsp.cc",
478 "cert_net/nss_ocsp.h",
satorux933fc7a2015-02-13 07:09:10479 "proxy/proxy_resolver_mac.cc",
480 "proxy/proxy_server_mac.cc",
[email protected]b2b2bf52014-05-28 20:26:57481 ]
482 set_sources_assignment_filter(sources_assignment_filter)
483
[email protected]4625ade2014-04-15 19:26:44484 sources -= [ "disk_cache/blockfile/file_posix.cc" ]
[email protected]4625ade2014-04-15 19:26:44485 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19486 "CFNetwork.framework",
487 "MobileCoreServices.framework",
488 "Security.framework",
489 "SystemConfiguration.framework",
490 "resolv",
[email protected]4625ade2014-04-15 19:26:44491 ]
492 }
493
erikchen006a7cf2014-12-03 22:27:11494 if (is_ios || is_mac) {
495 sources += gypi_values.net_base_mac_ios_sources
496 }
497
[email protected]4625ade2014-04-15 19:26:44498 if (is_android) {
[email protected]b2b2bf52014-05-28 20:26:57499 # Add some Linux sources that were excluded by the filter, but which
500 # are needed.
501 set_sources_assignment_filter([])
502 sources += [
[email protected]b2b2bf52014-05-28 20:26:57503 "base/address_tracker_linux.cc",
504 "base/address_tracker_linux.h",
guoweis7eb7ab52014-11-14 17:42:56505 "base/net_util_linux.cc",
scottmg34fb7e52014-12-03 23:27:24506 "base/net_util_linux.h",
satorux933fc7a2015-02-13 07:09:10507 "base/platform_mime_util_linux.cc",
[email protected]b2b2bf52014-05-28 20:26:57508 ]
509 set_sources_assignment_filter(sources_assignment_filter)
tornefe8398d2015-04-07 18:47:26510 deps += [ ":net_jni_headers" ]
[email protected]4625ade2014-04-15 19:26:44511 }
[email protected]ad66db12014-07-10 12:43:47512
[email protected]85191ed2014-05-15 00:41:49513 if (use_icu_alternatives_on_android) {
[email protected]85191ed2014-05-15 00:41:49514 sources += [
515 "base/net_string_util_icu_alternatives_android.cc",
516 "base/net_string_util_icu_alternatives_android.h",
517 ]
mefdc8e94b2015-03-11 19:49:05518 } else {
519 deps += [
520 "//base:i18n",
521 "//third_party/icu",
522 ]
523 sources += [
524 "base/filename_util_icu.cc",
525 "base/net_string_util_icu.cc",
526 "base/net_util_icu.cc",
527 ]
[email protected]85191ed2014-05-15 00:41:49528 }
[email protected]4625ade2014-04-15 19:26:44529}
530
531grit("net_resources") {
532 source = "base/net_resources.grd"
[email protected]7ae52902014-08-18 22:36:01533 use_qualified_include = true
[email protected]b89c53842014-07-23 16:32:32534 outputs = [
535 "grit/net_resources.h",
536 "net_resources.pak",
537 "net_resources.rc",
538 ]
[email protected]4625ade2014-04-15 19:26:44539}
540
rtennetib6f1c0d2015-04-03 17:52:06541proto_library("net_quic_proto") {
542 sources = [
543 "quic/proto/cached_network_parameters.proto",
544 "quic/proto/source_address_token.proto",
545 ]
546 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:"
547 cc_include = "net/base/net_export.h"
548
549 defines = [ "NET_IMPLEMENTATION" ]
550
551 extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
552}
553
Brett Wilson83fd4242014-09-02 19:45:33554static_library("extras") {
mef327a8e42014-08-29 17:10:03555 sources = gypi_values.net_extras_sources
556 configs += [ "//build/config/compiler:wexit_time_destructors" ]
557 deps = [
558 ":net",
brettwbc44c0a92015-02-20 22:30:39559 "//base",
mef327a8e42014-08-29 17:10:03560 "//sql:sql",
561 ]
562}
563
[email protected]8a3f8242014-06-05 18:05:12564static_library("http_server") {
[email protected]4625ade2014-04-15 19:26:44565 sources = [
566 "server/http_connection.cc",
567 "server/http_connection.h",
568 "server/http_server.cc",
569 "server/http_server.h",
570 "server/http_server_request_info.cc",
571 "server/http_server_request_info.h",
572 "server/http_server_response_info.cc",
573 "server/http_server_response_info.h",
574 "server/web_socket.cc",
575 "server/web_socket.h",
dgozmana6e70092014-12-12 14:46:21576 "server/web_socket_encoder.cc",
577 "server/web_socket_encoder.h",
[email protected]4625ade2014-04-15 19:26:44578 ]
jambc6cc8e2014-11-14 17:56:29579 configs += [
brettwd1c719a2015-02-19 23:17:04580 "//build/config/compiler:no_size_t_to_int_warning",
jambc6cc8e2014-11-14 17:56:29581 "//build/config/compiler:wexit_time_destructors",
jambc6cc8e2014-11-14 17:56:29582 ]
[email protected]4625ade2014-04-15 19:26:44583 deps = [
584 ":net",
585 "//base",
586 ]
587}
588
[email protected]8603c5de2014-04-16 20:34:31589executable("dump_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24590 testonly = true
[email protected]8603c5de2014-04-16 20:34:31591 sources = [
592 "tools/dump_cache/cache_dumper.cc",
593 "tools/dump_cache/cache_dumper.h",
594 "tools/dump_cache/dump_cache.cc",
595 "tools/dump_cache/dump_files.cc",
596 "tools/dump_cache/dump_files.h",
597 "tools/dump_cache/simple_cache_dumper.cc",
598 "tools/dump_cache/simple_cache_dumper.h",
[email protected]8603c5de2014-04-16 20:34:31599 "tools/dump_cache/url_to_filename_encoder.cc",
600 "tools/dump_cache/url_to_filename_encoder.h",
[email protected]8603c5de2014-04-16 20:34:31601 "tools/dump_cache/url_utilities.cc",
satorux933fc7a2015-02-13 07:09:10602 "tools/dump_cache/url_utilities.h",
[email protected]8603c5de2014-04-16 20:34:31603 ]
[email protected]4625ade2014-04-15 19:26:44604
brettwd1c719a2015-02-19 23:17:04605 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
606 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31607
608 deps = [
609 "//base",
610 ":net",
[email protected]b2b2bf52014-05-28 20:26:57611 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31612 ]
613}
614
[email protected]b2b2bf52014-05-28 20:26:57615source_set("test_support") {
Brett Wilson8f80ad0b2014-09-08 19:50:24616 testonly = true
[email protected]8603c5de2014-04-16 20:34:31617 sources = [
[email protected]8603c5de2014-04-16 20:34:31618 "base/load_timing_info_test_util.cc",
619 "base/load_timing_info_test_util.h",
620 "base/mock_file_stream.cc",
621 "base/mock_file_stream.h",
622 "base/test_completion_callback.cc",
623 "base/test_completion_callback.h",
624 "base/test_data_directory.cc",
625 "base/test_data_directory.h",
626 "cert/mock_cert_verifier.cc",
627 "cert/mock_cert_verifier.h",
628 "cookies/cookie_monster_store_test.cc",
629 "cookies/cookie_monster_store_test.h",
630 "cookies/cookie_store_test_callbacks.cc",
631 "cookies/cookie_store_test_callbacks.h",
632 "cookies/cookie_store_test_helpers.cc",
633 "cookies/cookie_store_test_helpers.h",
634 "disk_cache/disk_cache_test_base.cc",
635 "disk_cache/disk_cache_test_base.h",
636 "disk_cache/disk_cache_test_util.cc",
637 "disk_cache/disk_cache_test_util.h",
638 "dns/dns_test_util.cc",
639 "dns/dns_test_util.h",
640 "dns/mock_host_resolver.cc",
641 "dns/mock_host_resolver.h",
642 "dns/mock_mdns_socket_factory.cc",
643 "dns/mock_mdns_socket_factory.h",
[email protected]8a3f8242014-06-05 18:05:12644 "http/http_transaction_test_util.cc",
645 "http/http_transaction_test_util.h",
eroman87c53d62015-04-02 06:51:07646 "log/captured_net_log_entry.cc",
647 "log/captured_net_log_entry.h",
648 "log/capturing_net_log.cc",
649 "log/capturing_net_log.h",
650 "log/capturing_net_log_observer.cc",
651 "log/capturing_net_log_observer.h",
[email protected]8603c5de2014-04-16 20:34:31652 "proxy/mock_proxy_resolver.cc",
653 "proxy/mock_proxy_resolver.h",
654 "proxy/mock_proxy_script_fetcher.cc",
655 "proxy/mock_proxy_script_fetcher.h",
656 "proxy/proxy_config_service_common_unittest.cc",
657 "proxy/proxy_config_service_common_unittest.h",
658 "socket/socket_test_util.cc",
659 "socket/socket_test_util.h",
660 "test/cert_test_util.cc",
661 "test/cert_test_util.h",
[email protected]83e1ae32014-07-18 10:57:07662 "test/cert_test_util_nss.cc",
[email protected]8603c5de2014-04-16 20:34:31663 "test/ct_test_util.cc",
664 "test/ct_test_util.h",
665 "test/embedded_test_server/embedded_test_server.cc",
666 "test/embedded_test_server/embedded_test_server.h",
667 "test/embedded_test_server/http_connection.cc",
668 "test/embedded_test_server/http_connection.h",
669 "test/embedded_test_server/http_request.cc",
670 "test/embedded_test_server/http_request.h",
671 "test/embedded_test_server/http_response.cc",
672 "test/embedded_test_server/http_response.h",
sammc6ac3fe52015-02-25 06:00:28673 "test/event_waiter.h",
[email protected]8603c5de2014-04-16 20:34:31674 "test/net_test_suite.cc",
675 "test/net_test_suite.h",
676 "test/python_utils.cc",
677 "test/python_utils.h",
678 "test/spawned_test_server/base_test_server.cc",
679 "test/spawned_test_server/base_test_server.h",
[email protected]8603c5de2014-04-16 20:34:31680 "test/spawned_test_server/local_test_server.cc",
681 "test/spawned_test_server/local_test_server.h",
satorux933fc7a2015-02-13 07:09:10682 "test/spawned_test_server/local_test_server_posix.cc",
683 "test/spawned_test_server/local_test_server_win.cc",
[email protected]8603c5de2014-04-16 20:34:31684 "test/spawned_test_server/remote_test_server.cc",
685 "test/spawned_test_server/remote_test_server.h",
686 "test/spawned_test_server/spawned_test_server.h",
687 "test/spawned_test_server/spawner_communicator.cc",
688 "test/spawned_test_server/spawner_communicator.h",
Brett Wilson32ce17a2014-11-10 17:45:30689 "test/url_request/url_request_failed_job.cc",
690 "test/url_request/url_request_failed_job.h",
mef3e826cf2014-12-13 18:40:40691 "test/url_request/url_request_mock_data_job.cc",
692 "test/url_request/url_request_mock_data_job.h",
Brett Wilson32ce17a2014-11-10 17:45:30693 "test/url_request/url_request_mock_http_job.cc",
694 "test/url_request/url_request_mock_http_job.h",
jam8e45cd72015-01-20 16:33:44695 "test/url_request/url_request_slow_download_job.cc",
696 "test/url_request/url_request_slow_download_job.h",
[email protected]8603c5de2014-04-16 20:34:31697 "url_request/test_url_fetcher_factory.cc",
698 "url_request/test_url_fetcher_factory.h",
tommyclieaae5d92014-09-09 06:03:47699 "url_request/test_url_request_interceptor.cc",
700 "url_request/test_url_request_interceptor.h",
[email protected]8603c5de2014-04-16 20:34:31701 "url_request/url_request_test_util.cc",
702 "url_request/url_request_test_util.h",
703 ]
704
brettwd1c719a2015-02-19 23:17:04705 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
706 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31707
Brett Wilsone53895272014-09-23 23:41:46708 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31709 "//base",
710 "//base/test:test_support",
[email protected]22fe91d2014-08-12 17:07:12711 "//crypto",
[email protected]59ff2d42014-04-22 22:25:23712 "//net",
[email protected]8603c5de2014-04-16 20:34:31713 "//net/tools/tld_cleanup",
714 "//testing/gmock",
715 "//testing/gtest",
716 "//url",
717 ]
718
jamb533b7e2015-03-04 17:12:05719 if (!is_ios) {
720 public_deps += [ "//third_party/protobuf:py_proto" ]
721 }
722
davidben15d69d482014-09-29 18:24:08723 if (!use_openssl && (use_nss_certs || is_ios)) {
scottmg34fb7e52014-12-03 23:27:24724 public_deps += [ "//crypto:platform" ]
[email protected]8603c5de2014-04-16 20:34:31725 }
726
727 if (!is_android) {
728 sources -= [
729 "test/spawned_test_server/remote_test_server.cc",
730 "test/spawned_test_server/remote_test_server.h",
731 "test/spawned_test_server/spawner_communicator.cc",
732 "test/spawned_test_server/spawner_communicator.h",
733 ]
734 }
735
736 if (use_v8_in_net) {
Brett Wilsone53895272014-09-23 23:41:46737 public_deps += [ ":net_with_v8" ]
[email protected]8603c5de2014-04-16 20:34:31738 }
739
740 if (!enable_mdns) {
741 sources -= [
742 "dns/mock_mdns_socket_factory.cc",
743 "dns/mock_mdns_socket_factory.h",
744 ]
745 }
746
davidben15d69d482014-09-29 18:24:08747 if (!use_nss_certs) {
scottmg34fb7e52014-12-03 23:27:24748 sources -= [ "test/cert_test_util_nss.cc" ]
[email protected]83e1ae32014-07-18 10:57:07749 }
[email protected]8603c5de2014-04-16 20:34:31750}
751
[email protected]ceeaac792014-06-25 05:14:43752source_set("balsa") {
753 sources = [
754 "tools/balsa/balsa_enums.h",
755 "tools/balsa/balsa_frame.cc",
756 "tools/balsa/balsa_frame.h",
757 "tools/balsa/balsa_headers.cc",
758 "tools/balsa/balsa_headers.h",
759 "tools/balsa/balsa_headers_token_utils.cc",
760 "tools/balsa/balsa_headers_token_utils.h",
761 "tools/balsa/balsa_visitor_interface.h",
762 "tools/balsa/http_message_constants.cc",
763 "tools/balsa/http_message_constants.h",
764 "tools/balsa/noop_balsa_visitor.h",
765 "tools/balsa/simple_buffer.cc",
766 "tools/balsa/simple_buffer.h",
767 "tools/balsa/split.cc",
768 "tools/balsa/split.h",
769 "tools/balsa/string_piece_utils.h",
770 "tools/quic/spdy_utils.cc",
771 "tools/quic/spdy_utils.h",
772 ]
773 deps = [
774 ":net",
775 "//base",
[email protected]22fe91d2014-08-12 17:07:12776 "//url",
[email protected]ceeaac792014-06-25 05:14:43777 ]
778}
779
[email protected]8603c5de2014-04-16 20:34:31780if (use_v8_in_net) {
781 component("net_with_v8") {
782 sources = [
783 "proxy/proxy_resolver_v8.cc",
784 "proxy/proxy_resolver_v8.h",
785 "proxy/proxy_resolver_v8_tracing.cc",
786 "proxy/proxy_resolver_v8_tracing.h",
787 "proxy/proxy_service_v8.cc",
788 "proxy/proxy_service_v8.h",
789 ]
790
791 defines = [ "NET_IMPLEMENTATION" ]
792 configs += [
brettwd1c719a2015-02-19 23:17:04793 "//build/config/compiler:no_size_t_to_int_warning",
[email protected]8603c5de2014-04-16 20:34:31794 "//build/config/compiler:wexit_time_destructors",
795 ]
796
Brett Wilsone53895272014-09-23 23:41:46797 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31798 ":net",
Brett Wilsone53895272014-09-23 23:41:46799 ]
800 deps = [
[email protected]8603c5de2014-04-16 20:34:31801 "//base",
802 "//gin",
803 "//url",
804 "//v8",
805 ]
806 }
807}
808
amistry7e6ebfdc82015-02-13 04:19:11809if (use_v8_in_net && !is_android) {
810 source_set("net_browser_services") {
811 sources = [
812 "dns/mojo_host_resolver_impl.cc",
813 "dns/mojo_host_resolver_impl.h",
amistry6e1ed1b2015-03-12 05:24:01814 "proxy/in_process_mojo_proxy_resolver_factory.cc",
815 "proxy/in_process_mojo_proxy_resolver_factory.h",
amistry07ff1402015-03-10 07:34:07816 "proxy/mojo_proxy_resolver_factory.h",
817 "proxy/proxy_resolver_mojo.cc",
818 "proxy/proxy_resolver_mojo.h",
amistry6e1ed1b2015-03-12 05:24:01819 "proxy/proxy_service_mojo.cc",
820 "proxy/proxy_service_mojo.h",
amistry7e6ebfdc82015-02-13 04:19:11821 ]
822
823 public_deps = [
824 ":mojo_type_converters",
825 ":net",
brettwbc44c0a92015-02-20 22:30:39826 "//base",
amistry07ff1402015-03-10 07:34:07827 "//mojo/common",
amistry7e6ebfdc82015-02-13 04:19:11828 "//net/interfaces",
829 "//third_party/mojo/src/mojo/public/cpp/bindings",
amistry6e1ed1b2015-03-12 05:24:01830
831 # NOTE(amistry): As long as we support in-process Mojo v8 PAC, we need
832 # this dependency since in_process_mojo_proxy_resolver_factory creates
833 # the utility process side Mojo services in the browser process.
834 # Ultimately, this will go away when we only support out-of-process.
835 ":net_utility_services",
amistry7e6ebfdc82015-02-13 04:19:11836 ]
837 }
838
839 source_set("mojo_type_converters") {
840 sources = [
amistry7ec58112015-02-26 06:03:00841 "dns/mojo_host_type_converters.cc",
842 "dns/mojo_host_type_converters.h",
843 "proxy/mojo_proxy_type_converters.cc",
844 "proxy/mojo_proxy_type_converters.h",
amistry7e6ebfdc82015-02-13 04:19:11845 ]
846
847 public_deps = [
848 ":net",
849 "//net/interfaces",
850 "//third_party/mojo/src/mojo/public/cpp/bindings",
851 ]
852 }
sammc5403aa1d2015-02-25 04:59:21853
854 source_set("net_utility_services") {
855 sources = [
sammc6ac3fe52015-02-25 06:00:28856 "dns/host_resolver_mojo.cc",
857 "dns/host_resolver_mojo.h",
sammcc804b532015-03-12 10:02:34858 "proxy/load_state_change_coalescer.cc",
859 "proxy/load_state_change_coalescer.h",
sammc352f7492015-02-25 09:45:24860 "proxy/mojo_proxy_resolver_factory_impl.cc",
861 "proxy/mojo_proxy_resolver_factory_impl.h",
sammc5403aa1d2015-02-25 04:59:21862 "proxy/mojo_proxy_resolver_impl.cc",
863 "proxy/mojo_proxy_resolver_impl.h",
864 ]
865
866 public_deps = [
867 ":mojo_type_converters",
868 ":net",
869 "//mojo/common",
870 "//net/interfaces",
871 "//third_party/mojo/src/mojo/public/cpp/bindings",
872 ]
873 }
amistry7e6ebfdc82015-02-13 04:19:11874}
875
[email protected]8603c5de2014-04-16 20:34:31876if (!is_ios && !is_android) {
877 executable("crash_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24878 testonly = true
scottmg34fb7e52014-12-03 23:27:24879 sources = [
880 "tools/crash_cache/crash_cache.cc",
881 ]
dpranke43276212015-02-20 02:55:19882
brettwd1c719a2015-02-19 23:17:04883 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
884 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31885 deps = [
886 ":net",
[email protected]b2b2bf52014-05-28 20:26:57887 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31888 "//base",
889 ]
890 }
891
892 executable("crl_set_dump") {
Brett Wilson8f80ad0b2014-09-08 19:50:24893 testonly = true
scottmg34fb7e52014-12-03 23:27:24894 sources = [
895 "tools/crl_set_dump/crl_set_dump.cc",
896 ]
dpranke43276212015-02-20 02:55:19897
brettwd1c719a2015-02-19 23:17:04898 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
899 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31900 deps = [
901 ":net",
902 "//base",
903 ]
904 }
905
906 executable("dns_fuzz_stub") {
Brett Wilson8f80ad0b2014-09-08 19:50:24907 testonly = true
scottmg34fb7e52014-12-03 23:27:24908 sources = [
909 "tools/dns_fuzz_stub/dns_fuzz_stub.cc",
910 ]
dpranke43276212015-02-20 02:55:19911
brettwd1c719a2015-02-19 23:17:04912 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
913 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31914 deps = [
915 ":net",
916 "//base",
917 ]
918 }
919
920 executable("gdig") {
Brett Wilson8f80ad0b2014-09-08 19:50:24921 testonly = true
[email protected]8603c5de2014-04-16 20:34:31922 sources = [
923 "tools/gdig/file_net_log.cc",
924 "tools/gdig/gdig.cc",
925 ]
926 deps = [
927 ":net",
928 "//base",
929 ]
930 }
931
932 executable("get_server_time") {
Brett Wilson8f80ad0b2014-09-08 19:50:24933 testonly = true
scottmg34fb7e52014-12-03 23:27:24934 sources = [
935 "tools/get_server_time/get_server_time.cc",
936 ]
dpranke43276212015-02-20 02:55:19937
brettwd1c719a2015-02-19 23:17:04938 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
939 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31940 deps = [
941 ":net",
942 "//base",
943 "//base:i18n",
944 "//url",
945 ]
946 }
947
rockot9c67e5f2015-03-12 20:01:21948 executable("hpack_example_generator") {
949 testonly = true
950 sources = [
951 "spdy/fuzzing/hpack_example_generator.cc",
952 ]
953
954 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
955 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
956 deps = [
957 "//base",
958 ":net",
959 ]
960 }
961
962 executable("hpack_fuzz_mutator") {
963 testonly = true
964 sources = [
965 "spdy/fuzzing/hpack_fuzz_mutator.cc",
966 ]
967
968 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
969 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
970 deps = [
971 "//base",
972 ":net",
973 ]
974 }
975
976 executable("hpack_fuzz_wrapper") {
977 testonly = true
978 sources = [
979 "spdy/fuzzing/hpack_fuzz_wrapper.cc",
980 ]
981
982 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
983 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
984 deps = [
985 "//base",
986 ":net",
987 ]
988 }
989
[email protected]8603c5de2014-04-16 20:34:31990 if (use_v8_in_net) {
991 executable("net_watcher") {
Brett Wilson8f80ad0b2014-09-08 19:50:24992 testonly = true
scottmg34fb7e52014-12-03 23:27:24993 sources = [
994 "tools/net_watcher/net_watcher.cc",
995 ]
[email protected]8603c5de2014-04-16 20:34:31996 deps = [
997 ":net",
998 ":net_with_v8",
999 "//base",
1000 ]
1001
mukai77f8210a2014-10-07 16:35:141002 if (is_desktop_linux) {
[email protected]22fe91d2014-08-12 17:07:121003 configs += [
1004 "//build/config/linux:gconf",
1005 "//build/config/linux:glib",
1006 ]
[email protected]8603c5de2014-04-16 20:34:311007 deps += [ "//build/config/linux:gio" ]
1008 }
1009 }
1010 }
1011
1012 executable("run_testserver") {
Brett Wilson8f80ad0b2014-09-08 19:50:241013 testonly = true
scottmg34fb7e52014-12-03 23:27:241014 sources = [
1015 "tools/testserver/run_testserver.cc",
1016 ]
[email protected]8603c5de2014-04-16 20:34:311017 deps = [
1018 ":net", # TODO(brettw) bug 363749: this shouldn't be necessary. It's not
1019 # in the GYP build, and can be removed when the bug is fixed.
rockot9c67e5f2015-03-12 20:01:211020
[email protected]b2b2bf52014-05-28 20:26:571021 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311022 "//base",
1023 "//base/test:test_support",
1024 "//testing/gtest",
1025 ]
1026 }
1027
1028 executable("stress_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:241029 testonly = true
scottmg34fb7e52014-12-03 23:27:241030 sources = [
rvargase23fcf652015-03-04 19:59:221031 "tools/stress_cache/stress_cache.cc",
scottmg34fb7e52014-12-03 23:27:241032 ]
dpranke43276212015-02-20 02:55:191033
brettwd1c719a2015-02-19 23:17:041034 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1035 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311036 deps = [
1037 ":net",
[email protected]b2b2bf52014-05-28 20:26:571038 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311039 "//base",
1040 ]
1041 }
1042
1043 executable("tld_cleanup") {
scottmg34fb7e52014-12-03 23:27:241044 sources = [
1045 "tools/tld_cleanup/tld_cleanup.cc",
1046 ]
dpranke43276212015-02-20 02:55:191047
brettwd1c719a2015-02-19 23:17:041048 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1049 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311050 deps = [
1051 "//base",
1052 "//base:i18n",
1053 "//net/tools/tld_cleanup",
1054 ]
1055 }
1056}
1057
rch6983a3f2015-03-30 03:47:281058if (is_linux) {
[email protected]8a3f8242014-06-05 18:05:121059 static_library("epoll_server") {
[email protected]8603c5de2014-04-16 20:34:311060 sources = [
1061 "tools/epoll_server/epoll_server.cc",
1062 "tools/epoll_server/epoll_server.h",
1063 ]
1064 deps = [
1065 ":net",
1066 "//base",
1067 ]
1068 }
1069
[email protected]8a3f8242014-06-05 18:05:121070 static_library("flip_in_mem_edsm_server_base") {
Brett Wilson8f80ad0b2014-09-08 19:50:241071 testonly = true
[email protected]8603c5de2014-04-16 20:34:311072 sources = [
1073 "tools/dump_cache/url_to_filename_encoder.cc",
1074 "tools/dump_cache/url_to_filename_encoder.h",
[email protected]8603c5de2014-04-16 20:34:311075 "tools/dump_cache/url_utilities.cc",
satorux933fc7a2015-02-13 07:09:101076 "tools/dump_cache/url_utilities.h",
[email protected]8603c5de2014-04-16 20:34:311077 "tools/flip_server/acceptor_thread.cc",
satorux933fc7a2015-02-13 07:09:101078 "tools/flip_server/acceptor_thread.h",
1079 "tools/flip_server/constants.h",
[email protected]8603c5de2014-04-16 20:34:311080 "tools/flip_server/create_listener.cc",
1081 "tools/flip_server/create_listener.h",
[email protected]8603c5de2014-04-16 20:34:311082 "tools/flip_server/flip_config.cc",
1083 "tools/flip_server/flip_config.h",
1084 "tools/flip_server/http_interface.cc",
1085 "tools/flip_server/http_interface.h",
1086 "tools/flip_server/loadtime_measurement.h",
[email protected]8603c5de2014-04-16 20:34:311087 "tools/flip_server/mem_cache.cc",
satorux933fc7a2015-02-13 07:09:101088 "tools/flip_server/mem_cache.h",
[email protected]8603c5de2014-04-16 20:34:311089 "tools/flip_server/output_ordering.cc",
1090 "tools/flip_server/output_ordering.h",
1091 "tools/flip_server/ring_buffer.cc",
1092 "tools/flip_server/ring_buffer.h",
1093 "tools/flip_server/sm_connection.cc",
1094 "tools/flip_server/sm_connection.h",
1095 "tools/flip_server/sm_interface.h",
[email protected]8603c5de2014-04-16 20:34:311096 "tools/flip_server/spdy_interface.cc",
1097 "tools/flip_server/spdy_interface.h",
satorux933fc7a2015-02-13 07:09:101098 "tools/flip_server/spdy_ssl.cc",
1099 "tools/flip_server/spdy_ssl.h",
[email protected]8603c5de2014-04-16 20:34:311100 "tools/flip_server/spdy_util.cc",
1101 "tools/flip_server/spdy_util.h",
1102 "tools/flip_server/streamer_interface.cc",
1103 "tools/flip_server/streamer_interface.h",
1104 ]
1105 deps = [
1106 ":balsa",
1107 ":epoll_server",
1108 ":net",
1109 "//base",
[email protected]edfd0f42014-07-22 18:20:371110 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311111 ]
1112 }
1113
1114 executable("flip_in_mem_edsm_server_unittests") {
Brett Wilson8f80ad0b2014-09-08 19:50:241115 testonly = true
[email protected]8603c5de2014-04-16 20:34:311116 sources = [
1117 "tools/flip_server/flip_test_utils.cc",
1118 "tools/flip_server/flip_test_utils.h",
1119 "tools/flip_server/http_interface_test.cc",
1120 "tools/flip_server/mem_cache_test.cc",
1121 "tools/flip_server/run_all_tests.cc",
1122 "tools/flip_server/spdy_interface_test.cc",
1123 ]
1124 deps = [
brettwbc44c0a92015-02-20 22:30:391125 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311126 ":flip_in_mem_edsm_server_base",
1127 ":net",
[email protected]b2b2bf52014-05-28 20:26:571128 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311129 "//testing/gtest",
1130 "//testing/gmock",
[email protected]edfd0f42014-07-22 18:20:371131 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311132 ]
1133 }
1134
1135 executable("flip_in_mem_edsm_server") {
Brett Wilson8f80ad0b2014-09-08 19:50:241136 testonly = true
scottmg34fb7e52014-12-03 23:27:241137 sources = [
1138 "tools/flip_server/flip_in_mem_edsm_server.cc",
1139 ]
[email protected]8603c5de2014-04-16 20:34:311140 deps = [
brettwbc44c0a92015-02-20 22:30:391141 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311142 ":flip_in_mem_edsm_server_base",
1143 ":net",
1144 "//base",
1145 ]
1146 }
1147
rch216445c2015-03-27 00:23:281148 source_set("epoll_quic_tools") {
[email protected]8603c5de2014-04-16 20:34:311149 sources = [
1150 "tools/quic/quic_client.cc",
1151 "tools/quic/quic_client.h",
[email protected]8603c5de2014-04-16 20:34:311152 "tools/quic/quic_default_packet_writer.cc",
1153 "tools/quic/quic_default_packet_writer.h",
[email protected]8603c5de2014-04-16 20:34:311154 "tools/quic/quic_epoll_clock.cc",
1155 "tools/quic/quic_epoll_clock.h",
1156 "tools/quic/quic_epoll_connection_helper.cc",
1157 "tools/quic/quic_epoll_connection_helper.h",
rtennetifb3fa6c2015-03-16 23:04:551158 "tools/quic/quic_packet_reader.cc",
1159 "tools/quic/quic_packet_reader.h",
[email protected]8603c5de2014-04-16 20:34:311160 "tools/quic/quic_packet_writer_wrapper.cc",
1161 "tools/quic/quic_packet_writer_wrapper.h",
1162 "tools/quic/quic_server.cc",
1163 "tools/quic/quic_server.h",
[email protected]8603c5de2014-04-16 20:34:311164 "tools/quic/quic_socket_utils.cc",
1165 "tools/quic/quic_socket_utils.h",
[email protected]8603c5de2014-04-16 20:34:311166 ]
1167 deps = [
1168 ":balsa",
1169 ":epoll_server",
1170 ":net",
rtennetib6f1c0d2015-04-03 17:52:061171 ":net_quic_proto",
[email protected]8603c5de2014-04-16 20:34:311172 "//base",
1173 "//base/third_party/dynamic_annotations",
1174 "//crypto",
[email protected]edfd0f42014-07-22 18:20:371175 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311176 "//url",
1177 ]
1178 }
1179
rch216445c2015-03-27 00:23:281180 executable("epoll_quic_client") {
scottmg34fb7e52014-12-03 23:27:241181 sources = [
1182 "tools/quic/quic_client_bin.cc",
1183 ]
[email protected]8603c5de2014-04-16 20:34:311184 deps = [
brettwbc44c0a92015-02-20 22:30:391185 ":balsa",
1186 ":epoll_server",
rch216445c2015-03-27 00:23:281187 ":epoll_quic_tools",
1188 ":net",
1189 ":simple_quic_tools",
1190 "//base",
1191 "//third_party/boringssl",
1192 ]
1193 }
1194
1195 executable("epoll_quic_server") {
1196 sources = [
1197 "tools/quic/quic_server_bin.cc",
1198 ]
1199 deps = [
1200 ":balsa",
1201 ":epoll_server",
1202 ":epoll_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311203 ":net",
rtennetib6f1c0d2015-04-03 17:52:061204 ":net_quic_proto",
rchda78df5a2015-03-22 05:16:371205 ":simple_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311206 "//base",
[email protected]edfd0f42014-07-22 18:20:371207 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311208 ]
1209 }
[email protected]8603c5de2014-04-16 20:34:311210}
1211
[email protected]ef0eb442014-05-15 09:32:181212if (is_android) {
1213 generate_jni("net_jni_headers") {
1214 sources = [
1215 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1216 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1217 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
1218 "android/java/src/org/chromium/net/AndroidPrivateKey.java",
1219 "android/java/src/org/chromium/net/GURLUtils.java",
1220 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1221 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1222 "android/java/src/org/chromium/net/X509Util.java",
1223 ]
1224 jni_package = "net"
1225 }
cjhopmandad5f4272014-09-05 01:00:551226 generate_jni("net_test_jni_headers") {
1227 sources = [
1228 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
1229 ]
1230 jni_package = "net"
1231 }
[email protected]ef0eb442014-05-15 09:32:181232}
[email protected]8603c5de2014-04-16 20:34:311233
1234if (is_android || is_linux) {
1235 executable("disk_cache_memory_test") {
Brett Wilson8f80ad0b2014-09-08 19:50:241236 testonly = true
scottmg34fb7e52014-12-03 23:27:241237 sources = [
1238 "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1239 ]
[email protected]8603c5de2014-04-16 20:34:311240 deps = [
1241 ":net",
1242 "//base",
1243 ]
1244 }
1245}
[email protected]8a3f8242014-06-05 18:05:121246
rch47ad01f2015-03-20 21:17:231247source_set("simple_quic_tools") {
rcha9d12ce12015-03-19 23:06:491248 sources = [
rched113b22015-03-26 04:54:051249 "tools/quic/quic_client_session.cc",
1250 "tools/quic/quic_client_session.h",
rchc99f380c2015-03-26 19:50:561251 "tools/quic/quic_dispatcher.cc",
1252 "tools/quic/quic_dispatcher.h",
rch0e945472015-03-26 15:19:211253 "tools/quic/quic_in_memory_cache.cc",
1254 "tools/quic/quic_in_memory_cache.h",
rchc99f380c2015-03-26 19:50:561255 "tools/quic/quic_per_connection_packet_writer.cc",
1256 "tools/quic/quic_per_connection_packet_writer.h",
rch0e945472015-03-26 15:19:211257 "tools/quic/quic_server_session.cc",
1258 "tools/quic/quic_server_session.h",
rcha9d12ce12015-03-19 23:06:491259 "tools/quic/quic_simple_client.cc",
1260 "tools/quic/quic_simple_client.h",
rch216445c2015-03-27 00:23:281261 "tools/quic/quic_simple_per_connection_packet_writer.cc",
1262 "tools/quic/quic_simple_per_connection_packet_writer.h",
1263 "tools/quic/quic_simple_server.cc",
1264 "tools/quic/quic_simple_server.h",
1265 "tools/quic/quic_simple_server_packet_writer.cc",
1266 "tools/quic/quic_simple_server_packet_writer.h",
rched113b22015-03-26 04:54:051267 "tools/quic/quic_spdy_client_stream.cc",
1268 "tools/quic/quic_spdy_client_stream.h",
rch0e945472015-03-26 15:19:211269 "tools/quic/quic_spdy_server_stream.cc",
1270 "tools/quic/quic_spdy_server_stream.h",
1271 "tools/quic/quic_time_wait_list_manager.cc",
1272 "tools/quic/quic_time_wait_list_manager.h",
rchda78df5a2015-03-22 05:16:371273 "tools/quic/synchronous_host_resolver.cc",
1274 "tools/quic/synchronous_host_resolver.h",
rcha9d12ce12015-03-19 23:06:491275 ]
1276 deps = [
1277 ":net",
rtennetib6f1c0d2015-04-03 17:52:061278 ":net_quic_proto",
rcha9d12ce12015-03-19 23:06:491279 "//base",
rch47ad01f2015-03-20 21:17:231280 "//base/third_party/dynamic_annotations",
1281 "//url",
1282 ]
1283}
1284
rch216445c2015-03-27 00:23:281285executable("quic_client") {
rch47ad01f2015-03-20 21:17:231286 sources = [
1287 "tools/quic/quic_simple_client_bin.cc",
1288 ]
1289 deps = [
1290 ":net",
1291 ":simple_quic_tools",
1292 "//base",
rcha9d12ce12015-03-19 23:06:491293 "//url",
1294 ]
1295}
1296
rch216445c2015-03-27 00:23:281297executable("quic_server") {
1298 sources = [
1299 "tools/quic/quic_simple_server_bin.cc",
1300 ]
1301 deps = [
1302 ":net",
rtennetib6f1c0d2015-04-03 17:52:061303 ":net_quic_proto",
rch216445c2015-03-27 00:23:281304 ":simple_quic_tools",
1305 "//base",
1306 "//third_party/boringssl",
1307 ]
1308}
1309
[email protected]8a3f8242014-06-05 18:05:121310# TODO(GYP) make this compile on Android, we need some native test deps done.
[email protected]bd82a57d2014-07-31 16:52:341311# TODO(GYP) Also doesn't work on Windows; dependency on boringssl is wrong.
dprankecf8465db72014-11-10 23:51:221312# TODO(GYP) Also doesn't work on Mac, need to figure out why not.
1313if (!is_android && !is_win && !is_mac) {
scottmg34fb7e52014-12-03 23:27:241314 test("net_unittests") {
1315 sources = gypi_values.net_test_sources
erikchen006a7cf2014-12-03 22:27:111316
brettwd1c719a2015-02-19 23:17:041317 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1318 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
scottmg34fb7e52014-12-03 23:27:241319 defines = []
[email protected]8a3f8242014-06-05 18:05:121320
scottmg34fb7e52014-12-03 23:27:241321 deps = [
1322 ":extras",
1323 ":http_server",
1324 ":net",
rtennetib6f1c0d2015-04-03 17:52:061325 ":net_quic_proto",
rch216445c2015-03-27 00:23:281326 ":epoll_quic_tools",
rcha6d42cd2015-03-22 05:13:581327 ":simple_quic_tools",
scottmg34fb7e52014-12-03 23:27:241328 ":test_support",
1329 "//base",
1330 "//base:i18n",
1331 "//base:prefs_test_support",
1332 "//base/allocator",
1333 "//base/third_party/dynamic_annotations",
1334 "//crypto",
1335 "//crypto:platform",
1336 "//crypto:test_support",
brettwbc44c0a92015-02-20 22:30:391337 "//gin",
scottmg34fb7e52014-12-03 23:27:241338 "//net/base/registry_controlled_domains",
brettwbc44c0a92015-02-20 22:30:391339 "//sql",
scottmg34fb7e52014-12-03 23:27:241340 "//testing/gmock",
1341 "//testing/gtest",
1342 "//third_party/zlib",
1343 "//url",
[email protected]8a3f8242014-06-05 18:05:121344 ]
[email protected]8a3f8242014-06-05 18:05:121345
scottmg34fb7e52014-12-03 23:27:241346 if (is_linux) {
1347 sources += gypi_values.net_linux_test_sources
1348 deps += [
1349 ":balsa",
1350 ":epoll_server",
1351 ":flip_in_mem_edsm_server_base",
rch216445c2015-03-27 00:23:281352 ":epoll_quic_tools",
[email protected]b2f44d12014-06-10 17:48:031353 ]
1354 }
[email protected]8a3f8242014-06-05 18:05:121355
scottmg34fb7e52014-12-03 23:27:241356 if (is_mac || is_ios) {
1357 sources += gypi_values.net_base_test_mac_ios_sources
1358 }
1359
brettwc859f18f2014-09-18 23:34:501360 if (is_chromeos) {
scottmg34fb7e52014-12-03 23:27:241361 sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
1362 }
1363
1364 if (is_android) {
brettwc859f18f2014-09-18 23:34:501365 sources -= [
scottmg34fb7e52014-12-03 23:27:241366 # See bug http://crbug.com/344533.
1367 "disk_cache/blockfile/index_table_v3_unittest.cc",
1368
1369 # No res_ninit() et al on Android, so this doesn't make a lot of
1370 # sense.
1371 "dns/dns_config_service_posix_unittest.cc",
1372 ]
1373 deps += [
1374 ":net_javatests", # FIXME(brettw)
1375 ":net_test_jni_headers",
brettwc859f18f2014-09-18 23:34:501376 ]
1377 }
scottmg34fb7e52014-12-03 23:27:241378
rmcilroy5837d332014-12-17 14:30:581379 if (v8_use_external_startup_data) {
1380 deps += [ "//gin" ]
1381 }
1382
scottmg34fb7e52014-12-03 23:27:241383 if (!use_nss_certs) {
1384 sources -= [ "ssl/client_cert_store_nss_unittest.cc" ]
1385 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
1386 sources -= [ "ssl/client_cert_store_chromeos_unittest.cc" ]
1387 }
1388 }
1389
1390 if (use_openssl) {
1391 # When building for OpenSSL, we need to exclude NSS specific tests
1392 # or functionality not supported by OpenSSL yet.
1393 # TODO(bulach): Add equivalent tests when the underlying
1394 # functionality is ported to OpenSSL.
1395 sources -= [
1396 "cert/nss_cert_database_unittest.cc",
1397 "cert/x509_util_nss_unittest.cc",
1398 "quic/test_tools/crypto_test_utils_nss.cc",
1399 ]
1400 if (is_chromeos) {
1401 # These were already removed in the non-ChromeOS case.
1402 sources -= [
1403 "cert/nss_cert_database_chromeos_unittest.cc",
1404 "cert/nss_profile_filter_chromeos_unittest.cc",
1405 ]
1406 }
1407 } else {
1408 sources -= [
1409 "cert/x509_util_openssl_unittest.cc",
1410 "quic/test_tools/crypto_test_utils_openssl.cc",
1411 "socket/ssl_client_socket_openssl_unittest.cc",
davidbendafe4e52015-04-08 22:53:521412 "ssl/ssl_client_session_cache_openssl_unittest.cc",
scottmg34fb7e52014-12-03 23:27:241413 ]
1414 if (!is_desktop_linux && !is_chromeos) {
1415 sources -= [ "cert/nss_cert_database_unittest.cc" ]
1416 }
1417 }
1418
1419 if (use_kerberos) {
1420 defines += [ "USE_KERBEROS" ]
1421 } else {
1422 sources -= [
1423 "http/http_auth_gssapi_posix_unittest.cc",
1424 "http/http_auth_handler_negotiate_unittest.cc",
1425 "http/mock_gssapi_library_posix.cc",
1426 "http/mock_gssapi_library_posix.h",
1427 ]
1428 }
1429
1430 if (use_openssl || (!is_desktop_linux && !is_chromeos && !is_ios)) {
1431 # Only include this test when on Posix and using NSS for
1432 # cert verification or on iOS (which also uses NSS for certs).
eromaned744f32015-04-09 06:35:491433 sources -= [ "cert_net/nss_ocsp_unittest.cc" ]
scottmg34fb7e52014-12-03 23:27:241434 }
1435
1436 if (!use_openssl_certs) {
1437 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1438 }
1439
1440 if (!enable_websockets) {
1441 sources -= [
dgozmana6e70092014-12-12 14:46:211442 "server/http_connection_unittest.cc",
1443 "server/http_server_response_info_unittest.cc",
1444 "server/http_server_unittest.cc",
1445 "server/web_socket_encoder_unittest.cc",
scottmg34fb7e52014-12-03 23:27:241446 "websockets/websocket_basic_stream_test.cc",
1447 "websockets/websocket_channel_test.cc",
1448 "websockets/websocket_deflate_predictor_impl_test.cc",
1449 "websockets/websocket_deflate_stream_test.cc",
1450 "websockets/websocket_deflater_test.cc",
ricea433bdab2015-01-26 07:25:371451 "websockets/websocket_end_to_end_test.cc",
satorux933fc7a2015-02-13 07:09:101452 "websockets/websocket_errors_test.cc",
scottmg34fb7e52014-12-03 23:27:241453 "websockets/websocket_extension_parser_test.cc",
1454 "websockets/websocket_frame_parser_test.cc",
1455 "websockets/websocket_frame_test.cc",
1456 "websockets/websocket_handshake_challenge_test.cc",
1457 "websockets/websocket_handshake_stream_create_helper_test.cc",
1458 "websockets/websocket_inflater_test.cc",
1459 "websockets/websocket_stream_test.cc",
1460 "websockets/websocket_test_util.cc",
1461 "websockets/websocket_test_util.h",
1462 ]
dgozmana6e70092014-12-12 14:46:211463 deps -= [ ":http_server" ]
scottmg34fb7e52014-12-03 23:27:241464 }
1465
1466 if (disable_file_support) {
1467 sources -= [
1468 "base/directory_lister_unittest.cc",
1469 "url_request/url_request_file_job_unittest.cc",
1470 ]
1471 }
1472
1473 if (disable_ftp_support) {
1474 sources -= [
1475 "ftp/ftp_auth_cache_unittest.cc",
1476 "ftp/ftp_ctrl_response_buffer_unittest.cc",
1477 "ftp/ftp_directory_listing_parser_ls_unittest.cc",
1478 "ftp/ftp_directory_listing_parser_netware_unittest.cc",
1479 "ftp/ftp_directory_listing_parser_os2_unittest.cc",
1480 "ftp/ftp_directory_listing_parser_unittest.cc",
1481 "ftp/ftp_directory_listing_parser_unittest.h",
1482 "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1483 "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1484 "ftp/ftp_network_transaction_unittest.cc",
1485 "ftp/ftp_util_unittest.cc",
1486 "url_request/url_request_ftp_job_unittest.cc",
1487 ]
1488 }
1489
1490 if (!enable_built_in_dns) {
1491 sources -= [
1492 "dns/address_sorter_posix_unittest.cc",
1493 "dns/address_sorter_unittest.cc",
1494 ]
1495 }
1496
1497 # Always need use_v8_in_net to be 1 to run on Android, so just remove
1498 # net_unittest's dependency on v8 when using icu alternatives instead of
1499 # setting use_v8_in_net to 0.
1500 if (use_v8_in_net && !use_icu_alternatives_on_android) {
1501 deps += [ ":net_with_v8" ]
1502 } else {
1503 sources -= [
scottmg34fb7e52014-12-03 23:27:241504 "proxy/proxy_resolver_v8_tracing_unittest.cc",
satorux933fc7a2015-02-13 07:09:101505 "proxy/proxy_resolver_v8_unittest.cc",
scottmg34fb7e52014-12-03 23:27:241506 ]
1507 }
1508
amistry7e6ebfdc82015-02-13 04:19:111509 if (use_v8_in_net && !is_android) {
1510 deps += [
1511 ":net_browser_services",
sammc5403aa1d2015-02-25 04:59:211512 ":net_utility_services",
amistry7e6ebfdc82015-02-13 04:19:111513 "//mojo/environment:chromium",
1514 "//third_party/mojo/src/mojo/edk/system",
1515 ]
1516 } else {
sammc5403aa1d2015-02-25 04:59:211517 sources -= [
sammc6ac3fe52015-02-25 06:00:281518 "dns/host_resolver_mojo_unittest.cc",
sammc5403aa1d2015-02-25 04:59:211519 "dns/mojo_host_resolver_impl_unittest.cc",
sammcc804b532015-03-12 10:02:341520 "proxy/load_state_change_coalescer_unittest.cc",
sammc352f7492015-02-25 09:45:241521 "proxy/mojo_proxy_resolver_factory_impl_unittest.cc",
sammc5403aa1d2015-02-25 04:59:211522 "proxy/mojo_proxy_resolver_impl_unittest.cc",
amistry07ff1402015-03-10 07:34:071523 "proxy/proxy_resolver_mojo_unittest.cc",
amistry6e1ed1b2015-03-12 05:24:011524 "proxy/proxy_service_mojo_unittest.cc",
sammc5403aa1d2015-02-25 04:59:211525 ]
amistry7e6ebfdc82015-02-13 04:19:111526 }
1527
scottmg34fb7e52014-12-03 23:27:241528 if (!enable_mdns) {
1529 sources -= [
1530 "dns/mdns_cache_unittest.cc",
1531 "dns/mdns_client_unittest.cc",
1532 "dns/record_parsed_unittest.cc",
1533 "dns/record_rdata_unittest.cc",
1534 ]
1535 }
1536
1537 if (is_ios) {
1538 # TODO(GYP)
1539 # 'actions': [
1540 # {
1541 # 'action_name': 'copy_test_data',
1542 # 'variables': {
1543 # 'test_data_files': [
1544 # 'data/ssl/certificates/',
1545 # 'data/test.html',
1546 # 'data/url_request_unittest/',
1547 # ],
1548 # 'test_data_prefix': 'net',
1549 # },
1550 # 'includes': [ '../build/copy_test_data_ios.gypi' ],
1551 # },
1552 # ],
1553 sources -= [
1554 # TODO(droger): The following tests are disabled because the
1555 # implementation is missing or incomplete.
1556 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1557 "base/keygen_handler_unittest.cc",
1558 "disk_cache/backend_unittest.cc",
1559 "disk_cache/blockfile/block_files_unittest.cc",
1560
1561 # Need to read input data files.
1562 "filter/gzip_filter_unittest.cc",
1563 "socket/ssl_server_socket_unittest.cc",
1564 "spdy/fuzzing/hpack_fuzz_util_test.cc",
1565
1566 # Need TestServer.
eroman0fad62b2015-04-08 18:54:111567 "cert_net/cert_net_fetcher_impl_unittest.cc",
scottmg34fb7e52014-12-03 23:27:241568 "proxy/proxy_script_fetcher_impl_unittest.cc",
1569 "socket/ssl_client_socket_unittest.cc",
1570 "url_request/url_fetcher_impl_unittest.cc",
1571 "url_request/url_request_context_builder_unittest.cc",
1572
1573 # Needs GetAppOutput().
1574 "test/python_utils_unittest.cc",
1575
1576 # The following tests are disabled because they don't apply to
1577 # iOS.
1578 # OS is not "linux" or "freebsd" or "openbsd".
1579 "socket/unix_domain_client_socket_posix_unittest.cc",
1580 "socket/unix_domain_listen_socket_posix_unittest.cc",
1581 "socket/unix_domain_server_socket_posix_unittest.cc",
1582
1583 # See bug http://crbug.com/344533.
1584 "disk_cache/blockfile/index_table_v3_unittest.cc",
1585 ]
1586 }
1587
1588 if (is_android) {
1589 sources -= [ "dns/dns_config_service_posix_unittest.cc" ]
1590
1591 # TODO(GYP)
1592 # # TODO(mmenke): This depends on test_support_base, which depends on
1593 # # icu. Figure out a way to remove that dependency.
1594 # 'dependencies': [
1595 # '../testing/android/native_test.gyp:native_test_native_code',
1596 # ]
1597
1598 set_sources_assignment_filter([])
1599 sources += [ "base/address_tracker_linux_unittest.cc" ]
1600 set_sources_assignment_filter(sources_assignment_filter)
1601 }
1602
1603 if (use_icu_alternatives_on_android) {
1604 sources -= [
1605 "base/filename_util_unittest.cc",
1606 "base/net_util_icu_unittest.cc",
1607 ]
1608 deps -= [ "//base:i18n" ]
[email protected]8a3f8242014-06-05 18:05:121609 }
1610 }
dougke0f2b8f2015-03-16 22:40:331611} # !is_android && !is_win && !is_mac
[email protected]8a3f8242014-06-05 18:05:121612
rockot9c67e5f2015-03-12 20:01:211613executable("net_perftests") {
1614 testonly = true
1615 sources = [
1616 "cookies/cookie_monster_perftest.cc",
1617 "disk_cache/blockfile/disk_cache_perftest.cc",
1618 "proxy/proxy_resolver_perftest.cc",
1619 "udp/udp_socket_perftest.cc",
1620 ]
1621
1622 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1623 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
1624 deps = [
1625 "//base",
1626 "//base:i18n",
1627 "//base/test:test_support_perf",
1628 "//testing/gtest",
1629 "//url",
1630 ":net",
1631 ":test_support",
1632 ]
1633
1634 if (enable_websockets) {
1635 sources += [ "websockets/websocket_frame_perftest.cc" ]
1636 }
1637
1638 if (use_v8_in_net) {
1639 deps += [ ":net_with_v8" ]
1640 } else {
1641 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1642 }
1643
1644 if (is_win && icu_use_data_file) {
1645 # This is needed to trigger the dll copy step on windows.
1646 # TODO(mark): Specifying this here shouldn't be necessary.
1647 deps += [ "//third_party/icu:icudata" ]
1648 }
1649}