blob: 6a2f70762296a4e046b679a90d8e97f7efab3bcd [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")
[email protected]4625ade2014-04-15 19:26:4412
[email protected]26046b52014-07-16 00:11:0313# TODO(cjhopman): //build/config/android/rules.gni also imports grit_rule.gni.
14# Currently, that file can't be imported multiple times. Make this always
15# imported when http://crbug.com/393704 is fixed.
16if (!is_android) {
17 import("//tools/grit/grit_rule.gni")
18}
19
[email protected]4625ade2014-04-15 19:26:4420if (is_android) {
21 import("//build/config/android/config.gni")
[email protected]ef0eb442014-05-15 09:32:1822 import("//build/config/android/rules.gni")
[email protected]4625ade2014-04-15 19:26:4423} else if (is_mac) {
24 import("//build/config/mac/mac_sdk.gni")
25}
26
27# The list of net files is kept in net.gypi. Read it.
scottmg34fb7e52014-12-03 23:27:2428gypi_values = exec_script("//build/gypi_to_gn.py",
29 [ rebase_path("net.gypi") ],
30 "scope",
31 [ "net.gypi" ])
[email protected]4625ade2014-04-15 19:26:4432
33# Disable Kerberos on ChromeOS, Android and iOS, at least for now. It needs
34# configuration (krb5.conf and so on).
35use_kerberos = !is_chromeos && !is_android && !is_ios
36
37# The way the cache uses mmap() is inefficient on some Android devices. If
38# this flag is set, we hackily avoid using mmap() in the disk cache. We are
39# pretty confident that mmap-ing the index would not hurt any existing x86
40# android devices, but we cannot be so sure about the variety of ARM devices.
41# So enable it for x86 only for now.
dpranke43276212015-02-20 02:55:1942posix_avoid_mmap = is_android && current_cpu != "x86"
[email protected]4625ade2014-04-15 19:26:4443
44# WebSockets and socket stream code are used everywhere except iOS.
45enable_websockets = !is_ios
[email protected]8a3f8242014-06-05 18:05:1246use_v8_in_net = !is_ios
[email protected]4625ade2014-04-15 19:26:4447enable_built_in_dns = !is_ios
[email protected]8a3f8242014-06-05 18:05:1248disable_ftp_support = is_ios
[email protected]4625ade2014-04-15 19:26:4449
[email protected]384dab92014-06-04 20:26:0850declare_args() {
51 # Disables support for file URLs. File URL support requires use of icu.
52 disable_file_support = false
53}
[email protected]02494ec2014-05-07 15:05:2954
[email protected]4625ade2014-04-15 19:26:4455config("net_config") {
56 defines = []
57 if (posix_avoid_mmap) {
58 defines += [ "POSIX_AVOID_MMAP" ]
59 }
[email protected]02494ec2014-05-07 15:05:2960 if (disable_file_support) {
61 defines += [ "DISABLE_FILE_SUPPORT" ]
62 }
[email protected]4625ade2014-04-15 19:26:4463}
64
65component("net") {
66 sources =
scottmg34fb7e52014-12-03 23:27:2467 gypi_values.net_nacl_common_sources + gypi_values.net_non_nacl_sources
[email protected]4625ade2014-04-15 19:26:4468
69 cflags = []
[email protected]8603c5de2014-04-16 20:34:3170 defines = [
71 # TODO(GYP) Note that he GYP file supports linux_link_kerberos (defaults to
72 # 0) which implies that we run pkg_config on kerberos and link to that
73 # rather than setting this define which will dynamically open it. That
74 # doesn't seem to be set in the regular builds, so we're skipping this
75 # capability here.
76 "DLOPEN_KERBEROS",
scottmg34fb7e52014-12-03 23:27:2477 "NET_IMPLEMENTATION",
[email protected]8603c5de2014-04-16 20:34:3178 ]
dpranke43276212015-02-20 02:55:1979
brettwd1c719a2015-02-19 23:17:0480 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
81 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
Brett Wilsone53895272014-09-23 23:41:4682 public_configs = [ ":net_config" ]
[email protected]4625ade2014-04-15 19:26:4483 include_dirs = []
84
Brett Wilsone53895272014-09-23 23:41:4685 public_deps = [
86 "//crypto",
scottmg34fb7e52014-12-03 23:27:2487 "//crypto:platform",
brettwbc44c0a92015-02-20 22:30:3988 "//url",
Brett Wilsone53895272014-09-23 23:41:4689 ]
[email protected]4625ade2014-04-15 19:26:4490 deps = [
scottmg34fb7e52014-12-03 23:27:2491 ":net_resources",
[email protected]4625ade2014-04-15 19:26:4492 "//base",
[email protected]ad66db12014-07-10 12:43:4793 "//base:prefs",
[email protected]4625ade2014-04-15 19:26:4494 "//base/third_party/dynamic_annotations",
[email protected]8a3f8242014-06-05 18:05:1295 "//net/base/registry_controlled_domains",
[email protected]4625ade2014-04-15 19:26:4496 "//sdch",
[email protected]4625ade2014-04-15 19:26:4497 "//third_party/zlib",
98 "//url",
99 ]
100
101 if (use_kerberos) {
102 defines += [ "USE_KERBEROS" ]
103 if (is_android) {
104 include_dirs += [ "/usr/include/kerberosV" ]
105 }
106 } else {
107 sources -= [
108 "http/http_auth_gssapi_posix.cc",
109 "http/http_auth_gssapi_posix.h",
[email protected]4625ade2014-04-15 19:26:44110 "http/http_auth_handler_negotiate.cc",
satorux933fc7a2015-02-13 07:09:10111 "http/http_auth_handler_negotiate.h",
[email protected]4625ade2014-04-15 19:26:44112 ]
113 }
114
115 if (is_posix) {
116 if (posix_avoid_mmap) {
117 sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
118 } else {
119 sources -= [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
120 }
121 }
122
[email protected]02494ec2014-05-07 15:05:29123 if (disable_file_support) {
124 sources -= [
125 "base/directory_lister.cc",
126 "base/directory_lister.h",
satorux933fc7a2015-02-13 07:09:10127 "url_request/file_protocol_handler.cc",
128 "url_request/file_protocol_handler.h",
[email protected]02494ec2014-05-07 15:05:29129 "url_request/url_request_file_dir_job.cc",
130 "url_request/url_request_file_dir_job.h",
131 "url_request/url_request_file_job.cc",
132 "url_request/url_request_file_job.h",
[email protected]02494ec2014-05-07 15:05:29133 ]
134 }
135
[email protected]8a3f8242014-06-05 18:05:12136 if (disable_ftp_support) {
[email protected]4625ade2014-04-15 19:26:44137 sources -= [
138 "ftp/ftp_auth_cache.cc",
139 "ftp/ftp_auth_cache.h",
140 "ftp/ftp_ctrl_response_buffer.cc",
141 "ftp/ftp_ctrl_response_buffer.h",
142 "ftp/ftp_directory_listing_parser.cc",
143 "ftp/ftp_directory_listing_parser.h",
144 "ftp/ftp_directory_listing_parser_ls.cc",
145 "ftp/ftp_directory_listing_parser_ls.h",
146 "ftp/ftp_directory_listing_parser_netware.cc",
147 "ftp/ftp_directory_listing_parser_netware.h",
148 "ftp/ftp_directory_listing_parser_os2.cc",
149 "ftp/ftp_directory_listing_parser_os2.h",
150 "ftp/ftp_directory_listing_parser_vms.cc",
151 "ftp/ftp_directory_listing_parser_vms.h",
152 "ftp/ftp_directory_listing_parser_windows.cc",
153 "ftp/ftp_directory_listing_parser_windows.h",
154 "ftp/ftp_network_layer.cc",
155 "ftp/ftp_network_layer.h",
156 "ftp/ftp_network_session.cc",
157 "ftp/ftp_network_session.h",
158 "ftp/ftp_network_transaction.cc",
159 "ftp/ftp_network_transaction.h",
160 "ftp/ftp_request_info.h",
161 "ftp/ftp_response_info.cc",
162 "ftp/ftp_response_info.h",
163 "ftp/ftp_server_type_histograms.cc",
164 "ftp/ftp_server_type_histograms.h",
165 "ftp/ftp_transaction.h",
166 "ftp/ftp_transaction_factory.h",
167 "ftp/ftp_util.cc",
168 "ftp/ftp_util.h",
169 "url_request/ftp_protocol_handler.cc",
170 "url_request/ftp_protocol_handler.h",
171 "url_request/url_request_ftp_job.cc",
172 "url_request/url_request_ftp_job.h",
173 ]
174 }
175
176 if (enable_built_in_dns) {
177 defines += [ "ENABLE_BUILT_IN_DNS" ]
178 } else {
179 sources -= [
180 "dns/address_sorter_posix.cc",
181 "dns/address_sorter_posix.h",
182 "dns/dns_client.cc",
183 ]
184 }
185
186 if (use_openssl) {
187 sources -= [
[email protected]4625ade2014-04-15 19:26:44188 "base/nss_memio.c",
189 "base/nss_memio.h",
[email protected]4625ade2014-04-15 19:26:44190 "cert/ct_log_verifier_nss.cc",
191 "cert/ct_objects_extractor_nss.cc",
192 "cert/jwk_serializer_nss.cc",
[email protected]4625ade2014-04-15 19:26:44193 "cert/scoped_nss_types.h",
mukai77f8210a2014-10-07 16:35:14194 "cert/test_root_certs_nss.cc",
[email protected]4625ade2014-04-15 19:26:44195 "cert/x509_util_nss.cc",
196 "cert/x509_util_nss.h",
mukai77f8210a2014-10-07 16:35:14197 "ocsp/nss_ocsp.cc",
198 "ocsp/nss_ocsp.h",
[email protected]4625ade2014-04-15 19:26:44199 "quic/crypto/aead_base_decrypter_nss.cc",
200 "quic/crypto/aead_base_encrypter_nss.cc",
201 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc",
202 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc",
203 "quic/crypto/chacha20_poly1305_decrypter_nss.cc",
204 "quic/crypto/chacha20_poly1305_encrypter_nss.cc",
205 "quic/crypto/channel_id_nss.cc",
206 "quic/crypto/p256_key_exchange_nss.cc",
207 "socket/nss_ssl_util.cc",
208 "socket/nss_ssl_util.h",
209 "socket/ssl_client_socket_nss.cc",
210 "socket/ssl_client_socket_nss.h",
211 "socket/ssl_server_socket_nss.cc",
212 "socket/ssl_server_socket_nss.h",
[email protected]4625ade2014-04-15 19:26:44213 ]
[email protected]71d94dfce92014-04-30 16:47:24214 if (is_chromeos) {
215 sources -= [
216 "cert/nss_cert_database_chromeos.cc",
217 "cert/nss_cert_database_chromeos.h",
218 "cert/nss_profile_filter_chromeos.cc",
219 "cert/nss_profile_filter_chromeos.h",
220 ]
221 }
222 if (is_linux) {
223 # These are always removed for non-Linux cases below.
224 sources -= [
225 "base/crypto_module_nss.cc",
226 "base/keygen_handler_nss.cc",
227 "cert/cert_database_nss.cc",
228 "cert/nss_cert_database.cc",
229 "cert/nss_cert_database.h",
230 "cert/x509_certificate_nss.cc",
231 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
232 "third_party/mozilla_security_manager/nsKeygenHandler.h",
233 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
234 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
235 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
236 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
237 ]
238 }
239 if (is_ios) {
240 # Always removed for !ios below.
241 sources -= [
242 "cert/cert_verify_proc_nss.cc",
243 "cert/cert_verify_proc_nss.h",
[email protected]71d94dfce92014-04-30 16:47:24244 ]
245 }
davidbend5587412014-10-30 21:44:16246 if (is_win) {
scottmg34fb7e52014-12-03 23:27:24247 sources -= [ "cert/sha256_legacy_support_nss_win.cc" ]
davidbend5587412014-10-30 21:44:16248 }
[email protected]4625ade2014-04-15 19:26:44249 } else {
250 sources -= [
251 "base/crypto_module_openssl.cc",
[email protected]4625ade2014-04-15 19:26:44252 "cert/ct_log_verifier_openssl.cc",
253 "cert/ct_objects_extractor_openssl.cc",
254 "cert/jwk_serializer_openssl.cc",
255 "cert/x509_util_openssl.cc",
256 "cert/x509_util_openssl.h",
257 "quic/crypto/aead_base_decrypter_openssl.cc",
258 "quic/crypto/aead_base_encrypter_openssl.cc",
259 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc",
260 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc",
261 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc",
262 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc",
263 "quic/crypto/channel_id_openssl.cc",
264 "quic/crypto/p256_key_exchange_openssl.cc",
265 "quic/crypto/scoped_evp_aead_ctx.cc",
266 "quic/crypto/scoped_evp_aead_ctx.h",
267 "socket/ssl_client_socket_openssl.cc",
268 "socket/ssl_client_socket_openssl.h",
269 "socket/ssl_server_socket_openssl.cc",
[email protected]c8a80e92014-05-17 16:02:08270 "socket/ssl_server_socket_openssl.h",
[email protected]4625ade2014-04-15 19:26:44271 "socket/ssl_session_cache_openssl.cc",
272 "socket/ssl_session_cache_openssl.h",
[email protected]97a854f2014-07-29 07:51:36273 "ssl/openssl_platform_key.h",
274 "ssl/openssl_ssl_util.cc",
275 "ssl/openssl_ssl_util.h",
[email protected]4625ade2014-04-15 19:26:44276 ]
[email protected]97a854f2014-07-29 07:51:36277 if (is_mac) {
scottmg34fb7e52014-12-03 23:27:24278 sources -= [ "ssl/openssl_platform_key_mac.cc" ]
[email protected]97a854f2014-07-29 07:51:36279 }
280 if (is_win) {
281 sources -= [
John Abd-El-Malek494329e2014-11-05 19:06:30282 "cert/sha256_legacy_support_openssl_win.cc",
[email protected]97a854f2014-07-29 07:51:36283 "ssl/openssl_platform_key_win.cc",
284 ]
285 }
[email protected]4625ade2014-04-15 19:26:44286 }
287
288 if (!use_openssl_certs) {
289 sources -= [
isherman7e5de442014-09-25 23:00:18290 "base/keygen_handler_openssl.cc",
[email protected]4625ade2014-04-15 19:26:44291 "base/openssl_private_key_store.h",
292 "base/openssl_private_key_store_memory.cc",
293 "cert/cert_database_openssl.cc",
294 "cert/cert_verify_proc_openssl.cc",
295 "cert/cert_verify_proc_openssl.h",
296 "cert/test_root_certs_openssl.cc",
297 "cert/x509_certificate_openssl.cc",
298 "ssl/openssl_client_key_store.cc",
299 "ssl/openssl_client_key_store.h",
300 ]
301 if (is_android) {
scottmg34fb7e52014-12-03 23:27:24302 sources -= [ "base/openssl_private_key_store_android.cc" ]
[email protected]4625ade2014-04-15 19:26:44303 }
[email protected]1ea01752014-05-23 19:01:46304 } else if (is_android) {
305 # Android doesn't use these even when using OpenSSL.
306 sources -= [
307 "base/openssl_private_key_store_memory.cc",
308 "cert/cert_database_openssl.cc",
309 "cert/cert_verify_proc_openssl.cc",
310 "cert/test_root_certs_openssl.cc",
311 ]
[email protected]4625ade2014-04-15 19:26:44312 }
313
mukai77f8210a2014-10-07 16:35:14314 if (use_glib && !is_chromeos) {
[email protected]4625ade2014-04-15 19:26:44315 configs += [ "//build/config/linux:gconf" ]
316 deps += [ "//build/config/linux:gio" ]
317 }
318
319 if (is_linux) {
320 configs += [ "//build/config/linux:libresolv" ]
321 } else {
322 sources -= [
323 "base/crypto_module_nss.cc",
324 "base/keygen_handler_nss.cc",
325 "cert/cert_database_nss.cc",
326 "cert/nss_cert_database.cc",
327 "cert/nss_cert_database.h",
[email protected]4625ade2014-04-15 19:26:44328 "cert/x509_certificate_nss.cc",
[email protected]4625ade2014-04-15 19:26:44329 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
330 "third_party/mozilla_security_manager/nsKeygenHandler.h",
331 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
332 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
333 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
334 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
335 ]
[email protected]e8ab6912014-04-21 20:54:51336
mukai77f8210a2014-10-07 16:35:14337 if (!is_ios && !use_openssl) {
[email protected]e8ab6912014-04-21 20:54:51338 # These files are part of the partial implementation of NSS on iOS so
339 # keep them in that case.
340 sources -= [
341 "cert/test_root_certs_nss.cc",
342 "ocsp/nss_ocsp.cc",
343 "ocsp/nss_ocsp.h",
344 ]
345 }
[email protected]4625ade2014-04-15 19:26:44346 }
347
[email protected]e8ab6912014-04-21 20:54:51348 if (!use_nss_certs) {
[email protected]4625ade2014-04-15 19:26:44349 sources -= [
[email protected]4625ade2014-04-15 19:26:44350 "ssl/client_cert_store_nss.cc",
351 "ssl/client_cert_store_nss.h",
352 ]
[email protected]e8ab6912014-04-21 20:54:51353 if (!is_ios) {
354 # These files are part of the partial implementation of NSS on iOS so
355 # keep them in that case (even though use_nss_certs is not set).
356 sources -= [
357 "cert/cert_verify_proc_nss.cc",
358 "cert/cert_verify_proc_nss.h",
359 ]
360 }
[email protected]4625ade2014-04-15 19:26:44361 if (is_chromeos) {
362 # These were already removed on non-ChromeOS.
363 sources -= [
364 "ssl/client_cert_store_chromeos.cc",
365 "ssl/client_cert_store_chromeos.h",
366 ]
367 }
368 }
369
370 if (!enable_websockets) {
371 sources -= [
[email protected]4625ade2014-04-15 19:26:44372 "websockets/websocket_basic_handshake_stream.cc",
373 "websockets/websocket_basic_handshake_stream.h",
374 "websockets/websocket_basic_stream.cc",
375 "websockets/websocket_basic_stream.h",
376 "websockets/websocket_channel.cc",
377 "websockets/websocket_channel.h",
378 "websockets/websocket_deflate_predictor.h",
379 "websockets/websocket_deflate_predictor_impl.cc",
380 "websockets/websocket_deflate_predictor_impl.h",
381 "websockets/websocket_deflate_stream.cc",
382 "websockets/websocket_deflate_stream.h",
383 "websockets/websocket_deflater.cc",
384 "websockets/websocket_deflater.h",
385 "websockets/websocket_errors.cc",
386 "websockets/websocket_errors.h",
387 "websockets/websocket_extension.cc",
388 "websockets/websocket_extension.h",
389 "websockets/websocket_extension_parser.cc",
390 "websockets/websocket_extension_parser.h",
391 "websockets/websocket_frame.cc",
392 "websockets/websocket_frame.h",
393 "websockets/websocket_frame_parser.cc",
394 "websockets/websocket_frame_parser.h",
ricea11bdcd02014-11-20 09:57:07395 "websockets/websocket_handshake_challenge.cc",
396 "websockets/websocket_handshake_challenge.h",
satorux933fc7a2015-02-13 07:09:10397 "websockets/websocket_handshake_constants.cc",
398 "websockets/websocket_handshake_constants.h",
[email protected]4625ade2014-04-15 19:26:44399 "websockets/websocket_handshake_request_info.cc",
400 "websockets/websocket_handshake_request_info.h",
401 "websockets/websocket_handshake_response_info.cc",
402 "websockets/websocket_handshake_response_info.h",
403 "websockets/websocket_handshake_stream_base.h",
404 "websockets/websocket_handshake_stream_create_helper.cc",
405 "websockets/websocket_handshake_stream_create_helper.h",
406 "websockets/websocket_inflater.cc",
407 "websockets/websocket_inflater.h",
[email protected]4625ade2014-04-15 19:26:44408 "websockets/websocket_mux.h",
[email protected]4625ade2014-04-15 19:26:44409 "websockets/websocket_stream.cc",
410 "websockets/websocket_stream.h",
[email protected]4625ade2014-04-15 19:26:44411 ]
412 }
413
414 if (!enable_mdns) {
415 sources -= [
416 "dns/mdns_cache.cc",
417 "dns/mdns_cache.h",
418 "dns/mdns_client.cc",
419 "dns/mdns_client.h",
420 "dns/mdns_client_impl.cc",
421 "dns/mdns_client_impl.h",
422 "dns/record_parsed.cc",
423 "dns/record_parsed.h",
424 "dns/record_rdata.cc",
425 "dns/record_rdata.h",
426 ]
427 }
428
429 if (is_win) {
430 sources -= [
431 "http/http_auth_handler_ntlm_portable.cc",
[email protected]2ef2b0e2014-07-09 21:12:34432 "socket/socket_libevent.cc",
433 "socket/socket_libevent.h",
[email protected]4625ade2014-04-15 19:26:44434 "socket/tcp_socket_libevent.cc",
435 "socket/tcp_socket_libevent.h",
436 "udp/udp_socket_libevent.cc",
437 "udp/udp_socket_libevent.h",
438 ]
[email protected]4625ade2014-04-15 19:26:44439 } else { # !is_win
440 sources -= [
441 "base/winsock_init.cc",
442 "base/winsock_init.h",
443 "base/winsock_util.cc",
444 "base/winsock_util.h",
445 "proxy/proxy_resolver_winhttp.cc",
446 "proxy/proxy_resolver_winhttp.h",
447 ]
448 }
449
450 if (is_mac) {
[email protected]4625ade2014-04-15 19:26:44451 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19452 "Foundation.framework",
453 "Security.framework",
454 "SystemConfiguration.framework",
455 "resolv",
[email protected]4625ade2014-04-15 19:26:44456 ]
457 }
458
459 if (is_ios) {
[email protected]b2b2bf52014-05-28 20:26:57460 # Add back some sources that were otherwise filtered out. iOS additionally
461 # doesn't set USE_NSS but needs some of the files.
462 set_sources_assignment_filter([])
463 sources += [
guoweis7eb7ab52014-11-14 17:42:56464 "base/net_util_mac.cc",
465 "base/net_util_mac.h",
[email protected]b2b2bf52014-05-28 20:26:57466 "base/network_change_notifier_mac.cc",
467 "base/network_config_watcher_mac.cc",
468 "base/platform_mime_util_mac.mm",
469 "cert/cert_verify_proc_nss.cc",
470 "cert/cert_verify_proc_nss.h",
471 "cert/test_root_certs_nss.cc",
472 "cert/x509_util_nss.cc",
473 "cert/x509_util_nss.h",
[email protected]b2b2bf52014-05-28 20:26:57474 "ocsp/nss_ocsp.cc",
475 "ocsp/nss_ocsp.h",
satorux933fc7a2015-02-13 07:09:10476 "proxy/proxy_resolver_mac.cc",
477 "proxy/proxy_server_mac.cc",
[email protected]b2b2bf52014-05-28 20:26:57478 ]
479 set_sources_assignment_filter(sources_assignment_filter)
480
[email protected]4625ade2014-04-15 19:26:44481 sources -= [ "disk_cache/blockfile/file_posix.cc" ]
[email protected]4625ade2014-04-15 19:26:44482 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19483 "CFNetwork.framework",
484 "MobileCoreServices.framework",
485 "Security.framework",
486 "SystemConfiguration.framework",
487 "resolv",
[email protected]4625ade2014-04-15 19:26:44488 ]
489 }
490
erikchen006a7cf2014-12-03 22:27:11491 if (is_ios || is_mac) {
492 sources += gypi_values.net_base_mac_ios_sources
493 }
494
[email protected]4625ade2014-04-15 19:26:44495 if (is_android) {
[email protected]b2b2bf52014-05-28 20:26:57496 # Add some Linux sources that were excluded by the filter, but which
497 # are needed.
498 set_sources_assignment_filter([])
499 sources += [
[email protected]b2b2bf52014-05-28 20:26:57500 "base/address_tracker_linux.cc",
501 "base/address_tracker_linux.h",
guoweis7eb7ab52014-11-14 17:42:56502 "base/net_util_linux.cc",
scottmg34fb7e52014-12-03 23:27:24503 "base/net_util_linux.h",
satorux933fc7a2015-02-13 07:09:10504 "base/platform_mime_util_linux.cc",
[email protected]b2b2bf52014-05-28 20:26:57505 ]
506 set_sources_assignment_filter(sources_assignment_filter)
507
[email protected]4625ade2014-04-15 19:26:44508 if (!is_android_webview_build) {
[email protected]4625ade2014-04-15 19:26:44509 deps += [ ":net_jni_headers" ]
[email protected]4625ade2014-04-15 19:26:44510 }
511 }
[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
Brett Wilson83fd4242014-09-02 19:45:33541static_library("extras") {
mef327a8e42014-08-29 17:10:03542 sources = gypi_values.net_extras_sources
543 configs += [ "//build/config/compiler:wexit_time_destructors" ]
544 deps = [
545 ":net",
brettwbc44c0a92015-02-20 22:30:39546 "//base",
mef327a8e42014-08-29 17:10:03547 "//sql:sql",
548 ]
549}
550
[email protected]8a3f8242014-06-05 18:05:12551static_library("http_server") {
[email protected]4625ade2014-04-15 19:26:44552 sources = [
553 "server/http_connection.cc",
554 "server/http_connection.h",
555 "server/http_server.cc",
556 "server/http_server.h",
557 "server/http_server_request_info.cc",
558 "server/http_server_request_info.h",
559 "server/http_server_response_info.cc",
560 "server/http_server_response_info.h",
561 "server/web_socket.cc",
562 "server/web_socket.h",
dgozmana6e70092014-12-12 14:46:21563 "server/web_socket_encoder.cc",
564 "server/web_socket_encoder.h",
[email protected]4625ade2014-04-15 19:26:44565 ]
jambc6cc8e2014-11-14 17:56:29566 configs += [
brettwd1c719a2015-02-19 23:17:04567 "//build/config/compiler:no_size_t_to_int_warning",
jambc6cc8e2014-11-14 17:56:29568 "//build/config/compiler:wexit_time_destructors",
jambc6cc8e2014-11-14 17:56:29569 ]
[email protected]4625ade2014-04-15 19:26:44570 deps = [
571 ":net",
572 "//base",
573 ]
574}
575
[email protected]8603c5de2014-04-16 20:34:31576executable("dump_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24577 testonly = true
[email protected]8603c5de2014-04-16 20:34:31578 sources = [
579 "tools/dump_cache/cache_dumper.cc",
580 "tools/dump_cache/cache_dumper.h",
581 "tools/dump_cache/dump_cache.cc",
582 "tools/dump_cache/dump_files.cc",
583 "tools/dump_cache/dump_files.h",
584 "tools/dump_cache/simple_cache_dumper.cc",
585 "tools/dump_cache/simple_cache_dumper.h",
[email protected]8603c5de2014-04-16 20:34:31586 "tools/dump_cache/url_to_filename_encoder.cc",
587 "tools/dump_cache/url_to_filename_encoder.h",
[email protected]8603c5de2014-04-16 20:34:31588 "tools/dump_cache/url_utilities.cc",
satorux933fc7a2015-02-13 07:09:10589 "tools/dump_cache/url_utilities.h",
[email protected]8603c5de2014-04-16 20:34:31590 ]
[email protected]4625ade2014-04-15 19:26:44591
brettwd1c719a2015-02-19 23:17:04592 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
593 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31594
595 deps = [
596 "//base",
597 ":net",
[email protected]b2b2bf52014-05-28 20:26:57598 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31599 ]
600}
601
[email protected]b2b2bf52014-05-28 20:26:57602source_set("test_support") {
Brett Wilson8f80ad0b2014-09-08 19:50:24603 testonly = true
[email protected]8603c5de2014-04-16 20:34:31604 sources = [
mmenke9e4ea8fe2014-11-19 23:12:30605 "base/captured_net_log_entry.cc",
606 "base/captured_net_log_entry.h",
[email protected]8603c5de2014-04-16 20:34:31607 "base/capturing_net_log.cc",
608 "base/capturing_net_log.h",
mmenke9e4ea8fe2014-11-19 23:12:30609 "base/capturing_net_log_observer.cc",
610 "base/capturing_net_log_observer.h",
[email protected]8603c5de2014-04-16 20:34:31611 "base/load_timing_info_test_util.cc",
612 "base/load_timing_info_test_util.h",
613 "base/mock_file_stream.cc",
614 "base/mock_file_stream.h",
615 "base/test_completion_callback.cc",
616 "base/test_completion_callback.h",
617 "base/test_data_directory.cc",
618 "base/test_data_directory.h",
619 "cert/mock_cert_verifier.cc",
620 "cert/mock_cert_verifier.h",
621 "cookies/cookie_monster_store_test.cc",
622 "cookies/cookie_monster_store_test.h",
623 "cookies/cookie_store_test_callbacks.cc",
624 "cookies/cookie_store_test_callbacks.h",
625 "cookies/cookie_store_test_helpers.cc",
626 "cookies/cookie_store_test_helpers.h",
627 "disk_cache/disk_cache_test_base.cc",
628 "disk_cache/disk_cache_test_base.h",
629 "disk_cache/disk_cache_test_util.cc",
630 "disk_cache/disk_cache_test_util.h",
631 "dns/dns_test_util.cc",
632 "dns/dns_test_util.h",
633 "dns/mock_host_resolver.cc",
634 "dns/mock_host_resolver.h",
635 "dns/mock_mdns_socket_factory.cc",
636 "dns/mock_mdns_socket_factory.h",
[email protected]8a3f8242014-06-05 18:05:12637 "http/http_transaction_test_util.cc",
638 "http/http_transaction_test_util.h",
[email protected]8603c5de2014-04-16 20:34:31639 "proxy/mock_proxy_resolver.cc",
640 "proxy/mock_proxy_resolver.h",
641 "proxy/mock_proxy_script_fetcher.cc",
642 "proxy/mock_proxy_script_fetcher.h",
643 "proxy/proxy_config_service_common_unittest.cc",
644 "proxy/proxy_config_service_common_unittest.h",
645 "socket/socket_test_util.cc",
646 "socket/socket_test_util.h",
647 "test/cert_test_util.cc",
648 "test/cert_test_util.h",
[email protected]83e1ae32014-07-18 10:57:07649 "test/cert_test_util_nss.cc",
[email protected]8603c5de2014-04-16 20:34:31650 "test/ct_test_util.cc",
651 "test/ct_test_util.h",
652 "test/embedded_test_server/embedded_test_server.cc",
653 "test/embedded_test_server/embedded_test_server.h",
654 "test/embedded_test_server/http_connection.cc",
655 "test/embedded_test_server/http_connection.h",
656 "test/embedded_test_server/http_request.cc",
657 "test/embedded_test_server/http_request.h",
658 "test/embedded_test_server/http_response.cc",
659 "test/embedded_test_server/http_response.h",
sammc6ac3fe52015-02-25 06:00:28660 "test/event_waiter.h",
[email protected]8603c5de2014-04-16 20:34:31661 "test/net_test_suite.cc",
662 "test/net_test_suite.h",
663 "test/python_utils.cc",
664 "test/python_utils.h",
665 "test/spawned_test_server/base_test_server.cc",
666 "test/spawned_test_server/base_test_server.h",
[email protected]8603c5de2014-04-16 20:34:31667 "test/spawned_test_server/local_test_server.cc",
668 "test/spawned_test_server/local_test_server.h",
satorux933fc7a2015-02-13 07:09:10669 "test/spawned_test_server/local_test_server_posix.cc",
670 "test/spawned_test_server/local_test_server_win.cc",
[email protected]8603c5de2014-04-16 20:34:31671 "test/spawned_test_server/remote_test_server.cc",
672 "test/spawned_test_server/remote_test_server.h",
673 "test/spawned_test_server/spawned_test_server.h",
674 "test/spawned_test_server/spawner_communicator.cc",
675 "test/spawned_test_server/spawner_communicator.h",
Brett Wilson32ce17a2014-11-10 17:45:30676 "test/url_request/url_request_failed_job.cc",
677 "test/url_request/url_request_failed_job.h",
mef3e826cf2014-12-13 18:40:40678 "test/url_request/url_request_mock_data_job.cc",
679 "test/url_request/url_request_mock_data_job.h",
Brett Wilson32ce17a2014-11-10 17:45:30680 "test/url_request/url_request_mock_http_job.cc",
681 "test/url_request/url_request_mock_http_job.h",
jam8e45cd72015-01-20 16:33:44682 "test/url_request/url_request_slow_download_job.cc",
683 "test/url_request/url_request_slow_download_job.h",
[email protected]8603c5de2014-04-16 20:34:31684 "url_request/test_url_fetcher_factory.cc",
685 "url_request/test_url_fetcher_factory.h",
tommyclieaae5d92014-09-09 06:03:47686 "url_request/test_url_request_interceptor.cc",
687 "url_request/test_url_request_interceptor.h",
[email protected]8603c5de2014-04-16 20:34:31688 "url_request/url_request_test_util.cc",
689 "url_request/url_request_test_util.h",
690 ]
691
brettwd1c719a2015-02-19 23:17:04692 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
693 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31694
Brett Wilsone53895272014-09-23 23:41:46695 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31696 "//base",
697 "//base/test:test_support",
[email protected]22fe91d2014-08-12 17:07:12698 "//crypto",
[email protected]59ff2d42014-04-22 22:25:23699 "//net",
[email protected]8603c5de2014-04-16 20:34:31700 "//net/tools/tld_cleanup",
701 "//testing/gmock",
702 "//testing/gtest",
703 "//url",
704 ]
705
jamb533b7e2015-03-04 17:12:05706 if (!is_ios) {
707 public_deps += [ "//third_party/protobuf:py_proto" ]
708 }
709
davidben15d69d482014-09-29 18:24:08710 if (!use_openssl && (use_nss_certs || is_ios)) {
scottmg34fb7e52014-12-03 23:27:24711 public_deps += [ "//crypto:platform" ]
[email protected]8603c5de2014-04-16 20:34:31712 }
713
714 if (!is_android) {
715 sources -= [
716 "test/spawned_test_server/remote_test_server.cc",
717 "test/spawned_test_server/remote_test_server.h",
718 "test/spawned_test_server/spawner_communicator.cc",
719 "test/spawned_test_server/spawner_communicator.h",
720 ]
721 }
722
723 if (use_v8_in_net) {
Brett Wilsone53895272014-09-23 23:41:46724 public_deps += [ ":net_with_v8" ]
[email protected]8603c5de2014-04-16 20:34:31725 }
726
727 if (!enable_mdns) {
728 sources -= [
729 "dns/mock_mdns_socket_factory.cc",
730 "dns/mock_mdns_socket_factory.h",
731 ]
732 }
733
davidben15d69d482014-09-29 18:24:08734 if (!use_nss_certs) {
scottmg34fb7e52014-12-03 23:27:24735 sources -= [ "test/cert_test_util_nss.cc" ]
[email protected]83e1ae32014-07-18 10:57:07736 }
[email protected]8603c5de2014-04-16 20:34:31737}
738
[email protected]ceeaac792014-06-25 05:14:43739source_set("balsa") {
740 sources = [
741 "tools/balsa/balsa_enums.h",
742 "tools/balsa/balsa_frame.cc",
743 "tools/balsa/balsa_frame.h",
744 "tools/balsa/balsa_headers.cc",
745 "tools/balsa/balsa_headers.h",
746 "tools/balsa/balsa_headers_token_utils.cc",
747 "tools/balsa/balsa_headers_token_utils.h",
748 "tools/balsa/balsa_visitor_interface.h",
749 "tools/balsa/http_message_constants.cc",
750 "tools/balsa/http_message_constants.h",
751 "tools/balsa/noop_balsa_visitor.h",
752 "tools/balsa/simple_buffer.cc",
753 "tools/balsa/simple_buffer.h",
754 "tools/balsa/split.cc",
755 "tools/balsa/split.h",
756 "tools/balsa/string_piece_utils.h",
757 "tools/quic/spdy_utils.cc",
758 "tools/quic/spdy_utils.h",
759 ]
760 deps = [
761 ":net",
762 "//base",
[email protected]22fe91d2014-08-12 17:07:12763 "//url",
[email protected]ceeaac792014-06-25 05:14:43764 ]
765}
766
[email protected]8603c5de2014-04-16 20:34:31767if (use_v8_in_net) {
768 component("net_with_v8") {
769 sources = [
770 "proxy/proxy_resolver_v8.cc",
771 "proxy/proxy_resolver_v8.h",
772 "proxy/proxy_resolver_v8_tracing.cc",
773 "proxy/proxy_resolver_v8_tracing.h",
774 "proxy/proxy_service_v8.cc",
775 "proxy/proxy_service_v8.h",
776 ]
777
778 defines = [ "NET_IMPLEMENTATION" ]
779 configs += [
brettwd1c719a2015-02-19 23:17:04780 "//build/config/compiler:no_size_t_to_int_warning",
[email protected]8603c5de2014-04-16 20:34:31781 "//build/config/compiler:wexit_time_destructors",
782 ]
783
Brett Wilsone53895272014-09-23 23:41:46784 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31785 ":net",
Brett Wilsone53895272014-09-23 23:41:46786 ]
787 deps = [
[email protected]8603c5de2014-04-16 20:34:31788 "//base",
789 "//gin",
790 "//url",
791 "//v8",
792 ]
793 }
794}
795
amistry7e6ebfdc82015-02-13 04:19:11796if (use_v8_in_net && !is_android) {
797 source_set("net_browser_services") {
798 sources = [
799 "dns/mojo_host_resolver_impl.cc",
800 "dns/mojo_host_resolver_impl.h",
amistry6e1ed1b2015-03-12 05:24:01801 "proxy/in_process_mojo_proxy_resolver_factory.cc",
802 "proxy/in_process_mojo_proxy_resolver_factory.h",
amistry07ff1402015-03-10 07:34:07803 "proxy/mojo_proxy_resolver_factory.h",
804 "proxy/proxy_resolver_mojo.cc",
805 "proxy/proxy_resolver_mojo.h",
amistry6e1ed1b2015-03-12 05:24:01806 "proxy/proxy_service_mojo.cc",
807 "proxy/proxy_service_mojo.h",
amistry7e6ebfdc82015-02-13 04:19:11808 ]
809
810 public_deps = [
811 ":mojo_type_converters",
812 ":net",
brettwbc44c0a92015-02-20 22:30:39813 "//base",
amistry07ff1402015-03-10 07:34:07814 "//mojo/common",
amistry7e6ebfdc82015-02-13 04:19:11815 "//net/interfaces",
816 "//third_party/mojo/src/mojo/public/cpp/bindings",
amistry6e1ed1b2015-03-12 05:24:01817
818 # NOTE(amistry): As long as we support in-process Mojo v8 PAC, we need
819 # this dependency since in_process_mojo_proxy_resolver_factory creates
820 # the utility process side Mojo services in the browser process.
821 # Ultimately, this will go away when we only support out-of-process.
822 ":net_utility_services",
amistry7e6ebfdc82015-02-13 04:19:11823 ]
824 }
825
826 source_set("mojo_type_converters") {
827 sources = [
amistry7ec58112015-02-26 06:03:00828 "dns/mojo_host_type_converters.cc",
829 "dns/mojo_host_type_converters.h",
830 "proxy/mojo_proxy_type_converters.cc",
831 "proxy/mojo_proxy_type_converters.h",
amistry7e6ebfdc82015-02-13 04:19:11832 ]
833
834 public_deps = [
835 ":net",
836 "//net/interfaces",
837 "//third_party/mojo/src/mojo/public/cpp/bindings",
838 ]
839 }
sammc5403aa1d2015-02-25 04:59:21840
841 source_set("net_utility_services") {
842 sources = [
sammc6ac3fe52015-02-25 06:00:28843 "dns/host_resolver_mojo.cc",
844 "dns/host_resolver_mojo.h",
sammcc804b532015-03-12 10:02:34845 "proxy/load_state_change_coalescer.cc",
846 "proxy/load_state_change_coalescer.h",
sammc352f7492015-02-25 09:45:24847 "proxy/mojo_proxy_resolver_factory_impl.cc",
848 "proxy/mojo_proxy_resolver_factory_impl.h",
sammc5403aa1d2015-02-25 04:59:21849 "proxy/mojo_proxy_resolver_impl.cc",
850 "proxy/mojo_proxy_resolver_impl.h",
851 ]
852
853 public_deps = [
854 ":mojo_type_converters",
855 ":net",
856 "//mojo/common",
857 "//net/interfaces",
858 "//third_party/mojo/src/mojo/public/cpp/bindings",
859 ]
860 }
amistry7e6ebfdc82015-02-13 04:19:11861}
862
[email protected]8603c5de2014-04-16 20:34:31863if (!is_ios && !is_android) {
864 executable("crash_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24865 testonly = true
scottmg34fb7e52014-12-03 23:27:24866 sources = [
867 "tools/crash_cache/crash_cache.cc",
868 ]
dpranke43276212015-02-20 02:55:19869
brettwd1c719a2015-02-19 23:17:04870 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
871 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31872 deps = [
873 ":net",
[email protected]b2b2bf52014-05-28 20:26:57874 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31875 "//base",
876 ]
877 }
878
879 executable("crl_set_dump") {
Brett Wilson8f80ad0b2014-09-08 19:50:24880 testonly = true
scottmg34fb7e52014-12-03 23:27:24881 sources = [
882 "tools/crl_set_dump/crl_set_dump.cc",
883 ]
dpranke43276212015-02-20 02:55:19884
brettwd1c719a2015-02-19 23:17:04885 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
886 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31887 deps = [
888 ":net",
889 "//base",
890 ]
891 }
892
893 executable("dns_fuzz_stub") {
Brett Wilson8f80ad0b2014-09-08 19:50:24894 testonly = true
scottmg34fb7e52014-12-03 23:27:24895 sources = [
896 "tools/dns_fuzz_stub/dns_fuzz_stub.cc",
897 ]
dpranke43276212015-02-20 02:55:19898
brettwd1c719a2015-02-19 23:17:04899 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
900 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31901 deps = [
902 ":net",
903 "//base",
904 ]
905 }
906
907 executable("gdig") {
Brett Wilson8f80ad0b2014-09-08 19:50:24908 testonly = true
[email protected]8603c5de2014-04-16 20:34:31909 sources = [
910 "tools/gdig/file_net_log.cc",
911 "tools/gdig/gdig.cc",
912 ]
913 deps = [
914 ":net",
915 "//base",
916 ]
917 }
918
919 executable("get_server_time") {
Brett Wilson8f80ad0b2014-09-08 19:50:24920 testonly = true
scottmg34fb7e52014-12-03 23:27:24921 sources = [
922 "tools/get_server_time/get_server_time.cc",
923 ]
dpranke43276212015-02-20 02:55:19924
brettwd1c719a2015-02-19 23:17:04925 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
926 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31927 deps = [
928 ":net",
929 "//base",
930 "//base:i18n",
931 "//url",
932 ]
933 }
934
rockot9c67e5f2015-03-12 20:01:21935 executable("hpack_example_generator") {
936 testonly = true
937 sources = [
938 "spdy/fuzzing/hpack_example_generator.cc",
939 ]
940
941 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
942 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
943 deps = [
944 "//base",
945 ":net",
946 ]
947 }
948
949 executable("hpack_fuzz_mutator") {
950 testonly = true
951 sources = [
952 "spdy/fuzzing/hpack_fuzz_mutator.cc",
953 ]
954
955 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
956 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
957 deps = [
958 "//base",
959 ":net",
960 ]
961 }
962
963 executable("hpack_fuzz_wrapper") {
964 testonly = true
965 sources = [
966 "spdy/fuzzing/hpack_fuzz_wrapper.cc",
967 ]
968
969 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
970 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
971 deps = [
972 "//base",
973 ":net",
974 ]
975 }
976
[email protected]8603c5de2014-04-16 20:34:31977 if (use_v8_in_net) {
978 executable("net_watcher") {
Brett Wilson8f80ad0b2014-09-08 19:50:24979 testonly = true
scottmg34fb7e52014-12-03 23:27:24980 sources = [
981 "tools/net_watcher/net_watcher.cc",
982 ]
[email protected]8603c5de2014-04-16 20:34:31983 deps = [
984 ":net",
985 ":net_with_v8",
986 "//base",
987 ]
988
mukai77f8210a2014-10-07 16:35:14989 if (is_desktop_linux) {
[email protected]22fe91d2014-08-12 17:07:12990 configs += [
991 "//build/config/linux:gconf",
992 "//build/config/linux:glib",
993 ]
[email protected]8603c5de2014-04-16 20:34:31994 deps += [ "//build/config/linux:gio" ]
995 }
996 }
997 }
998
999 executable("run_testserver") {
Brett Wilson8f80ad0b2014-09-08 19:50:241000 testonly = true
scottmg34fb7e52014-12-03 23:27:241001 sources = [
1002 "tools/testserver/run_testserver.cc",
1003 ]
[email protected]8603c5de2014-04-16 20:34:311004 deps = [
1005 ":net", # TODO(brettw) bug 363749: this shouldn't be necessary. It's not
1006 # in the GYP build, and can be removed when the bug is fixed.
rockot9c67e5f2015-03-12 20:01:211007
[email protected]b2b2bf52014-05-28 20:26:571008 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311009 "//base",
1010 "//base/test:test_support",
1011 "//testing/gtest",
1012 ]
1013 }
1014
1015 executable("stress_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:241016 testonly = true
scottmg34fb7e52014-12-03 23:27:241017 sources = [
rvargase23fcf652015-03-04 19:59:221018 "tools/stress_cache/stress_cache.cc",
scottmg34fb7e52014-12-03 23:27:241019 ]
dpranke43276212015-02-20 02:55:191020
brettwd1c719a2015-02-19 23:17:041021 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1022 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311023 deps = [
1024 ":net",
[email protected]b2b2bf52014-05-28 20:26:571025 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311026 "//base",
1027 ]
1028 }
1029
1030 executable("tld_cleanup") {
scottmg34fb7e52014-12-03 23:27:241031 sources = [
1032 "tools/tld_cleanup/tld_cleanup.cc",
1033 ]
dpranke43276212015-02-20 02:55:191034
brettwd1c719a2015-02-19 23:17:041035 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1036 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311037 deps = [
1038 "//base",
1039 "//base:i18n",
1040 "//net/tools/tld_cleanup",
1041 ]
1042 }
1043}
1044
dougke0f2b8f2015-03-16 22:40:331045if (is_linux || is_mac) {
[email protected]8a3f8242014-06-05 18:05:121046 static_library("epoll_server") {
[email protected]8603c5de2014-04-16 20:34:311047 sources = [
1048 "tools/epoll_server/epoll_server.cc",
1049 "tools/epoll_server/epoll_server.h",
1050 ]
dougke0f2b8f2015-03-16 22:40:331051 if (is_mac) {
1052 sources += [ "tools/epoll_server/darwin_epoll_server.cc" ]
1053 } else {
1054 sources += [ "tools/epoll_server/linux_epoll_server.cc" ]
1055 }
[email protected]8603c5de2014-04-16 20:34:311056 deps = [
1057 ":net",
1058 "//base",
1059 ]
1060 }
dougke0f2b8f2015-03-16 22:40:331061}
[email protected]8603c5de2014-04-16 20:34:311062
dougke0f2b8f2015-03-16 22:40:331063if (is_linux) {
[email protected]8a3f8242014-06-05 18:05:121064 static_library("flip_in_mem_edsm_server_base") {
Brett Wilson8f80ad0b2014-09-08 19:50:241065 testonly = true
[email protected]8603c5de2014-04-16 20:34:311066 sources = [
1067 "tools/dump_cache/url_to_filename_encoder.cc",
1068 "tools/dump_cache/url_to_filename_encoder.h",
[email protected]8603c5de2014-04-16 20:34:311069 "tools/dump_cache/url_utilities.cc",
satorux933fc7a2015-02-13 07:09:101070 "tools/dump_cache/url_utilities.h",
[email protected]8603c5de2014-04-16 20:34:311071 "tools/flip_server/acceptor_thread.cc",
satorux933fc7a2015-02-13 07:09:101072 "tools/flip_server/acceptor_thread.h",
1073 "tools/flip_server/constants.h",
[email protected]8603c5de2014-04-16 20:34:311074 "tools/flip_server/create_listener.cc",
1075 "tools/flip_server/create_listener.h",
[email protected]8603c5de2014-04-16 20:34:311076 "tools/flip_server/flip_config.cc",
1077 "tools/flip_server/flip_config.h",
1078 "tools/flip_server/http_interface.cc",
1079 "tools/flip_server/http_interface.h",
1080 "tools/flip_server/loadtime_measurement.h",
[email protected]8603c5de2014-04-16 20:34:311081 "tools/flip_server/mem_cache.cc",
satorux933fc7a2015-02-13 07:09:101082 "tools/flip_server/mem_cache.h",
[email protected]8603c5de2014-04-16 20:34:311083 "tools/flip_server/output_ordering.cc",
1084 "tools/flip_server/output_ordering.h",
1085 "tools/flip_server/ring_buffer.cc",
1086 "tools/flip_server/ring_buffer.h",
1087 "tools/flip_server/sm_connection.cc",
1088 "tools/flip_server/sm_connection.h",
1089 "tools/flip_server/sm_interface.h",
[email protected]8603c5de2014-04-16 20:34:311090 "tools/flip_server/spdy_interface.cc",
1091 "tools/flip_server/spdy_interface.h",
satorux933fc7a2015-02-13 07:09:101092 "tools/flip_server/spdy_ssl.cc",
1093 "tools/flip_server/spdy_ssl.h",
[email protected]8603c5de2014-04-16 20:34:311094 "tools/flip_server/spdy_util.cc",
1095 "tools/flip_server/spdy_util.h",
1096 "tools/flip_server/streamer_interface.cc",
1097 "tools/flip_server/streamer_interface.h",
1098 ]
1099 deps = [
1100 ":balsa",
1101 ":epoll_server",
1102 ":net",
1103 "//base",
[email protected]edfd0f42014-07-22 18:20:371104 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311105 ]
1106 }
1107
1108 executable("flip_in_mem_edsm_server_unittests") {
Brett Wilson8f80ad0b2014-09-08 19:50:241109 testonly = true
[email protected]8603c5de2014-04-16 20:34:311110 sources = [
1111 "tools/flip_server/flip_test_utils.cc",
1112 "tools/flip_server/flip_test_utils.h",
1113 "tools/flip_server/http_interface_test.cc",
1114 "tools/flip_server/mem_cache_test.cc",
1115 "tools/flip_server/run_all_tests.cc",
1116 "tools/flip_server/spdy_interface_test.cc",
1117 ]
1118 deps = [
brettwbc44c0a92015-02-20 22:30:391119 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311120 ":flip_in_mem_edsm_server_base",
1121 ":net",
[email protected]b2b2bf52014-05-28 20:26:571122 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311123 "//testing/gtest",
1124 "//testing/gmock",
[email protected]edfd0f42014-07-22 18:20:371125 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311126 ]
1127 }
1128
1129 executable("flip_in_mem_edsm_server") {
Brett Wilson8f80ad0b2014-09-08 19:50:241130 testonly = true
scottmg34fb7e52014-12-03 23:27:241131 sources = [
1132 "tools/flip_server/flip_in_mem_edsm_server.cc",
1133 ]
[email protected]8603c5de2014-04-16 20:34:311134 deps = [
brettwbc44c0a92015-02-20 22:30:391135 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311136 ":flip_in_mem_edsm_server_base",
1137 ":net",
1138 "//base",
1139 ]
1140 }
1141
1142 source_set("quic_base") {
1143 sources = [
1144 "tools/quic/quic_client.cc",
1145 "tools/quic/quic_client.h",
1146 "tools/quic/quic_client_session.cc",
1147 "tools/quic/quic_client_session.h",
1148 "tools/quic/quic_default_packet_writer.cc",
1149 "tools/quic/quic_default_packet_writer.h",
[email protected]8603c5de2014-04-16 20:34:311150 "tools/quic/quic_dispatcher.cc",
satorux933fc7a2015-02-13 07:09:101151 "tools/quic/quic_dispatcher.h",
[email protected]8603c5de2014-04-16 20:34:311152 "tools/quic/quic_epoll_clock.cc",
1153 "tools/quic/quic_epoll_clock.h",
1154 "tools/quic/quic_epoll_connection_helper.cc",
1155 "tools/quic/quic_epoll_connection_helper.h",
1156 "tools/quic/quic_in_memory_cache.cc",
1157 "tools/quic/quic_in_memory_cache.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",
[email protected]6d515822014-08-22 01:58:061162 "tools/quic/quic_per_connection_packet_writer.cc",
1163 "tools/quic/quic_per_connection_packet_writer.h",
[email protected]8603c5de2014-04-16 20:34:311164 "tools/quic/quic_server.cc",
1165 "tools/quic/quic_server.h",
1166 "tools/quic/quic_server_session.cc",
1167 "tools/quic/quic_server_session.h",
1168 "tools/quic/quic_socket_utils.cc",
1169 "tools/quic/quic_socket_utils.h",
1170 "tools/quic/quic_spdy_client_stream.cc",
1171 "tools/quic/quic_spdy_client_stream.h",
1172 "tools/quic/quic_spdy_server_stream.cc",
1173 "tools/quic/quic_spdy_server_stream.h",
[email protected]8603c5de2014-04-16 20:34:311174 "tools/quic/quic_time_wait_list_manager.cc",
satorux933fc7a2015-02-13 07:09:101175 "tools/quic/quic_time_wait_list_manager.h",
[email protected]8603c5de2014-04-16 20:34:311176 ]
1177 deps = [
1178 ":balsa",
1179 ":epoll_server",
1180 ":net",
1181 "//base",
1182 "//base/third_party/dynamic_annotations",
1183 "//crypto",
[email protected]edfd0f42014-07-22 18:20:371184 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311185 "//url",
1186 ]
1187 }
1188
1189 executable("quic_client") {
scottmg34fb7e52014-12-03 23:27:241190 sources = [
1191 "tools/quic/quic_client_bin.cc",
1192 ]
[email protected]8603c5de2014-04-16 20:34:311193 deps = [
brettwbc44c0a92015-02-20 22:30:391194 ":balsa",
1195 ":epoll_server",
[email protected]8603c5de2014-04-16 20:34:311196 ":quic_base",
1197 ":net",
1198 "//base",
[email protected]edfd0f42014-07-22 18:20:371199 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311200 ]
1201 }
[email protected]8603c5de2014-04-16 20:34:311202}
1203
[email protected]ef0eb442014-05-15 09:32:181204if (is_android) {
1205 generate_jni("net_jni_headers") {
1206 sources = [
1207 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1208 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1209 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
1210 "android/java/src/org/chromium/net/AndroidPrivateKey.java",
1211 "android/java/src/org/chromium/net/GURLUtils.java",
1212 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1213 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1214 "android/java/src/org/chromium/net/X509Util.java",
1215 ]
1216 jni_package = "net"
1217 }
cjhopmandad5f4272014-09-05 01:00:551218 generate_jni("net_test_jni_headers") {
1219 sources = [
1220 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
1221 ]
1222 jni_package = "net"
1223 }
[email protected]ef0eb442014-05-15 09:32:181224}
[email protected]8603c5de2014-04-16 20:34:311225
1226if (is_android || is_linux) {
1227 executable("disk_cache_memory_test") {
Brett Wilson8f80ad0b2014-09-08 19:50:241228 testonly = true
scottmg34fb7e52014-12-03 23:27:241229 sources = [
1230 "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1231 ]
[email protected]8603c5de2014-04-16 20:34:311232 deps = [
1233 ":net",
1234 "//base",
1235 ]
1236 }
1237}
[email protected]8a3f8242014-06-05 18:05:121238
dougke0f2b8f2015-03-16 22:40:331239# This source_set is defined even if no build targets need it,
1240# such as when all dependees are not buildable for the chosen OS.
1241source_set("quic_tools") {
1242 sources = [
1243 "quic/quic_dispatcher.cc",
1244 "quic/quic_dispatcher.h",
1245 "quic/quic_in_memory_cache.cc",
1246 "quic/quic_in_memory_cache.h",
1247 "quic/quic_per_connection_packet_writer.cc",
1248 "quic/quic_per_connection_packet_writer.h",
1249 "quic/quic_server.cc",
1250 "quic/quic_server.h",
1251 "quic/quic_server_packet_writer.cc",
1252 "quic/quic_server_packet_writer.h",
1253 "quic/quic_server_session.cc",
1254 "quic/quic_server_session.h",
1255 "quic/quic_spdy_server_stream.cc",
1256 "quic/quic_spdy_server_stream.h",
1257 "quic/quic_time_wait_list_manager.cc",
1258 "quic/quic_time_wait_list_manager.h",
1259 ]
1260 deps = [
1261 ":net",
1262 "//base",
1263 "//base/third_party/dynamic_annotations",
1264 "//url",
1265 ]
1266}
rch47ad01f2015-03-20 21:17:231267source_set("simple_quic_tools") {
rcha9d12ce12015-03-19 23:06:491268 sources = [
1269 "tools/quic/quic_simple_client.cc",
1270 "tools/quic/quic_simple_client.h",
rcha9d12ce12015-03-19 23:06:491271 "tools/quic/quic_simple_client_session.cc",
1272 "tools/quic/quic_simple_client_session.h",
1273 "tools/quic/quic_simple_client_stream.cc",
1274 "tools/quic/quic_simple_client_stream.h",
1275 ]
1276 deps = [
1277 ":net",
1278 "//base",
rch47ad01f2015-03-20 21:17:231279 "//base/third_party/dynamic_annotations",
1280 "//url",
1281 ]
1282}
1283
1284executable("simple_quic_client") {
1285 testonly = true
1286 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
[email protected]8a3f8242014-06-05 18:05:121297# TODO(GYP) make this compile on Android, we need some native test deps done.
[email protected]bd82a57d2014-07-31 16:52:341298# TODO(GYP) Also doesn't work on Windows; dependency on boringssl is wrong.
dprankecf8465db72014-11-10 23:51:221299# TODO(GYP) Also doesn't work on Mac, need to figure out why not.
1300if (!is_android && !is_win && !is_mac) {
scottmg34fb7e52014-12-03 23:27:241301 test("net_unittests") {
1302 sources = gypi_values.net_test_sources
erikchen006a7cf2014-12-03 22:27:111303
brettwd1c719a2015-02-19 23:17:041304 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1305 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
scottmg34fb7e52014-12-03 23:27:241306 defines = []
[email protected]8a3f8242014-06-05 18:05:121307
scottmg34fb7e52014-12-03 23:27:241308 deps = [
1309 ":extras",
1310 ":http_server",
1311 ":net",
1312 ":quic_tools",
1313 ":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
scottmg34fb7e52014-12-03 23:27:241331 if (is_linux) {
1332 sources += gypi_values.net_linux_test_sources
1333 deps += [
1334 ":balsa",
1335 ":epoll_server",
1336 ":flip_in_mem_edsm_server_base",
1337 ":quic_base",
[email protected]b2f44d12014-06-10 17:48:031338 ]
1339 }
[email protected]8a3f8242014-06-05 18:05:121340
scottmg34fb7e52014-12-03 23:27:241341 if (is_mac || is_ios) {
1342 sources += gypi_values.net_base_test_mac_ios_sources
1343 }
1344
brettwc859f18f2014-09-18 23:34:501345 if (is_chromeos) {
scottmg34fb7e52014-12-03 23:27:241346 sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
1347 }
1348
1349 if (is_android) {
brettwc859f18f2014-09-18 23:34:501350 sources -= [
scottmg34fb7e52014-12-03 23:27:241351 # See bug http://crbug.com/344533.
1352 "disk_cache/blockfile/index_table_v3_unittest.cc",
1353
1354 # No res_ninit() et al on Android, so this doesn't make a lot of
1355 # sense.
1356 "dns/dns_config_service_posix_unittest.cc",
1357 ]
1358 deps += [
1359 ":net_javatests", # FIXME(brettw)
1360 ":net_test_jni_headers",
brettwc859f18f2014-09-18 23:34:501361 ]
1362 }
scottmg34fb7e52014-12-03 23:27:241363
rmcilroy5837d332014-12-17 14:30:581364 if (v8_use_external_startup_data) {
1365 deps += [ "//gin" ]
1366 }
1367
scottmg34fb7e52014-12-03 23:27:241368 if (!use_nss_certs) {
1369 sources -= [ "ssl/client_cert_store_nss_unittest.cc" ]
1370 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
1371 sources -= [ "ssl/client_cert_store_chromeos_unittest.cc" ]
1372 }
1373 }
1374
1375 if (use_openssl) {
1376 # When building for OpenSSL, we need to exclude NSS specific tests
1377 # or functionality not supported by OpenSSL yet.
1378 # TODO(bulach): Add equivalent tests when the underlying
1379 # functionality is ported to OpenSSL.
1380 sources -= [
1381 "cert/nss_cert_database_unittest.cc",
1382 "cert/x509_util_nss_unittest.cc",
1383 "quic/test_tools/crypto_test_utils_nss.cc",
1384 ]
1385 if (is_chromeos) {
1386 # These were already removed in the non-ChromeOS case.
1387 sources -= [
1388 "cert/nss_cert_database_chromeos_unittest.cc",
1389 "cert/nss_profile_filter_chromeos_unittest.cc",
1390 ]
1391 }
1392 } else {
1393 sources -= [
1394 "cert/x509_util_openssl_unittest.cc",
1395 "quic/test_tools/crypto_test_utils_openssl.cc",
1396 "socket/ssl_client_socket_openssl_unittest.cc",
1397 "socket/ssl_session_cache_openssl_unittest.cc",
1398 ]
1399 if (!is_desktop_linux && !is_chromeos) {
1400 sources -= [ "cert/nss_cert_database_unittest.cc" ]
1401 }
1402 }
1403
1404 if (use_kerberos) {
1405 defines += [ "USE_KERBEROS" ]
1406 } else {
1407 sources -= [
1408 "http/http_auth_gssapi_posix_unittest.cc",
1409 "http/http_auth_handler_negotiate_unittest.cc",
1410 "http/mock_gssapi_library_posix.cc",
1411 "http/mock_gssapi_library_posix.h",
1412 ]
1413 }
1414
1415 if (use_openssl || (!is_desktop_linux && !is_chromeos && !is_ios)) {
1416 # Only include this test when on Posix and using NSS for
1417 # cert verification or on iOS (which also uses NSS for certs).
1418 sources -= [ "ocsp/nss_ocsp_unittest.cc" ]
1419 }
1420
1421 if (!use_openssl_certs) {
1422 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1423 }
1424
1425 if (!enable_websockets) {
1426 sources -= [
dgozmana6e70092014-12-12 14:46:211427 "server/http_connection_unittest.cc",
1428 "server/http_server_response_info_unittest.cc",
1429 "server/http_server_unittest.cc",
1430 "server/web_socket_encoder_unittest.cc",
scottmg34fb7e52014-12-03 23:27:241431 "websockets/websocket_basic_stream_test.cc",
1432 "websockets/websocket_channel_test.cc",
1433 "websockets/websocket_deflate_predictor_impl_test.cc",
1434 "websockets/websocket_deflate_stream_test.cc",
1435 "websockets/websocket_deflater_test.cc",
ricea433bdab2015-01-26 07:25:371436 "websockets/websocket_end_to_end_test.cc",
satorux933fc7a2015-02-13 07:09:101437 "websockets/websocket_errors_test.cc",
scottmg34fb7e52014-12-03 23:27:241438 "websockets/websocket_extension_parser_test.cc",
1439 "websockets/websocket_frame_parser_test.cc",
1440 "websockets/websocket_frame_test.cc",
1441 "websockets/websocket_handshake_challenge_test.cc",
1442 "websockets/websocket_handshake_stream_create_helper_test.cc",
1443 "websockets/websocket_inflater_test.cc",
1444 "websockets/websocket_stream_test.cc",
1445 "websockets/websocket_test_util.cc",
1446 "websockets/websocket_test_util.h",
1447 ]
dgozmana6e70092014-12-12 14:46:211448 deps -= [ ":http_server" ]
scottmg34fb7e52014-12-03 23:27:241449 }
1450
1451 if (disable_file_support) {
1452 sources -= [
1453 "base/directory_lister_unittest.cc",
1454 "url_request/url_request_file_job_unittest.cc",
1455 ]
1456 }
1457
1458 if (disable_ftp_support) {
1459 sources -= [
1460 "ftp/ftp_auth_cache_unittest.cc",
1461 "ftp/ftp_ctrl_response_buffer_unittest.cc",
1462 "ftp/ftp_directory_listing_parser_ls_unittest.cc",
1463 "ftp/ftp_directory_listing_parser_netware_unittest.cc",
1464 "ftp/ftp_directory_listing_parser_os2_unittest.cc",
1465 "ftp/ftp_directory_listing_parser_unittest.cc",
1466 "ftp/ftp_directory_listing_parser_unittest.h",
1467 "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1468 "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1469 "ftp/ftp_network_transaction_unittest.cc",
1470 "ftp/ftp_util_unittest.cc",
1471 "url_request/url_request_ftp_job_unittest.cc",
1472 ]
1473 }
1474
1475 if (!enable_built_in_dns) {
1476 sources -= [
1477 "dns/address_sorter_posix_unittest.cc",
1478 "dns/address_sorter_unittest.cc",
1479 ]
1480 }
1481
1482 # Always need use_v8_in_net to be 1 to run on Android, so just remove
1483 # net_unittest's dependency on v8 when using icu alternatives instead of
1484 # setting use_v8_in_net to 0.
1485 if (use_v8_in_net && !use_icu_alternatives_on_android) {
1486 deps += [ ":net_with_v8" ]
1487 } else {
1488 sources -= [
scottmg34fb7e52014-12-03 23:27:241489 "proxy/proxy_resolver_v8_tracing_unittest.cc",
satorux933fc7a2015-02-13 07:09:101490 "proxy/proxy_resolver_v8_unittest.cc",
scottmg34fb7e52014-12-03 23:27:241491 ]
1492 }
1493
amistry7e6ebfdc82015-02-13 04:19:111494 if (use_v8_in_net && !is_android) {
1495 deps += [
1496 ":net_browser_services",
sammc5403aa1d2015-02-25 04:59:211497 ":net_utility_services",
amistry7e6ebfdc82015-02-13 04:19:111498 "//mojo/environment:chromium",
1499 "//third_party/mojo/src/mojo/edk/system",
1500 ]
1501 } else {
sammc5403aa1d2015-02-25 04:59:211502 sources -= [
sammc6ac3fe52015-02-25 06:00:281503 "dns/host_resolver_mojo_unittest.cc",
sammc5403aa1d2015-02-25 04:59:211504 "dns/mojo_host_resolver_impl_unittest.cc",
sammcc804b532015-03-12 10:02:341505 "proxy/load_state_change_coalescer_unittest.cc",
sammc352f7492015-02-25 09:45:241506 "proxy/mojo_proxy_resolver_factory_impl_unittest.cc",
sammc5403aa1d2015-02-25 04:59:211507 "proxy/mojo_proxy_resolver_impl_unittest.cc",
amistry07ff1402015-03-10 07:34:071508 "proxy/proxy_resolver_mojo_unittest.cc",
amistry6e1ed1b2015-03-12 05:24:011509 "proxy/proxy_service_mojo_unittest.cc",
sammc5403aa1d2015-02-25 04:59:211510 ]
amistry7e6ebfdc82015-02-13 04:19:111511 }
1512
scottmg34fb7e52014-12-03 23:27:241513 if (!enable_mdns) {
1514 sources -= [
1515 "dns/mdns_cache_unittest.cc",
1516 "dns/mdns_client_unittest.cc",
1517 "dns/record_parsed_unittest.cc",
1518 "dns/record_rdata_unittest.cc",
1519 ]
1520 }
1521
1522 if (is_ios) {
1523 # TODO(GYP)
1524 # 'actions': [
1525 # {
1526 # 'action_name': 'copy_test_data',
1527 # 'variables': {
1528 # 'test_data_files': [
1529 # 'data/ssl/certificates/',
1530 # 'data/test.html',
1531 # 'data/url_request_unittest/',
1532 # ],
1533 # 'test_data_prefix': 'net',
1534 # },
1535 # 'includes': [ '../build/copy_test_data_ios.gypi' ],
1536 # },
1537 # ],
1538 sources -= [
1539 # TODO(droger): The following tests are disabled because the
1540 # implementation is missing or incomplete.
1541 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1542 "base/keygen_handler_unittest.cc",
1543 "disk_cache/backend_unittest.cc",
1544 "disk_cache/blockfile/block_files_unittest.cc",
1545
1546 # Need to read input data files.
1547 "filter/gzip_filter_unittest.cc",
1548 "socket/ssl_server_socket_unittest.cc",
1549 "spdy/fuzzing/hpack_fuzz_util_test.cc",
1550
1551 # Need TestServer.
1552 "proxy/proxy_script_fetcher_impl_unittest.cc",
1553 "socket/ssl_client_socket_unittest.cc",
1554 "url_request/url_fetcher_impl_unittest.cc",
1555 "url_request/url_request_context_builder_unittest.cc",
1556
1557 # Needs GetAppOutput().
1558 "test/python_utils_unittest.cc",
1559
1560 # The following tests are disabled because they don't apply to
1561 # iOS.
1562 # OS is not "linux" or "freebsd" or "openbsd".
1563 "socket/unix_domain_client_socket_posix_unittest.cc",
1564 "socket/unix_domain_listen_socket_posix_unittest.cc",
1565 "socket/unix_domain_server_socket_posix_unittest.cc",
1566
1567 # See bug http://crbug.com/344533.
1568 "disk_cache/blockfile/index_table_v3_unittest.cc",
1569 ]
1570 }
1571
1572 if (is_android) {
1573 sources -= [ "dns/dns_config_service_posix_unittest.cc" ]
1574
1575 # TODO(GYP)
1576 # # TODO(mmenke): This depends on test_support_base, which depends on
1577 # # icu. Figure out a way to remove that dependency.
1578 # 'dependencies': [
1579 # '../testing/android/native_test.gyp:native_test_native_code',
1580 # ]
1581
1582 set_sources_assignment_filter([])
1583 sources += [ "base/address_tracker_linux_unittest.cc" ]
1584 set_sources_assignment_filter(sources_assignment_filter)
1585 }
1586
1587 if (use_icu_alternatives_on_android) {
1588 sources -= [
1589 "base/filename_util_unittest.cc",
1590 "base/net_util_icu_unittest.cc",
1591 ]
1592 deps -= [ "//base:i18n" ]
[email protected]8a3f8242014-06-05 18:05:121593 }
1594 }
dougke0f2b8f2015-03-16 22:40:331595} # !is_android && !is_win && !is_mac
[email protected]8a3f8242014-06-05 18:05:121596
dougke0f2b8f2015-03-16 22:40:331597if (!is_android && !is_win) {
scottmg34fb7e52014-12-03 23:27:241598 executable("quic_server") {
1599 sources = [
1600 "quic/quic_server_bin.cc",
1601 ]
1602 deps = [
1603 ":quic_tools",
1604 ":net",
1605 "//base",
1606 "//third_party/boringssl",
[email protected]8a3f8242014-06-05 18:05:121607 ]
1608 }
dougke0f2b8f2015-03-16 22:40:331609}
rockot9c67e5f2015-03-12 20:01:211610
1611executable("net_perftests") {
1612 testonly = true
1613 sources = [
1614 "cookies/cookie_monster_perftest.cc",
1615 "disk_cache/blockfile/disk_cache_perftest.cc",
1616 "proxy/proxy_resolver_perftest.cc",
1617 "udp/udp_socket_perftest.cc",
1618 ]
1619
1620 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1621 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
1622 deps = [
1623 "//base",
1624 "//base:i18n",
1625 "//base/test:test_support_perf",
1626 "//testing/gtest",
1627 "//url",
1628 ":net",
1629 ":test_support",
1630 ]
1631
1632 if (enable_websockets) {
1633 sources += [ "websockets/websocket_frame_perftest.cc" ]
1634 }
1635
1636 if (use_v8_in_net) {
1637 deps += [ ":net_with_v8" ]
1638 } else {
1639 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1640 }
1641
1642 if (is_win && icu_use_data_file) {
1643 # This is needed to trigger the dll copy step on windows.
1644 # TODO(mark): Specifying this here shouldn't be necessary.
1645 deps += [ "//third_party/icu:icudata" ]
1646 }
1647}