blob: 1b8b55f929c11c7e741228bcc7b9c39d2fa8e7f7 [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
slan77bdc2e62015-09-21 17:56:265import("//build/config/chromecast_build.gni")
brettw4cab0f12015-09-14 21:40:016import("//build/config/compiler/compiler.gni")
[email protected]4625ade2014-04-15 19:26:447import("//build/config/crypto.gni")
8import("//build/config/features.gni")
9import("//build/config/ui.gni")
dpranked4da5ab42015-10-13 06:20:3310import("//build_overrides/v8.gni")
qsrfb5251d12015-01-21 15:57:2211import("//testing/test.gni")
rockot9c67e5f2015-03-12 20:01:2112import("//third_party/icu/config.gni")
rtennetib6f1c0d2015-04-03 17:52:0613import("//third_party/protobuf/proto_library.gni")
tfarinae597851a2015-10-06 23:14:4114import("//tools/grit/grit_rule.gni")
[email protected]26046b52014-07-16 00:11:0315
[email protected]4625ade2014-04-15 19:26:4416if (is_android) {
17 import("//build/config/android/config.gni")
[email protected]ef0eb442014-05-15 09:32:1818 import("//build/config/android/rules.gni")
[email protected]4625ade2014-04-15 19:26:4419} else if (is_mac) {
20 import("//build/config/mac/mac_sdk.gni")
21}
22
23# The list of net files is kept in net.gypi. Read it.
scottmg34fb7e52014-12-03 23:27:2424gypi_values = exec_script("//build/gypi_to_gn.py",
25 [ rebase_path("net.gypi") ],
26 "scope",
27 [ "net.gypi" ])
[email protected]4625ade2014-04-15 19:26:4428
skyostila5574572015-11-11 16:24:2529# Disable Kerberos on ChromeOS, iOS, Chromecast and headless, at least for now.
slan77bdc2e62015-09-21 17:56:2630# It needs configuration (krb5.conf and so on).
skyostila5574572015-11-11 16:24:2531use_kerberos = !is_chromeos && !is_ios && !is_chromecast && !is_headless
[email protected]4625ade2014-04-15 19:26:4432
33# The way the cache uses mmap() is inefficient on some Android devices. If
34# this flag is set, we hackily avoid using mmap() in the disk cache. We are
35# pretty confident that mmap-ing the index would not hurt any existing x86
36# android devices, but we cannot be so sure about the variety of ARM devices.
37# So enable it for x86 only for now.
dpranke43276212015-02-20 02:55:1938posix_avoid_mmap = is_android && current_cpu != "x86"
[email protected]4625ade2014-04-15 19:26:4439
40# WebSockets and socket stream code are used everywhere except iOS.
41enable_websockets = !is_ios
[email protected]8a3f8242014-06-05 18:05:1242use_v8_in_net = !is_ios
[email protected]4625ade2014-04-15 19:26:4443enable_built_in_dns = !is_ios
[email protected]8a3f8242014-06-05 18:05:1244disable_ftp_support = is_ios
[email protected]4625ade2014-04-15 19:26:4445
[email protected]384dab92014-06-04 20:26:0846declare_args() {
47 # Disables support for file URLs. File URL support requires use of icu.
48 disable_file_support = false
xunjieli11834f02015-12-22 04:27:0849 enable_bidirectional_stream = false
[email protected]384dab92014-06-04 20:26:0850}
[email protected]02494ec2014-05-07 15:05:2951
[email protected]4625ade2014-04-15 19:26:4452config("net_config") {
53 defines = []
54 if (posix_avoid_mmap) {
55 defines += [ "POSIX_AVOID_MMAP" ]
56 }
[email protected]02494ec2014-05-07 15:05:2957 if (disable_file_support) {
58 defines += [ "DISABLE_FILE_SUPPORT" ]
59 }
tfarinae7c8c3c2015-11-04 15:09:5560 if (disable_ftp_support) {
61 defines += [ "DISABLE_FTP_SUPPORT=1" ]
62 }
xunjieli11834f02015-12-22 04:27:0863 if (enable_bidirectional_stream) {
64 defines += [ "ENABLE_BIDIRECTIONAL_STREAM=1" ]
65 }
[email protected]4625ade2014-04-15 19:26:4466}
67
xunjieli905496a2015-08-31 15:51:1768# net_internal_config is shared with net and net_small.
69config("net_internal_config") {
[email protected]8603c5de2014-04-16 20:34:3170 defines = [
ellyjonesc7a5c502015-06-26 18:55:2071 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to
[email protected]8603c5de2014-04-16 20:34:3172 # 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
[email protected]4625ade2014-04-15 19:26:4480 if (use_kerberos) {
81 defines += [ "USE_KERBEROS" ]
82 if (is_android) {
xunjieli905496a2015-08-31 15:51:1783 include_dirs = [ "/usr/include/kerberosV" ]
[email protected]4625ade2014-04-15 19:26:4484 }
[email protected]4625ade2014-04-15 19:26:4485 }
86
87 if (enable_built_in_dns) {
88 defines += [ "ENABLE_BUILT_IN_DNS" ]
xunjieli905496a2015-08-31 15:51:1789 }
90}
91
92# net_shared_* are settings shared between net and net_small
sergeyu99d83f92015-09-14 23:03:3393net_shared_sources = gypi_values.net_nacl_common_sources
xunjieli905496a2015-08-31 15:51:1794
95net_shared_unfiltered_sources = []
96
97net_shared_configs = [
98 ":net_internal_config",
99 "//build/config:precompiled_headers",
100
101 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
102 "//build/config/compiler:no_size_t_to_int_warning",
103]
104
105net_shared_public_deps = [
106 ":net_quic_proto",
107 "//crypto",
108 "//crypto:platform",
109]
110
111net_shared_deps = [
112 ":net_resources",
113 "//base",
xunjieli905496a2015-08-31 15:51:17114 "//net/base/registry_controlled_domains",
xunjieli905496a2015-08-31 15:51:17115 "//third_party/protobuf:protobuf_lite",
xunjieli905496a2015-08-31 15:51:17116]
117
sergeyu99d83f92015-09-14 23:03:33118if (!is_nacl) {
119 net_shared_sources += gypi_values.net_non_nacl_sources
xunjieli905496a2015-08-31 15:51:17120
sergeyu99d83f92015-09-14 23:03:33121 net_shared_deps += [
122 "//base:prefs",
123 "//base/third_party/dynamic_annotations",
124 "//sdch",
125 "//third_party/zlib",
126 ]
127
128 if (!use_kerberos) {
129 net_shared_sources -= [
130 "http/http_auth_gssapi_posix.cc",
131 "http/http_auth_gssapi_posix.h",
132 "http/http_auth_handler_negotiate.cc",
133 "http/http_auth_handler_negotiate.h",
134 ]
135 }
136
137 if (is_posix) {
138 if (posix_avoid_mmap) {
139 net_shared_sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
140 } else {
141 net_shared_sources -=
142 [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
143 }
144 }
145
146 if (!enable_built_in_dns) {
147 net_shared_sources -= [
148 "dns/address_sorter_posix.cc",
149 "dns/address_sorter_posix.h",
150 "dns/dns_client.cc",
151 ]
152 }
153
154 if (use_openssl) {
155 net_shared_sources -= [
156 "base/nss_memio.c",
157 "base/nss_memio.h",
158 "cert/ct_log_verifier_nss.cc",
159 "cert/ct_objects_extractor_nss.cc",
160 "cert/jwk_serializer_nss.cc",
161 "cert/scoped_nss_types.h",
162 "cert/x509_util_nss.cc",
163 "quic/crypto/aead_base_decrypter_nss.cc",
164 "quic/crypto/aead_base_encrypter_nss.cc",
165 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc",
166 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc",
167 "quic/crypto/chacha20_poly1305_decrypter_nss.cc",
168 "quic/crypto/chacha20_poly1305_encrypter_nss.cc",
169 "quic/crypto/channel_id_nss.cc",
170 "quic/crypto/p256_key_exchange_nss.cc",
171 "quic/crypto/proof_source_chromium_nss.cc",
172 "socket/nss_ssl_util.cc",
173 "socket/nss_ssl_util.h",
174 "socket/ssl_client_socket_nss.cc",
175 "socket/ssl_client_socket_nss.h",
176 "socket/ssl_server_socket_nss.cc",
177 "socket/ssl_server_socket_nss.h",
178 ]
179 if (is_ios) {
180 # Always removed for !ios below.
181 net_shared_sources -= [
182 "cert/cert_verify_proc_nss.cc",
183 "cert/cert_verify_proc_nss.h",
184 ]
185 }
sergeyu99d83f92015-09-14 23:03:33186 if (!use_nss_certs && !is_ios) {
187 net_shared_sources -= [ "cert/x509_util_nss.h" ]
188 }
[email protected]4625ade2014-04-15 19:26:44189 } else {
xunjieli905496a2015-08-31 15:51:17190 net_shared_sources -= [
sergeyu99d83f92015-09-14 23:03:33191 "cert/ct_log_verifier_openssl.cc",
192 "cert/ct_objects_extractor_openssl.cc",
193 "cert/jwk_serializer_openssl.cc",
194 "cert/x509_util_openssl.cc",
195 "cert/x509_util_openssl.h",
196 "quic/crypto/aead_base_decrypter_openssl.cc",
197 "quic/crypto/aead_base_encrypter_openssl.cc",
198 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc",
199 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc",
200 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc",
201 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc",
202 "quic/crypto/channel_id_openssl.cc",
203 "quic/crypto/p256_key_exchange_openssl.cc",
204 "quic/crypto/proof_source_chromium_openssl.cc",
205 "quic/crypto/scoped_evp_aead_ctx.cc",
206 "quic/crypto/scoped_evp_aead_ctx.h",
207 "socket/ssl_client_socket_openssl.cc",
208 "socket/ssl_client_socket_openssl.h",
209 "socket/ssl_server_socket_openssl.cc",
210 "socket/ssl_server_socket_openssl.h",
211 "ssl/openssl_ssl_util.cc",
212 "ssl/openssl_ssl_util.h",
213 "ssl/ssl_client_session_cache_openssl.cc",
214 "ssl/ssl_client_session_cache_openssl.h",
davidben2a811e4e2015-12-01 10:49:34215 "ssl/ssl_key_logger.cc",
216 "ssl/ssl_key_logger.h",
sergeyu99d83f92015-09-14 23:03:33217 "ssl/ssl_platform_key.h",
svaldez7872fd02015-11-19 21:10:54218 "ssl/ssl_platform_key_task_runner.cc",
219 "ssl/ssl_platform_key_task_runner.h",
sergeyu99d83f92015-09-14 23:03:33220 "ssl/threaded_ssl_private_key.cc",
221 "ssl/threaded_ssl_private_key.h",
[email protected]4625ade2014-04-15 19:26:44222 ]
223 }
sergeyu99d83f92015-09-14 23:03:33224
225 if (!use_openssl_certs) {
xunjieli905496a2015-08-31 15:51:17226 net_shared_sources -= [
sergeyu99d83f92015-09-14 23:03:33227 "base/crypto_module_openssl.cc",
228 "base/keygen_handler_openssl.cc",
229 "base/openssl_private_key_store.h",
230 "base/openssl_private_key_store_memory.cc",
231 "cert/cert_database_openssl.cc",
232 "cert/cert_verify_proc_openssl.cc",
233 "cert/cert_verify_proc_openssl.h",
234 "cert/test_root_certs_openssl.cc",
235 "cert/x509_certificate_openssl.cc",
236 "ssl/openssl_client_key_store.cc",
237 "ssl/openssl_client_key_store.h",
xunjieli06d93982015-08-27 17:13:02238 ]
sergeyu99d83f92015-09-14 23:03:33239 if (is_android) {
240 net_shared_sources -= [ "base/openssl_private_key_store_android.cc" ]
241 }
242 } else {
243 if (is_android) {
244 # Android doesn't use these even when using OpenSSL.
245 net_shared_sources -= [
246 "base/openssl_private_key_store_memory.cc",
247 "cert/cert_database_openssl.cc",
248 "cert/cert_verify_proc_openssl.cc",
249 "cert/test_root_certs_openssl.cc",
agrievea5517aa2015-10-23 03:03:45250 "http/http_auth_gssapi_posix.cc",
251 "http/http_auth_gssapi_posix.h",
sergeyu99d83f92015-09-14 23:03:33252 ]
253 }
[email protected]4625ade2014-04-15 19:26:44254 }
sergeyu99d83f92015-09-14 23:03:33255
mostynbbf5e6cc2015-10-21 07:53:31256 if (use_glib && use_gconf && !is_chromeos) {
sergeyu99d83f92015-09-14 23:03:33257 net_shared_configs += [ "//build/config/linux:gconf" ]
258 net_shared_deps += [ "//build/linux:gio" ]
259 }
260
261 if (is_linux) {
262 net_shared_configs += [ "//build/config/linux:libresolv" ]
263 }
264
265 if (!use_nss_certs) {
266 net_shared_sources -= [
267 "base/crypto_module_nss.cc",
268 "base/keygen_handler_nss.cc",
269 "cert/cert_database_nss.cc",
270 "cert/nss_cert_database.cc",
271 "cert/nss_cert_database.h",
272 "cert/x509_certificate_nss.cc",
273 "ssl/client_cert_store_nss.cc",
274 "ssl/client_cert_store_nss.h",
275 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
276 "third_party/mozilla_security_manager/nsKeygenHandler.h",
277 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
278 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
279 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
280 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
281 ]
282 if (!is_ios) {
283 # These files are part of the partial implementation of NSS on iOS so
284 # keep them in that case (even though use_nss_certs is not set).
285 net_shared_sources -= [
286 "cert/cert_verify_proc_nss.cc",
287 "cert/cert_verify_proc_nss.h",
288 "cert/test_root_certs_nss.cc",
289 "cert/x509_util_nss_certs.cc",
290 "cert_net/nss_ocsp.cc",
291 "cert_net/nss_ocsp.h",
292 ]
293 }
294 if (is_chromeos) {
295 # These were already removed on non-ChromeOS.
296 net_shared_sources -= [
297 "cert/nss_cert_database_chromeos.cc",
298 "cert/nss_cert_database_chromeos.h",
299 "cert/nss_profile_filter_chromeos.cc",
300 "cert/nss_profile_filter_chromeos.h",
301 ]
302 }
xunjieli905496a2015-08-31 15:51:17303 net_shared_sources -= [
pneubeckabe6e9d12015-08-26 08:47:11304 "ssl/client_key_store.cc",
305 "ssl/client_key_store.h",
306 "ssl/ssl_platform_key_nss.cc",
307 ]
sergeyu99d83f92015-09-14 23:03:33308 } else if (use_openssl) {
309 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's
310 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file
311 # in directly.
312 net_shared_sources += [ "third_party/nss/ssl/cmpcert.c" ]
[email protected]4625ade2014-04-15 19:26:44313 }
314
sergeyu99d83f92015-09-14 23:03:33315 if (!enable_mdns) {
316 net_shared_sources -= [
317 "dns/mdns_cache.cc",
318 "dns/mdns_cache.h",
319 "dns/mdns_client.cc",
320 "dns/mdns_client.h",
321 "dns/mdns_client_impl.cc",
322 "dns/mdns_client_impl.h",
323 "dns/record_parsed.cc",
324 "dns/record_parsed.h",
325 "dns/record_rdata.cc",
326 "dns/record_rdata.h",
327 ]
328 }
329
330 if (is_win) {
331 net_shared_sources -= [ "http/http_auth_handler_ntlm_portable.cc" ]
332 } else { # !is_win
333 net_shared_sources -= [
334 "base/winsock_init.cc",
335 "base/winsock_init.h",
336 "base/winsock_util.cc",
337 "base/winsock_util.h",
338 "proxy/proxy_resolver_winhttp.cc",
339 "proxy/proxy_resolver_winhttp.h",
340 ]
341 }
342
343 if (is_ios) {
344 # Add back some sources that were otherwise filtered out. iOS needs some Mac
345 # files.
346 net_shared_unfiltered_sources += [
347 "base/mac/url_conversions.h",
348 "base/mac/url_conversions.mm",
349 "base/network_change_notifier_mac.cc",
350 "base/network_config_watcher_mac.cc",
351 "base/network_interfaces_mac.cc",
352 "base/network_interfaces_mac.h",
353 "base/platform_mime_util_mac.mm",
354 "proxy/proxy_resolver_mac.cc",
355 "proxy/proxy_server_mac.cc",
356 ]
357
358 net_shared_sources -= [ "disk_cache/blockfile/file_posix.cc" ]
359 net_shared_deps += [
360 "//third_party/nss:nspr",
361 "//third_party/nss",
362 "//net/third_party/nss/ssl:libssl",
363 ]
364 }
365
366 if (is_ios || is_mac) {
367 net_shared_sources += gypi_values.net_base_mac_ios_sources
368 }
369
xunjieli905496a2015-08-31 15:51:17370 if (is_android) {
sergeyu99d83f92015-09-14 23:03:33371 net_shared_deps += [ ":net_jni_headers" ]
372
373 # Add some Linux sources that were excluded by the filter, but which
374 # are needed.
375 net_shared_unfiltered_sources += [
376 "base/address_tracker_linux.cc",
377 "base/address_tracker_linux.h",
378 "base/network_interfaces_linux.cc",
379 "base/network_interfaces_linux.h",
380 "base/platform_mime_util_linux.cc",
381 ]
xunjieli905496a2015-08-31 15:51:17382 }
383} else {
sergeyu99d83f92015-09-14 23:03:33384 net_shared_public_deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
xunjieli905496a2015-08-31 15:51:17385}
386
387component("net") {
388 sources = net_shared_sources
389
390 # Add back some sources that were otherwise filtered out.
391 set_sources_assignment_filter([])
392 sources += net_shared_unfiltered_sources
393 set_sources_assignment_filter(sources_assignment_filter)
394
395 cflags = []
396 configs += net_shared_configs
397 public_configs = [ ":net_config" ]
398
399 public_deps = net_shared_public_deps + [ "//url" ]
400 deps = net_shared_deps
[email protected]4625ade2014-04-15 19:26:44401
402 if (is_mac) {
[email protected]4625ade2014-04-15 19:26:44403 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19404 "Foundation.framework",
405 "Security.framework",
406 "SystemConfiguration.framework",
407 "resolv",
[email protected]4625ade2014-04-15 19:26:44408 ]
409 }
410
411 if (is_ios) {
[email protected]4625ade2014-04-15 19:26:44412 libs = [
[email protected]ab9ce6e2014-04-17 20:33:19413 "CFNetwork.framework",
414 "MobileCoreServices.framework",
415 "Security.framework",
416 "SystemConfiguration.framework",
417 "resolv",
[email protected]4625ade2014-04-15 19:26:44418 ]
xunjieli06d93982015-08-27 17:13:02419 }
xunjieli4c8c6922015-08-27 16:02:40420
sergeyu99d83f92015-09-14 23:03:33421 if (!is_nacl) {
422 if (!disable_file_support) {
423 sources += gypi_values.net_file_support_sources
424 }
xunjieli06d93982015-08-27 17:13:02425
sergeyu99d83f92015-09-14 23:03:33426 if (!disable_ftp_support) {
427 sources += gypi_values.net_ftp_support_sources
428 }
xunjieli905496a2015-08-31 15:51:17429
xunjieli11834f02015-12-22 04:27:08430 if (enable_bidirectional_stream) {
431 sources += gypi_values.net_bidirectional_stream_sources
432 }
433
sergeyu99d83f92015-09-14 23:03:33434 if (enable_websockets) {
435 sources += gypi_values.net_websockets_sources
436 }
xunjieli905496a2015-08-31 15:51:17437
sergeyu99d83f92015-09-14 23:03:33438 # ICU support.
439 deps += [
440 "//base:i18n",
441 "//third_party/icu",
442 ]
443 sources += [
444 "base/filename_util_icu.cc",
445 "base/net_string_util_icu.cc",
446 "base/net_util_icu.cc",
447 ]
448 }
xunjieli905496a2015-08-31 15:51:17449}
450
451if (is_android) {
452 # Same as net, but with ICU, file, ftp, and websocket support stripped.
453 component("net_small") {
454 sources = net_shared_sources
455
456 # Add back some sources that were otherwise filtered out.
xunjieli06d93982015-08-27 17:13:02457 set_sources_assignment_filter([])
xunjieli905496a2015-08-31 15:51:17458 sources += net_shared_unfiltered_sources
xunjieli06d93982015-08-27 17:13:02459 set_sources_assignment_filter(sources_assignment_filter)
xunjieli06d93982015-08-27 17:13:02460
xunjieli905496a2015-08-31 15:51:17461 cflags = []
462 defines = []
463 configs += net_shared_configs
464 public_configs = [ ":net_config" ]
465
466 public_deps = net_shared_public_deps +
467 [ "//url:url_lib_use_icu_alternatives_on_android" ]
468 deps = net_shared_deps + [ ":net_jni_headers" ]
469
470 defines += [
471 "DISABLE_FILE_SUPPORT",
472 "DISABLE_FTP_SUPPORT",
473 "USE_ICU_ALTERNATIVES_ON_ANDROID=1",
474 ]
475
476 # Use ICU alternative on Android.
[email protected]85191ed2014-05-15 00:41:49477 sources += [
478 "base/net_string_util_icu_alternatives_android.cc",
479 "base/net_string_util_icu_alternatives_android.h",
480 ]
481 }
[email protected]4625ade2014-04-15 19:26:44482}
483
484grit("net_resources") {
485 source = "base/net_resources.grd"
[email protected]7ae52902014-08-18 22:36:01486 use_qualified_include = true
[email protected]b89c53842014-07-23 16:32:32487 outputs = [
488 "grit/net_resources.h",
489 "net_resources.pak",
[email protected]b89c53842014-07-23 16:32:32490 ]
[email protected]4625ade2014-04-15 19:26:44491}
492
rtennetib6f1c0d2015-04-03 17:52:06493proto_library("net_quic_proto") {
xunjieli905496a2015-08-31 15:51:17494 visibility = [
495 ":net",
496 ":net_small",
497 ]
brettw2e7db0a2015-04-24 22:59:17498
rtennetib6f1c0d2015-04-03 17:52:06499 sources = [
500 "quic/proto/cached_network_parameters.proto",
501 "quic/proto/source_address_token.proto",
502 ]
503 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:"
504 cc_include = "net/base/net_export.h"
505
506 defines = [ "NET_IMPLEMENTATION" ]
507
508 extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
509}
510
Brett Wilson83fd4242014-09-02 19:45:33511static_library("extras") {
mef327a8e42014-08-29 17:10:03512 sources = gypi_values.net_extras_sources
513 configs += [ "//build/config/compiler:wexit_time_destructors" ]
514 deps = [
515 ":net",
brettwbc44c0a92015-02-20 22:30:39516 "//base",
mef327a8e42014-08-29 17:10:03517 "//sql:sql",
518 ]
519}
520
[email protected]8a3f8242014-06-05 18:05:12521static_library("http_server") {
[email protected]4625ade2014-04-15 19:26:44522 sources = [
523 "server/http_connection.cc",
524 "server/http_connection.h",
525 "server/http_server.cc",
526 "server/http_server.h",
527 "server/http_server_request_info.cc",
528 "server/http_server_request_info.h",
529 "server/http_server_response_info.cc",
530 "server/http_server_response_info.h",
531 "server/web_socket.cc",
532 "server/web_socket.h",
dgozmana6e70092014-12-12 14:46:21533 "server/web_socket_encoder.cc",
534 "server/web_socket_encoder.h",
[email protected]4625ade2014-04-15 19:26:44535 ]
jambc6cc8e2014-11-14 17:56:29536 configs += [
brettwd1c719a2015-02-19 23:17:04537 "//build/config/compiler:no_size_t_to_int_warning",
jambc6cc8e2014-11-14 17:56:29538 "//build/config/compiler:wexit_time_destructors",
jambc6cc8e2014-11-14 17:56:29539 ]
[email protected]4625ade2014-04-15 19:26:44540 deps = [
541 ":net",
542 "//base",
543 ]
544}
545
[email protected]8603c5de2014-04-16 20:34:31546executable("dump_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24547 testonly = true
[email protected]8603c5de2014-04-16 20:34:31548 sources = [
[email protected]8603c5de2014-04-16 20:34:31549 "tools/dump_cache/dump_cache.cc",
550 "tools/dump_cache/dump_files.cc",
551 "tools/dump_cache/dump_files.h",
[email protected]8603c5de2014-04-16 20:34:31552 ]
[email protected]4625ade2014-04-15 19:26:44553
brettwd1c719a2015-02-19 23:17:04554 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
555 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31556
557 deps = [
[email protected]8603c5de2014-04-16 20:34:31558 ":net",
[email protected]b2b2bf52014-05-28 20:26:57559 ":test_support",
brettwba7a73d2015-08-31 22:17:39560 "//base",
561 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31562 ]
563}
564
[email protected]b2b2bf52014-05-28 20:26:57565source_set("test_support") {
Brett Wilson8f80ad0b2014-09-08 19:50:24566 testonly = true
[email protected]8603c5de2014-04-16 20:34:31567 sources = [
[email protected]8603c5de2014-04-16 20:34:31568 "base/load_timing_info_test_util.cc",
569 "base/load_timing_info_test_util.h",
570 "base/mock_file_stream.cc",
571 "base/mock_file_stream.h",
572 "base/test_completion_callback.cc",
573 "base/test_completion_callback.h",
574 "base/test_data_directory.cc",
575 "base/test_data_directory.h",
576 "cert/mock_cert_verifier.cc",
577 "cert/mock_cert_verifier.h",
578 "cookies/cookie_monster_store_test.cc",
579 "cookies/cookie_monster_store_test.h",
580 "cookies/cookie_store_test_callbacks.cc",
581 "cookies/cookie_store_test_callbacks.h",
582 "cookies/cookie_store_test_helpers.cc",
583 "cookies/cookie_store_test_helpers.h",
drogerfd8b2772015-12-04 14:34:56584 "cookies/cookie_store_unittest.h",
[email protected]8603c5de2014-04-16 20:34:31585 "disk_cache/disk_cache_test_base.cc",
586 "disk_cache/disk_cache_test_base.h",
587 "disk_cache/disk_cache_test_util.cc",
588 "disk_cache/disk_cache_test_util.h",
589 "dns/dns_test_util.cc",
590 "dns/dns_test_util.h",
591 "dns/mock_host_resolver.cc",
592 "dns/mock_host_resolver.h",
593 "dns/mock_mdns_socket_factory.cc",
594 "dns/mock_mdns_socket_factory.h",
[email protected]8a3f8242014-06-05 18:05:12595 "http/http_transaction_test_util.cc",
596 "http/http_transaction_test_util.h",
vishal.b62985ca92015-04-17 08:45:51597 "log/test_net_log.cc",
598 "log/test_net_log.h",
mmenke43758e62015-05-04 21:09:46599 "log/test_net_log_entry.cc",
600 "log/test_net_log_entry.h",
mmenke0034c542015-05-05 22:34:59601 "log/test_net_log_util.cc",
mmenke43758e62015-05-04 21:09:46602 "log/test_net_log_util.h",
[email protected]8603c5de2014-04-16 20:34:31603 "proxy/mock_proxy_resolver.cc",
604 "proxy/mock_proxy_resolver.h",
605 "proxy/mock_proxy_script_fetcher.cc",
606 "proxy/mock_proxy_script_fetcher.h",
607 "proxy/proxy_config_service_common_unittest.cc",
608 "proxy/proxy_config_service_common_unittest.h",
609 "socket/socket_test_util.cc",
610 "socket/socket_test_util.h",
611 "test/cert_test_util.cc",
612 "test/cert_test_util.h",
[email protected]83e1ae32014-07-18 10:57:07613 "test/cert_test_util_nss.cc",
nharper2e171cf2015-06-01 20:29:23614 "test/channel_id_test_util.cc",
615 "test/channel_id_test_util.h",
[email protected]8603c5de2014-04-16 20:34:31616 "test/ct_test_util.cc",
617 "test/ct_test_util.h",
svaldez7d25c562015-10-30 19:09:45618 "test/embedded_test_server/default_handlers.cc",
619 "test/embedded_test_server/default_handlers.h",
[email protected]8603c5de2014-04-16 20:34:31620 "test/embedded_test_server/embedded_test_server.cc",
621 "test/embedded_test_server/embedded_test_server.h",
622 "test/embedded_test_server/http_connection.cc",
623 "test/embedded_test_server/http_connection.h",
624 "test/embedded_test_server/http_request.cc",
625 "test/embedded_test_server/http_request.h",
626 "test/embedded_test_server/http_response.cc",
627 "test/embedded_test_server/http_response.h",
svaldez6e7e82a22015-10-28 19:39:53628 "test/embedded_test_server/request_handler_util.cc",
629 "test/embedded_test_server/request_handler_util.h",
sammc6ac3fe52015-02-25 06:00:28630 "test/event_waiter.h",
[email protected]8603c5de2014-04-16 20:34:31631 "test/net_test_suite.cc",
632 "test/net_test_suite.h",
633 "test/python_utils.cc",
634 "test/python_utils.h",
brettw6315e032015-11-27 18:38:36635 "test/test_certificate_data.h",
sherouk51b4b098b2015-08-10 09:00:43636 "test/url_request/ssl_certificate_error_job.cc",
637 "test/url_request/ssl_certificate_error_job.h",
Brett Wilson32ce17a2014-11-10 17:45:30638 "test/url_request/url_request_failed_job.cc",
639 "test/url_request/url_request_failed_job.h",
mef3e826cf2014-12-13 18:40:40640 "test/url_request/url_request_mock_data_job.cc",
641 "test/url_request/url_request_mock_data_job.h",
jam8e45cd72015-01-20 16:33:44642 "test/url_request/url_request_slow_download_job.cc",
643 "test/url_request/url_request_slow_download_job.h",
[email protected]8603c5de2014-04-16 20:34:31644 "url_request/test_url_fetcher_factory.cc",
645 "url_request/test_url_fetcher_factory.h",
646 "url_request/url_request_test_util.cc",
647 "url_request/url_request_test_util.h",
648 ]
sherouk3eee4a82015-09-01 10:42:33649 if (!is_ios) {
650 sources += [
651 "test/spawned_test_server/base_test_server.cc",
652 "test/spawned_test_server/base_test_server.h",
653 "test/spawned_test_server/local_test_server.cc",
654 "test/spawned_test_server/local_test_server.h",
655 "test/spawned_test_server/local_test_server_posix.cc",
656 "test/spawned_test_server/local_test_server_win.cc",
657 "test/spawned_test_server/spawned_test_server.h",
658 ]
659 }
[email protected]8603c5de2014-04-16 20:34:31660
brettwbc8b2a22015-07-28 18:24:42661 configs += [
662 "//build/config:precompiled_headers",
663
664 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
665 "//build/config/compiler:no_size_t_to_int_warning",
666 ]
[email protected]8603c5de2014-04-16 20:34:31667
Brett Wilsone53895272014-09-23 23:41:46668 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31669 "//base",
670 "//base/test:test_support",
[email protected]22fe91d2014-08-12 17:07:12671 "//crypto",
[email protected]59ff2d42014-04-22 22:25:23672 "//net",
[email protected]8603c5de2014-04-16 20:34:31673 "//net/tools/tld_cleanup",
674 "//testing/gmock",
675 "//testing/gtest",
676 "//url",
677 ]
678
jamb533b7e2015-03-04 17:12:05679 if (!is_ios) {
680 public_deps += [ "//third_party/protobuf:py_proto" ]
681 }
682
davidben4a644b02015-07-01 19:34:55683 if (use_nss_certs || is_ios) {
scottmg34fb7e52014-12-03 23:27:24684 public_deps += [ "//crypto:platform" ]
[email protected]8603c5de2014-04-16 20:34:31685 }
686
sherouk3eee4a82015-09-01 10:42:33687 if (is_android) {
688 sources += [
[email protected]8603c5de2014-04-16 20:34:31689 "test/spawned_test_server/remote_test_server.cc",
690 "test/spawned_test_server/remote_test_server.h",
691 "test/spawned_test_server/spawner_communicator.cc",
692 "test/spawned_test_server/spawner_communicator.h",
693 ]
694 }
695
696 if (use_v8_in_net) {
Brett Wilsone53895272014-09-23 23:41:46697 public_deps += [ ":net_with_v8" ]
[email protected]8603c5de2014-04-16 20:34:31698 }
699
700 if (!enable_mdns) {
701 sources -= [
702 "dns/mock_mdns_socket_factory.cc",
703 "dns/mock_mdns_socket_factory.h",
704 ]
705 }
706
davidben15d69d482014-09-29 18:24:08707 if (!use_nss_certs) {
scottmg34fb7e52014-12-03 23:27:24708 sources -= [ "test/cert_test_util_nss.cc" ]
[email protected]83e1ae32014-07-18 10:57:07709 }
xunjielia6888202015-04-14 21:34:25710
711 if (!disable_file_support) {
712 sources += [
713 "test/url_request/url_request_mock_http_job.cc",
714 "test/url_request/url_request_mock_http_job.h",
715 "url_request/test_url_request_interceptor.cc",
716 "url_request/test_url_request_interceptor.h",
717 ]
718 }
[email protected]8603c5de2014-04-16 20:34:31719}
720
[email protected]ceeaac792014-06-25 05:14:43721source_set("balsa") {
722 sources = [
723 "tools/balsa/balsa_enums.h",
724 "tools/balsa/balsa_frame.cc",
725 "tools/balsa/balsa_frame.h",
726 "tools/balsa/balsa_headers.cc",
727 "tools/balsa/balsa_headers.h",
728 "tools/balsa/balsa_headers_token_utils.cc",
729 "tools/balsa/balsa_headers_token_utils.h",
730 "tools/balsa/balsa_visitor_interface.h",
731 "tools/balsa/http_message_constants.cc",
732 "tools/balsa/http_message_constants.h",
733 "tools/balsa/noop_balsa_visitor.h",
734 "tools/balsa/simple_buffer.cc",
735 "tools/balsa/simple_buffer.h",
736 "tools/balsa/split.cc",
737 "tools/balsa/split.h",
738 "tools/balsa/string_piece_utils.h",
rtennetie0ee6eb2015-05-01 00:55:09739 "tools/quic/spdy_balsa_utils.cc",
740 "tools/quic/spdy_balsa_utils.h",
[email protected]ceeaac792014-06-25 05:14:43741 ]
742 deps = [
743 ":net",
744 "//base",
[email protected]22fe91d2014-08-12 17:07:12745 "//url",
[email protected]ceeaac792014-06-25 05:14:43746 ]
747}
748
[email protected]8603c5de2014-04-16 20:34:31749if (use_v8_in_net) {
750 component("net_with_v8") {
751 sources = [
752 "proxy/proxy_resolver_v8.cc",
753 "proxy/proxy_resolver_v8.h",
754 "proxy/proxy_resolver_v8_tracing.cc",
755 "proxy/proxy_resolver_v8_tracing.h",
sammcf2d1ea02015-06-29 02:58:47756 "proxy/proxy_resolver_v8_tracing_wrapper.cc",
757 "proxy/proxy_resolver_v8_tracing_wrapper.h",
[email protected]8603c5de2014-04-16 20:34:31758 "proxy/proxy_service_v8.cc",
759 "proxy/proxy_service_v8.h",
760 ]
761
762 defines = [ "NET_IMPLEMENTATION" ]
dprankea22b0732015-10-21 21:15:11763
[email protected]8603c5de2014-04-16 20:34:31764 configs += [
brettwd1c719a2015-02-19 23:17:04765 "//build/config/compiler:no_size_t_to_int_warning",
[email protected]8603c5de2014-04-16 20:34:31766 "//build/config/compiler:wexit_time_destructors",
dprankea22b0732015-10-21 21:15:11767 "//v8:external_startup_data",
[email protected]8603c5de2014-04-16 20:34:31768 ]
769
Brett Wilsone53895272014-09-23 23:41:46770 public_deps = [
[email protected]8603c5de2014-04-16 20:34:31771 ":net",
Brett Wilsone53895272014-09-23 23:41:46772 ]
773 deps = [
[email protected]8603c5de2014-04-16 20:34:31774 "//base",
775 "//gin",
776 "//url",
777 "//v8",
778 ]
779 }
780}
781
amistry7e6ebfdc82015-02-13 04:19:11782if (use_v8_in_net && !is_android) {
783 source_set("net_browser_services") {
784 sources = [
785 "dns/mojo_host_resolver_impl.cc",
786 "dns/mojo_host_resolver_impl.h",
amistry6e1ed1b2015-03-12 05:24:01787 "proxy/in_process_mojo_proxy_resolver_factory.cc",
788 "proxy/in_process_mojo_proxy_resolver_factory.h",
sammc1d5df4d2015-05-05 05:06:17789 "proxy/mojo_proxy_resolver_factory.h",
eromandcacef22015-06-01 19:36:35790 "proxy/proxy_resolver_factory_mojo.cc",
791 "proxy/proxy_resolver_factory_mojo.h",
amistry6e1ed1b2015-03-12 05:24:01792 "proxy/proxy_service_mojo.cc",
793 "proxy/proxy_service_mojo.h",
amistry7e6ebfdc82015-02-13 04:19:11794 ]
795
796 public_deps = [
797 ":mojo_type_converters",
tfarina8ac4d17f2015-12-16 02:11:11798 ":net_with_v8",
brettwbc44c0a92015-02-20 22:30:39799 "//base",
amistry07ff1402015-03-10 07:34:07800 "//mojo/common",
rockot85dce0862015-11-13 01:33:59801 "//mojo/public/cpp/bindings",
amistry7e6ebfdc82015-02-13 04:19:11802 "//net/interfaces",
amistry6e1ed1b2015-03-12 05:24:01803
804 # NOTE(amistry): As long as we support in-process Mojo v8 PAC, we need
805 # this dependency since in_process_mojo_proxy_resolver_factory creates
806 # the utility process side Mojo services in the browser process.
807 # Ultimately, this will go away when we only support out-of-process.
808 ":net_utility_services",
amistry7e6ebfdc82015-02-13 04:19:11809 ]
810 }
811
812 source_set("mojo_type_converters") {
813 sources = [
amistry7ec58112015-02-26 06:03:00814 "dns/mojo_host_type_converters.cc",
815 "dns/mojo_host_type_converters.h",
816 "proxy/mojo_proxy_type_converters.cc",
817 "proxy/mojo_proxy_type_converters.h",
amistry7e6ebfdc82015-02-13 04:19:11818 ]
819
820 public_deps = [
821 ":net",
tfarina8ac4d17f2015-12-16 02:11:11822 "//base",
rockot85dce0862015-11-13 01:33:59823 "//mojo/public/cpp/bindings",
amistry7e6ebfdc82015-02-13 04:19:11824 "//net/interfaces",
amistry7e6ebfdc82015-02-13 04:19:11825 ]
826 }
sammc5403aa1d2015-02-25 04:59:21827
828 source_set("net_utility_services") {
829 sources = [
sammc6ac3fe52015-02-25 06:00:28830 "dns/host_resolver_mojo.cc",
831 "dns/host_resolver_mojo.h",
sammc352f7492015-02-25 09:45:24832 "proxy/mojo_proxy_resolver_factory_impl.cc",
833 "proxy/mojo_proxy_resolver_factory_impl.h",
sammc5403aa1d2015-02-25 04:59:21834 "proxy/mojo_proxy_resolver_impl.cc",
835 "proxy/mojo_proxy_resolver_impl.h",
sammca3242c92015-07-10 02:38:51836 "proxy/mojo_proxy_resolver_v8_tracing_bindings.h",
sammc5403aa1d2015-02-25 04:59:21837 ]
838
rockot9509ec82015-04-14 02:50:56839 deps = [
840 ":net_with_v8",
tfarina8ac4d17f2015-12-16 02:11:11841 "//base",
rockot9509ec82015-04-14 02:50:56842 ]
843
sammc5403aa1d2015-02-25 04:59:21844 public_deps = [
845 ":mojo_type_converters",
846 ":net",
847 "//mojo/common",
rockot85dce0862015-11-13 01:33:59848 "//mojo/public/cpp/bindings",
sammc5403aa1d2015-02-25 04:59:21849 "//net/interfaces",
sammc5403aa1d2015-02-25 04:59:21850 ]
851 }
amistry7e6ebfdc82015-02-13 04:19:11852}
853
[email protected]8603c5de2014-04-16 20:34:31854if (!is_ios && !is_android) {
855 executable("crash_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:24856 testonly = true
scottmg34fb7e52014-12-03 23:27:24857 sources = [
858 "tools/crash_cache/crash_cache.cc",
859 ]
dpranke43276212015-02-20 02:55:19860
brettwd1c719a2015-02-19 23:17:04861 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
862 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31863 deps = [
864 ":net",
[email protected]b2b2bf52014-05-28 20:26:57865 ":test_support",
[email protected]8603c5de2014-04-16 20:34:31866 "//base",
brettwba7a73d2015-08-31 22:17:39867 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31868 ]
869 }
870
871 executable("crl_set_dump") {
Brett Wilson8f80ad0b2014-09-08 19:50:24872 testonly = true
scottmg34fb7e52014-12-03 23:27:24873 sources = [
874 "tools/crl_set_dump/crl_set_dump.cc",
875 ]
dpranke43276212015-02-20 02:55:19876
brettwd1c719a2015-02-19 23:17:04877 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
878 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31879 deps = [
880 ":net",
881 "//base",
brettwba7a73d2015-08-31 22:17:39882 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31883 ]
884 }
885
886 executable("dns_fuzz_stub") {
Brett Wilson8f80ad0b2014-09-08 19:50:24887 testonly = true
scottmg34fb7e52014-12-03 23:27:24888 sources = [
889 "tools/dns_fuzz_stub/dns_fuzz_stub.cc",
890 ]
dpranke43276212015-02-20 02:55:19891
brettwd1c719a2015-02-19 23:17:04892 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
893 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31894 deps = [
895 ":net",
896 "//base",
brettwba7a73d2015-08-31 22:17:39897 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31898 ]
899 }
900
901 executable("gdig") {
Brett Wilson8f80ad0b2014-09-08 19:50:24902 testonly = true
[email protected]8603c5de2014-04-16 20:34:31903 sources = [
904 "tools/gdig/file_net_log.cc",
905 "tools/gdig/gdig.cc",
906 ]
907 deps = [
908 ":net",
909 "//base",
brettwba7a73d2015-08-31 22:17:39910 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31911 ]
912 }
913
914 executable("get_server_time") {
Brett Wilson8f80ad0b2014-09-08 19:50:24915 testonly = true
scottmg34fb7e52014-12-03 23:27:24916 sources = [
917 "tools/get_server_time/get_server_time.cc",
918 ]
dpranke43276212015-02-20 02:55:19919
brettwd1c719a2015-02-19 23:17:04920 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
921 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:31922 deps = [
923 ":net",
924 "//base",
925 "//base:i18n",
brettwba7a73d2015-08-31 22:17:39926 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31927 "//url",
928 ]
929 }
930
rockot9c67e5f2015-03-12 20:01:21931 executable("hpack_example_generator") {
932 testonly = true
933 sources = [
934 "spdy/fuzzing/hpack_example_generator.cc",
935 ]
936
937 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
938 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
939 deps = [
rockot9c67e5f2015-03-12 20:01:21940 ":net",
brettwba7a73d2015-08-31 22:17:39941 "//base",
942 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21943 ]
944 }
945
946 executable("hpack_fuzz_mutator") {
947 testonly = true
948 sources = [
949 "spdy/fuzzing/hpack_fuzz_mutator.cc",
950 ]
951
952 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
953 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
954 deps = [
rockot9c67e5f2015-03-12 20:01:21955 ":net",
brettwba7a73d2015-08-31 22:17:39956 "//base",
957 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21958 ]
959 }
960
961 executable("hpack_fuzz_wrapper") {
962 testonly = true
963 sources = [
964 "spdy/fuzzing/hpack_fuzz_wrapper.cc",
965 ]
966
967 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
968 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
969 deps = [
rockot9c67e5f2015-03-12 20:01:21970 ":net",
brettwba7a73d2015-08-31 22:17:39971 "//base",
972 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:21973 ]
974 }
975
[email protected]8603c5de2014-04-16 20:34:31976 if (use_v8_in_net) {
977 executable("net_watcher") {
Brett Wilson8f80ad0b2014-09-08 19:50:24978 testonly = true
scottmg34fb7e52014-12-03 23:27:24979 sources = [
980 "tools/net_watcher/net_watcher.cc",
981 ]
[email protected]8603c5de2014-04-16 20:34:31982 deps = [
983 ":net",
984 ":net_with_v8",
985 "//base",
brettwba7a73d2015-08-31 22:17:39986 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:31987 ]
988
mostynbbf5e6cc2015-10-21 07:53:31989 if (is_desktop_linux && use_gconf && use_glib) {
xunjieli905496a2015-08-31 15:51:17990 configs += [
991 "//build/config/linux:gconf",
992 "//build/config/linux:glib",
993 ]
dprankead0c1f42015-08-28 21:48:04994 deps += [ "//build/linux:gio" ]
[email protected]8603c5de2014-04-16 20:34:31995 }
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 = [
[email protected]b2b2bf52014-05-28 20:26:571005 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311006 "//base",
1007 "//base/test:test_support",
brettwba7a73d2015-08-31 22:17:391008 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311009 "//testing/gtest",
1010 ]
1011 }
1012
1013 executable("stress_cache") {
Brett Wilson8f80ad0b2014-09-08 19:50:241014 testonly = true
scottmg34fb7e52014-12-03 23:27:241015 sources = [
rvargase23fcf652015-03-04 19:59:221016 "tools/stress_cache/stress_cache.cc",
scottmg34fb7e52014-12-03 23:27:241017 ]
dpranke43276212015-02-20 02:55:191018
brettwd1c719a2015-02-19 23:17:041019 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1020 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
[email protected]8603c5de2014-04-16 20:34:311021 deps = [
1022 ":net",
[email protected]b2b2bf52014-05-28 20:26:571023 ":test_support",
[email protected]8603c5de2014-04-16 20:34:311024 "//base",
brettwba7a73d2015-08-31 22:17:391025 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311026 ]
1027 }
1028
1029 executable("tld_cleanup") {
scottmg34fb7e52014-12-03 23:27:241030 sources = [
1031 "tools/tld_cleanup/tld_cleanup.cc",
1032 ]
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 "//base",
1038 "//base:i18n",
brettwba7a73d2015-08-31 22:17:391039 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311040 "//net/tools/tld_cleanup",
1041 ]
1042 }
1043}
1044
rch6983a3f2015-03-30 03:47:281045if (is_linux) {
[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 ]
1051 deps = [
1052 ":net",
1053 "//base",
1054 ]
1055 }
1056
[email protected]8a3f8242014-06-05 18:05:121057 static_library("flip_in_mem_edsm_server_base") {
Brett Wilson8f80ad0b2014-09-08 19:50:241058 testonly = true
[email protected]8603c5de2014-04-16 20:34:311059 sources = [
[email protected]8603c5de2014-04-16 20:34:311060 "tools/flip_server/acceptor_thread.cc",
satorux933fc7a2015-02-13 07:09:101061 "tools/flip_server/acceptor_thread.h",
1062 "tools/flip_server/constants.h",
[email protected]8603c5de2014-04-16 20:34:311063 "tools/flip_server/create_listener.cc",
1064 "tools/flip_server/create_listener.h",
[email protected]8603c5de2014-04-16 20:34:311065 "tools/flip_server/flip_config.cc",
1066 "tools/flip_server/flip_config.h",
1067 "tools/flip_server/http_interface.cc",
1068 "tools/flip_server/http_interface.h",
[email protected]8603c5de2014-04-16 20:34:311069 "tools/flip_server/mem_cache.cc",
satorux933fc7a2015-02-13 07:09:101070 "tools/flip_server/mem_cache.h",
[email protected]8603c5de2014-04-16 20:34:311071 "tools/flip_server/output_ordering.cc",
1072 "tools/flip_server/output_ordering.h",
1073 "tools/flip_server/ring_buffer.cc",
1074 "tools/flip_server/ring_buffer.h",
1075 "tools/flip_server/sm_connection.cc",
1076 "tools/flip_server/sm_connection.h",
1077 "tools/flip_server/sm_interface.h",
[email protected]8603c5de2014-04-16 20:34:311078 "tools/flip_server/spdy_interface.cc",
1079 "tools/flip_server/spdy_interface.h",
satorux933fc7a2015-02-13 07:09:101080 "tools/flip_server/spdy_ssl.cc",
1081 "tools/flip_server/spdy_ssl.h",
[email protected]8603c5de2014-04-16 20:34:311082 "tools/flip_server/spdy_util.cc",
1083 "tools/flip_server/spdy_util.h",
1084 "tools/flip_server/streamer_interface.cc",
1085 "tools/flip_server/streamer_interface.h",
rvargas145310f2015-08-14 18:09:041086 "tools/flip_server/url_to_filename_encoder.cc",
1087 "tools/flip_server/url_to_filename_encoder.h",
1088 "tools/flip_server/url_utilities.cc",
1089 "tools/flip_server/url_utilities.h",
[email protected]8603c5de2014-04-16 20:34:311090 ]
1091 deps = [
1092 ":balsa",
1093 ":epoll_server",
1094 ":net",
1095 "//base",
[email protected]edfd0f42014-07-22 18:20:371096 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311097 ]
1098 }
1099
1100 executable("flip_in_mem_edsm_server_unittests") {
Brett Wilson8f80ad0b2014-09-08 19:50:241101 testonly = true
[email protected]8603c5de2014-04-16 20:34:311102 sources = [
1103 "tools/flip_server/flip_test_utils.cc",
1104 "tools/flip_server/flip_test_utils.h",
1105 "tools/flip_server/http_interface_test.cc",
1106 "tools/flip_server/mem_cache_test.cc",
1107 "tools/flip_server/run_all_tests.cc",
1108 "tools/flip_server/spdy_interface_test.cc",
rvargas145310f2015-08-14 18:09:041109 "tools/flip_server/url_to_filename_encoder_unittest.cc",
1110 "tools/flip_server/url_utilities_unittest.cc",
[email protected]8603c5de2014-04-16 20:34:311111 ]
1112 deps = [
brettwbc44c0a92015-02-20 22:30:391113 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311114 ":flip_in_mem_edsm_server_base",
1115 ":net",
[email protected]b2b2bf52014-05-28 20:26:571116 ":test_support",
brettwba7a73d2015-08-31 22:17:391117 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311118 "//testing/gmock",
agrieved7a71c882015-11-20 19:53:281119 "//testing/gtest",
[email protected]edfd0f42014-07-22 18:20:371120 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311121 ]
1122 }
1123
1124 executable("flip_in_mem_edsm_server") {
Brett Wilson8f80ad0b2014-09-08 19:50:241125 testonly = true
scottmg34fb7e52014-12-03 23:27:241126 sources = [
1127 "tools/flip_server/flip_in_mem_edsm_server.cc",
1128 ]
[email protected]8603c5de2014-04-16 20:34:311129 deps = [
brettwbc44c0a92015-02-20 22:30:391130 ":balsa",
[email protected]8603c5de2014-04-16 20:34:311131 ":flip_in_mem_edsm_server_base",
1132 ":net",
1133 "//base",
brettwba7a73d2015-08-31 22:17:391134 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311135 ]
1136 }
1137
rch216445c2015-03-27 00:23:281138 source_set("epoll_quic_tools") {
[email protected]8603c5de2014-04-16 20:34:311139 sources = [
1140 "tools/quic/quic_client.cc",
1141 "tools/quic/quic_client.h",
[email protected]8603c5de2014-04-16 20:34:311142 "tools/quic/quic_default_packet_writer.cc",
1143 "tools/quic/quic_default_packet_writer.h",
[email protected]8603c5de2014-04-16 20:34:311144 "tools/quic/quic_epoll_clock.cc",
1145 "tools/quic/quic_epoll_clock.h",
1146 "tools/quic/quic_epoll_connection_helper.cc",
1147 "tools/quic/quic_epoll_connection_helper.h",
rtennetifb3fa6c2015-03-16 23:04:551148 "tools/quic/quic_packet_reader.cc",
1149 "tools/quic/quic_packet_reader.h",
[email protected]8603c5de2014-04-16 20:34:311150 "tools/quic/quic_packet_writer_wrapper.cc",
1151 "tools/quic/quic_packet_writer_wrapper.h",
1152 "tools/quic/quic_server.cc",
1153 "tools/quic/quic_server.h",
[email protected]8603c5de2014-04-16 20:34:311154 "tools/quic/quic_socket_utils.cc",
1155 "tools/quic/quic_socket_utils.h",
[email protected]8603c5de2014-04-16 20:34:311156 ]
1157 deps = [
1158 ":balsa",
1159 ":epoll_server",
1160 ":net",
tfarina8ac4d17f2015-12-16 02:11:111161 ":simple_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311162 "//base",
1163 "//base/third_party/dynamic_annotations",
1164 "//crypto",
[email protected]edfd0f42014-07-22 18:20:371165 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311166 "//url",
1167 ]
1168 }
1169
rch216445c2015-03-27 00:23:281170 executable("epoll_quic_client") {
scottmg34fb7e52014-12-03 23:27:241171 sources = [
1172 "tools/quic/quic_client_bin.cc",
1173 ]
[email protected]8603c5de2014-04-16 20:34:311174 deps = [
brettwbc44c0a92015-02-20 22:30:391175 ":balsa",
rch216445c2015-03-27 00:23:281176 ":epoll_quic_tools",
agrieved7a71c882015-11-20 19:53:281177 ":epoll_server",
rch216445c2015-03-27 00:23:281178 ":net",
1179 ":simple_quic_tools",
1180 "//base",
brettwba7a73d2015-08-31 22:17:391181 "//build/config/sanitizers:deps",
rch216445c2015-03-27 00:23:281182 "//third_party/boringssl",
1183 ]
1184 }
1185
1186 executable("epoll_quic_server") {
1187 sources = [
1188 "tools/quic/quic_server_bin.cc",
1189 ]
1190 deps = [
1191 ":balsa",
rch216445c2015-03-27 00:23:281192 ":epoll_quic_tools",
agrieved7a71c882015-11-20 19:53:281193 ":epoll_server",
[email protected]8603c5de2014-04-16 20:34:311194 ":net",
rchda78df5a2015-03-22 05:16:371195 ":simple_quic_tools",
[email protected]8603c5de2014-04-16 20:34:311196 "//base",
brettwba7a73d2015-08-31 22:17:391197 "//build/config/sanitizers:deps",
[email protected]edfd0f42014-07-22 18:20:371198 "//third_party/boringssl",
[email protected]8603c5de2014-04-16 20:34:311199 ]
1200 }
[email protected]8603c5de2014-04-16 20:34:311201}
1202
[email protected]ef0eb442014-05-15 09:32:181203if (is_android) {
1204 generate_jni("net_jni_headers") {
1205 sources = [
1206 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1207 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1208 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
tbansal59a1ddc2015-09-14 17:35:011209 "android/java/src/org/chromium/net/AndroidTrafficStats.java",
[email protected]ef0eb442014-05-15 09:32:181210 "android/java/src/org/chromium/net/GURLUtils.java",
aberentec894a52015-07-09 14:45:531211 "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java",
xunjieli905496a2015-08-31 15:51:171212 "android/java/src/org/chromium/net/NetStringUtil.java",
[email protected]ef0eb442014-05-15 09:32:181213 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1214 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1215 "android/java/src/org/chromium/net/X509Util.java",
1216 ]
1217 jni_package = "net"
1218 }
cjhopmandad5f4272014-09-05 01:00:551219 generate_jni("net_test_jni_headers") {
1220 sources = [
1221 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
aberentec894a52015-07-09 14:45:531222 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator.java",
jbudorickccffb982015-12-22 01:21:351223 "test/android/javatests/src/org/chromium/net/test/EmbeddedTestServerImpl.java",
cjhopmandad5f4272014-09-05 01:00:551224 ]
brettwcdccaf02015-07-27 16:27:091225 jni_package = "net/test"
cjhopmandad5f4272014-09-05 01:00:551226 }
[email protected]ef0eb442014-05-15 09:32:181227}
[email protected]8603c5de2014-04-16 20:34:311228
1229if (is_android || is_linux) {
1230 executable("disk_cache_memory_test") {
Brett Wilson8f80ad0b2014-09-08 19:50:241231 testonly = true
scottmg34fb7e52014-12-03 23:27:241232 sources = [
1233 "tools/disk_cache_memory_test/disk_cache_memory_test.cc",
1234 ]
[email protected]8603c5de2014-04-16 20:34:311235 deps = [
1236 ":net",
1237 "//base",
brettwba7a73d2015-08-31 22:17:391238 "//build/config/sanitizers:deps",
[email protected]8603c5de2014-04-16 20:34:311239 ]
1240 }
1241}
[email protected]8a3f8242014-06-05 18:05:121242
rch47ad01f2015-03-20 21:17:231243source_set("simple_quic_tools") {
rcha9d12ce12015-03-19 23:06:491244 sources = [
rtennetid67b3a722015-08-18 05:15:311245 "tools/quic/quic_client_base.cc",
1246 "tools/quic/quic_client_base.h",
rched113b22015-03-26 04:54:051247 "tools/quic/quic_client_session.cc",
1248 "tools/quic/quic_client_session.h",
rchc99f380c2015-03-26 19:50:561249 "tools/quic/quic_dispatcher.cc",
1250 "tools/quic/quic_dispatcher.h",
rch0e945472015-03-26 15:19:211251 "tools/quic/quic_in_memory_cache.cc",
1252 "tools/quic/quic_in_memory_cache.h",
rchc99f380c2015-03-26 19:50:561253 "tools/quic/quic_per_connection_packet_writer.cc",
1254 "tools/quic/quic_per_connection_packet_writer.h",
rch0e945472015-03-26 15:19:211255 "tools/quic/quic_server_session.cc",
1256 "tools/quic/quic_server_session.h",
rcha9d12ce12015-03-19 23:06:491257 "tools/quic/quic_simple_client.cc",
1258 "tools/quic/quic_simple_client.h",
rch216445c2015-03-27 00:23:281259 "tools/quic/quic_simple_per_connection_packet_writer.cc",
1260 "tools/quic/quic_simple_per_connection_packet_writer.h",
1261 "tools/quic/quic_simple_server.cc",
1262 "tools/quic/quic_simple_server.h",
1263 "tools/quic/quic_simple_server_packet_writer.cc",
1264 "tools/quic/quic_simple_server_packet_writer.h",
danzhb7551342015-12-18 02:06:401265 "tools/quic/quic_simple_server_stream.cc",
1266 "tools/quic/quic_simple_server_stream.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_time_wait_list_manager.cc",
1270 "tools/quic/quic_time_wait_list_manager.h",
rchda78df5a2015-03-22 05:16:371271 "tools/quic/synchronous_host_resolver.cc",
1272 "tools/quic/synchronous_host_resolver.h",
rcha9d12ce12015-03-19 23:06:491273 ]
1274 deps = [
tfarina8ac4d17f2015-12-16 02:11:111275 ":balsa",
rcha9d12ce12015-03-19 23:06:491276 ":net",
1277 "//base",
rch47ad01f2015-03-20 21:17:231278 "//base/third_party/dynamic_annotations",
1279 "//url",
1280 ]
1281}
1282
ricea7afa5232015-12-01 20:55:231283action_foreach("stale_while_revalidate_experiment_domains_dafsa") {
1284 script = "//net/tools/dafsa/make_dafsa.py"
1285 sources = [
1286 "base/stale_while_revalidate_experiment_domains.gperf",
1287 ]
1288 outputs = [
1289 "${target_gen_dir}/base/{{source_name_part}}-inc.cc",
1290 ]
1291 args = [
1292 "{{source}}",
1293 rebase_path("${target_gen_dir}/base/{{source_name_part}}-inc.cc",
1294 root_build_dir),
1295 ]
1296}
1297
1298source_set("stale_while_revalidate_experiment_domains") {
1299 sources = [
1300 "base/stale_while_revalidate_experiment_domains.cc",
1301 "base/stale_while_revalidate_experiment_domains.h",
1302 ]
1303 deps = [
1304 ":net",
1305 ":stale_while_revalidate_experiment_domains_dafsa",
1306 "//base",
1307 ]
1308 configs += net_shared_configs
1309}
1310
sherouk51b4b098b2015-08-10 09:00:431311if (!is_ios) {
1312 executable("quic_client") {
1313 sources = [
1314 "tools/quic/quic_simple_client_bin.cc",
1315 ]
1316 deps = [
1317 ":net",
1318 ":simple_quic_tools",
1319 "//base",
brettwba7a73d2015-08-31 22:17:391320 "//build/config/sanitizers:deps",
sherouk51b4b098b2015-08-10 09:00:431321 "//url",
1322 ]
1323 }
1324 executable("quic_server") {
1325 sources = [
1326 "tools/quic/quic_simple_server_bin.cc",
1327 ]
1328 deps = [
1329 ":net",
1330 ":simple_quic_tools",
1331 "//base",
brettwba7a73d2015-08-31 22:17:391332 "//build/config/sanitizers:deps",
sherouk51b4b098b2015-08-10 09:00:431333 "//third_party/boringssl",
1334 "//third_party/protobuf:protobuf_lite",
1335 ]
1336 }
rch216445c2015-03-27 00:23:281337}
1338
dpranke64df2832015-07-31 22:33:361339# TODO(GYP): Delete this after we've converted everything to GN.
1340# The _run targets exist only for compatibility w/ GYP.
1341group("net_unittests_run") {
1342 testonly = true
1343 deps = [
1344 ":net_unittests",
1345 ]
1346}
1347
1348test("net_unittests") {
1349 sources = gypi_values.net_test_sources
1350
sherouk51b4b098b2015-08-10 09:00:431351 if (is_ios) {
1352 sources -= [
1353 "websockets/websocket_stream_cookie_test.cc",
1354 "websockets/websocket_stream_create_test_base.cc",
1355 "websockets/websocket_stream_create_test_base.h",
1356 ]
1357 }
1358
dpranke64df2832015-07-31 22:33:361359 configs += [
1360 "//build/config:precompiled_headers",
1361
1362 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1363 "//build/config/compiler:no_size_t_to_int_warning",
1364 ]
1365 defines = []
1366
1367 deps = [
1368 ":balsa",
1369 ":extras",
1370 ":http_server",
1371 ":net",
1372 ":simple_quic_tools",
ricea7afa5232015-12-01 20:55:231373 ":stale_while_revalidate_experiment_domains",
dpranke64df2832015-07-31 22:33:361374 ":test_support",
1375 "//base",
1376 "//base:i18n",
1377 "//base:prefs_test_support",
1378 "//base/allocator",
1379 "//base/third_party/dynamic_annotations",
1380 "//crypto",
1381 "//crypto:platform",
1382 "//crypto:test_support",
dpranke64df2832015-07-31 22:33:361383 "//net/base/registry_controlled_domains",
1384 "//sql",
1385 "//testing/gmock",
1386 "//testing/gtest",
1387 "//third_party/zlib",
1388 "//url",
1389 ]
1390
1391 data = [
1392 "data/",
1393 ]
1394
1395 if (is_linux || is_mac || is_win) {
1396 deps += [
1397 "//third_party/pyftpdlib/",
1398 "//third_party/pywebsocket/",
1399 "//third_party/tlslite/",
1400 ]
1401 data_deps = [
1402 "//third_party/pyftpdlib/",
1403 "//third_party/pywebsocket/",
1404 "//third_party/tlslite/",
1405 ]
1406 data += [
1407 "tools/testserver/",
1408 "//third_party/pyftpdlib/",
1409 "//third_party/pywebsocket/",
1410 "//third_party/tlslite/",
1411 "$root_out_dir/pyproto/google/",
dprankef497c7962015-07-31 19:46:231412 ]
1413 }
1414
dpranke64df2832015-07-31 22:33:361415 if (is_desktop_linux) {
1416 deps += [ ":epoll_quic_tools" ]
1417 }
1418 if (is_linux) {
1419 sources += gypi_values.net_linux_test_sources
1420 deps += [
1421 ":epoll_quic_tools",
1422 ":epoll_server",
1423 ":flip_in_mem_edsm_server_base",
brettwbc8b2a22015-07-28 18:24:421424 ]
dpranke64df2832015-07-31 22:33:361425 }
[email protected]8a3f8242014-06-05 18:05:121426
dpranke64df2832015-07-31 22:33:361427 if (is_mac || is_ios) {
1428 sources += gypi_values.net_base_test_mac_ios_sources
1429 }
1430
1431 if (is_chromeos) {
1432 sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
1433 }
1434
1435 if (v8_use_external_startup_data) {
1436 deps += [ "//gin" ]
1437 }
1438
1439 if (!use_nss_certs) {
1440 sources -= [
1441 "cert/nss_cert_database_unittest.cc",
1442 "ssl/client_cert_store_nss_unittest.cc",
[email protected]8a3f8242014-06-05 18:05:121443 ]
dpranke64df2832015-07-31 22:33:361444 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
davidben2bcbc6b2015-04-22 02:36:411445 sources -= [
dpranke64df2832015-07-31 22:33:361446 "cert/nss_cert_database_chromeos_unittest.cc",
1447 "cert/nss_profile_filter_chromeos_unittest.cc",
davidben2bcbc6b2015-04-22 02:36:411448 ]
brettw43ae0e12015-07-14 22:12:361449 }
[email protected]8a3f8242014-06-05 18:05:121450 }
dpranke64df2832015-07-31 22:33:361451
1452 if (use_openssl) {
dpranke64df2832015-07-31 22:33:361453 sources -= [ "quic/test_tools/crypto_test_utils_nss.cc" ]
1454 } else {
1455 sources -= [
dpranke64df2832015-07-31 22:33:361456 "quic/test_tools/crypto_test_utils_openssl.cc",
1457 "socket/ssl_client_socket_openssl_unittest.cc",
1458 "ssl/ssl_client_session_cache_openssl_unittest.cc",
1459 ]
1460 }
1461
1462 if (use_kerberos) {
1463 defines += [ "USE_KERBEROS" ]
1464 }
1465
1466 # These are excluded on Android, because the actual Kerberos support, which
1467 # these test, is in a separate app on Android.
1468 if (!use_kerberos || is_android) {
1469 sources -= [
1470 "http/http_auth_gssapi_posix_unittest.cc",
1471 "http/mock_gssapi_library_posix.cc",
1472 "http/mock_gssapi_library_posix.h",
1473 ]
1474 }
1475 if (!use_kerberos) {
1476 sources -= [ "http/http_auth_handler_negotiate_unittest.cc" ]
1477 }
1478
davidbene1858d82015-12-09 02:18:401479 if (!use_nss_certs && !is_ios) {
dpranke64df2832015-07-31 22:33:361480 # Only include this test when on Posix and using NSS for
1481 # cert verification or on iOS (which also uses NSS for certs).
1482 sources -= [ "cert_net/nss_ocsp_unittest.cc" ]
1483 }
1484
1485 if (!use_openssl_certs) {
1486 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ]
1487 }
1488
1489 if (!enable_websockets) {
1490 sources -= [
1491 "server/http_connection_unittest.cc",
1492 "server/http_server_response_info_unittest.cc",
1493 "server/http_server_unittest.cc",
1494 "server/web_socket_encoder_unittest.cc",
1495 "websockets/websocket_basic_stream_test.cc",
1496 "websockets/websocket_channel_test.cc",
dprankea8d2fb92015-10-28 22:25:231497 "websockets/websocket_deflate_parameters_test.cc",
dpranke64df2832015-07-31 22:33:361498 "websockets/websocket_deflate_predictor_impl_test.cc",
1499 "websockets/websocket_deflate_stream_test.cc",
1500 "websockets/websocket_deflater_test.cc",
1501 "websockets/websocket_end_to_end_test.cc",
1502 "websockets/websocket_errors_test.cc",
1503 "websockets/websocket_extension_parser_test.cc",
dprankea8d2fb92015-10-28 22:25:231504 "websockets/websocket_extension_test.cc",
dpranke64df2832015-07-31 22:33:361505 "websockets/websocket_frame_parser_test.cc",
1506 "websockets/websocket_frame_test.cc",
1507 "websockets/websocket_handshake_challenge_test.cc",
1508 "websockets/websocket_handshake_stream_create_helper_test.cc",
1509 "websockets/websocket_inflater_test.cc",
1510 "websockets/websocket_stream_test.cc",
1511 "websockets/websocket_test_util.cc",
1512 "websockets/websocket_test_util.h",
1513 ]
1514 deps -= [ ":http_server" ]
1515 }
1516
1517 if (disable_file_support) {
1518 sources -= [
1519 "base/directory_lister_unittest.cc",
1520 "url_request/url_request_file_job_unittest.cc",
1521 ]
1522 }
1523
1524 if (disable_ftp_support) {
1525 sources -= [
1526 "ftp/ftp_auth_cache_unittest.cc",
1527 "ftp/ftp_ctrl_response_buffer_unittest.cc",
1528 "ftp/ftp_directory_listing_parser_ls_unittest.cc",
dpranke64df2832015-07-31 22:33:361529 "ftp/ftp_directory_listing_parser_unittest.cc",
1530 "ftp/ftp_directory_listing_parser_unittest.h",
1531 "ftp/ftp_directory_listing_parser_vms_unittest.cc",
1532 "ftp/ftp_directory_listing_parser_windows_unittest.cc",
1533 "ftp/ftp_network_transaction_unittest.cc",
1534 "ftp/ftp_util_unittest.cc",
1535 "url_request/url_request_ftp_job_unittest.cc",
1536 ]
1537 }
1538
xunjieli11834f02015-12-22 04:27:081539 if (!enable_bidirectional_stream) {
1540 sources -= [ "http/bidirectional_stream_unittest.cc" ]
1541 }
dpranke64df2832015-07-31 22:33:361542 if (!enable_built_in_dns) {
1543 sources -= [
1544 "dns/address_sorter_posix_unittest.cc",
1545 "dns/address_sorter_unittest.cc",
1546 ]
1547 }
1548
xunjieli905496a2015-08-31 15:51:171549 if (use_v8_in_net) {
dpranke64df2832015-07-31 22:33:361550 deps += [ ":net_with_v8" ]
1551 } else {
1552 sources -= [
1553 "proxy/proxy_resolver_v8_tracing_unittest.cc",
1554 "proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc",
1555 "proxy/proxy_resolver_v8_unittest.cc",
1556 ]
1557 }
1558
1559 if (use_v8_in_net && !is_android) {
1560 deps += [
1561 ":net_browser_services",
1562 ":net_utility_services",
1563 "//mojo/environment:chromium",
1564 "//third_party/mojo/src/mojo/edk/system",
1565 ]
1566 } else {
1567 sources -= [
1568 "dns/host_resolver_mojo_unittest.cc",
1569 "dns/mojo_host_resolver_impl_unittest.cc",
1570 "proxy/mojo_proxy_resolver_factory_impl_unittest.cc",
1571 "proxy/mojo_proxy_resolver_impl_unittest.cc",
1572 "proxy/mojo_proxy_resolver_v8_tracing_bindings_unittest.cc",
1573 "proxy/proxy_resolver_factory_mojo_unittest.cc",
1574 "proxy/proxy_service_mojo_unittest.cc",
1575 ]
1576 }
1577
1578 if (!enable_mdns) {
1579 sources -= [
1580 "dns/mdns_cache_unittest.cc",
1581 "dns/mdns_client_unittest.cc",
1582 "dns/record_parsed_unittest.cc",
1583 "dns/record_rdata_unittest.cc",
1584 ]
1585 }
1586
1587 if (is_ios) {
1588 # TODO(GYP)
1589 # 'actions': [
1590 # {
1591 # 'action_name': 'copy_test_data',
1592 # 'variables': {
1593 # 'test_data_files': [
mattm61c80732015-11-02 22:35:441594 # 'data/certificate_policies_unittest/',
mattm2c59d262015-10-29 05:33:211595 # 'data/name_constraints_unittest/',
eromanc1aac5a2015-12-18 02:23:061596 # 'data/parse_certificate_unittest/',
dpranke64df2832015-07-31 22:33:361597 # 'data/ssl/certificates/',
1598 # 'data/test.html',
1599 # 'data/url_request_unittest/',
eromanc1aac5a2015-12-18 02:23:061600 # 'data/verify_certificate_chain_unittest/',
mattm057b0152015-08-11 00:26:241601 # 'data/verify_name_match_unittest/names/',
dpranke64df2832015-07-31 22:33:361602 # ],
1603 # 'test_data_prefix': 'net',
1604 # },
1605 # 'includes': [ '../build/copy_test_data_ios.gypi' ],
1606 # },
1607 # ],
1608 sources -= [
1609 # TODO(droger): The following tests are disabled because the
1610 # implementation is missing or incomplete.
1611 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
1612 "base/keygen_handler_unittest.cc",
1613 "disk_cache/backend_unittest.cc",
1614 "disk_cache/blockfile/block_files_unittest.cc",
1615
1616 # Need to read input data files.
1617 "filter/gzip_filter_unittest.cc",
1618 "socket/ssl_server_socket_unittest.cc",
1619 "spdy/fuzzing/hpack_fuzz_util_test.cc",
1620
1621 # Need TestServer.
1622 "cert_net/cert_net_fetcher_impl_unittest.cc",
1623 "proxy/proxy_script_fetcher_impl_unittest.cc",
1624 "socket/ssl_client_socket_unittest.cc",
1625 "url_request/url_fetcher_impl_unittest.cc",
1626 "url_request/url_request_context_builder_unittest.cc",
1627
1628 # Needs GetAppOutput().
1629 "test/python_utils_unittest.cc",
1630
1631 # The following tests are disabled because they don't apply to
1632 # iOS.
1633 # OS is not "linux" or "freebsd" or "openbsd".
1634 "socket/unix_domain_client_socket_posix_unittest.cc",
1635 "socket/unix_domain_server_socket_posix_unittest.cc",
1636
1637 # See bug http://crbug.com/344533.
1638 "disk_cache/blockfile/index_table_v3_unittest.cc",
1639 ]
1640 }
1641
1642 if (is_android) {
agrieve97176362015-12-01 16:36:191643 deps += [
1644 ":net_test_jni_headers",
agrievea5517aa2015-10-23 03:03:451645 "//base:base_java_unittest_support",
1646 "//net/android:net_java",
agrievea5517aa2015-10-23 03:03:451647 "//net/android:net_java_test_support",
agrieve97176362015-12-01 16:36:191648 "//net/android:net_javatests",
agrievea5517aa2015-10-23 03:03:451649 "//net/android:net_unittests_apk_resources",
agrieve97176362015-12-01 16:36:191650
1651 # TODO(mmenke): This depends on test_support_base, which depends on
1652 # icu. Figure out a way to remove that dependency.
1653 "//testing/android/native_test:native_test_native_code",
pkotwicz8c7027d2015-11-11 06:30:071654 "//v8:v8_external_startup_data_assets",
agrievea5517aa2015-10-23 03:03:451655 ]
1656 android_manifest = "//net/android/unittest_support/AndroidManifest.xml"
dpranke64df2832015-07-31 22:33:361657 sources -= [
1658 # See bug http://crbug.com/344533.
1659 "disk_cache/blockfile/index_table_v3_unittest.cc",
dpranke64df2832015-07-31 22:33:361660 ]
dpranke64df2832015-07-31 22:33:361661 set_sources_assignment_filter([])
1662 sources += [ "base/address_tracker_linux_unittest.cc" ]
1663 set_sources_assignment_filter(sources_assignment_filter)
1664 isolate_file = "net_unittests.isolate"
1665 }
1666
dpranke64df2832015-07-31 22:33:361667 # Symbols for crashes when running tests on swarming.
1668 if (symbol_level > 0) {
1669 if (is_win) {
1670 data += [ "$root_out_dir/net_unittests.exe.pdb" ]
1671 } else if (is_mac) {
1672 data += [ "$root_out_dir/net_unittests.dSYM/" ]
1673 }
1674 }
1675}
1676
1677# !is_android && !is_win && !is_mac
[email protected]8a3f8242014-06-05 18:05:121678
rockot9c67e5f2015-03-12 20:01:211679executable("net_perftests") {
1680 testonly = true
1681 sources = [
ricea10eb9f5e2015-05-19 18:51:571682 "base/mime_sniffer_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211683 "cookies/cookie_monster_perftest.cc",
1684 "disk_cache/blockfile/disk_cache_perftest.cc",
rohitrao1860223c2015-05-16 01:07:141685 "extras/sqlite/sqlite_persistent_cookie_store_perftest.cc",
rockot9c67e5f2015-03-12 20:01:211686 "proxy/proxy_resolver_perftest.cc",
1687 "udp/udp_socket_perftest.cc",
1688 ]
1689
1690 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1691 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
1692 deps = [
brettwcdccaf02015-07-27 16:27:091693 ":extras",
1694 ":net",
1695 ":test_support",
rockot9c67e5f2015-03-12 20:01:211696 "//base",
1697 "//base:i18n",
1698 "//base/test:test_support_perf",
brettwba7a73d2015-08-31 22:17:391699 "//build/config/sanitizers:deps",
rockot9c67e5f2015-03-12 20:01:211700 "//testing/gtest",
1701 "//url",
rockot9c67e5f2015-03-12 20:01:211702 ]
1703
1704 if (enable_websockets) {
1705 sources += [ "websockets/websocket_frame_perftest.cc" ]
1706 }
1707
1708 if (use_v8_in_net) {
1709 deps += [ ":net_with_v8" ]
1710 } else {
1711 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1712 }
rockot9c67e5f2015-03-12 20:01:211713}