| OLD | NEW |
| (Empty) |
| 1 # 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 | |
| 5 import("//build/config/crypto.gni") | |
| 6 import("//build/config/features.gni") | |
| 7 import("//build/config/ui.gni") | |
| 8 import("//build/module_args/v8.gni") | |
| 9 import("//url/config.gni") | |
| 10 import("//testing/test.gni") | |
| 11 | |
| 12 # TODO(cjhopman): //build/config/android/rules.gni also imports grit_rule.gni. | |
| 13 # Currently, that file can't be imported multiple times. Make this always | |
| 14 # imported when http://crbug.com/393704 is fixed. | |
| 15 if (!is_android) { | |
| 16 import("//tools/grit/grit_rule.gni") | |
| 17 } | |
| 18 | |
| 19 if (is_android) { | |
| 20 import("//build/config/android/config.gni") | |
| 21 import("//build/config/android/rules.gni") | |
| 22 } else if (is_mac) { | |
| 23 import("//build/config/mac/mac_sdk.gni") | |
| 24 } | |
| 25 | |
| 26 # The list of net files is kept in net.gypi. Read it. | |
| 27 gypi_values = exec_script("//build/gypi_to_gn.py", | |
| 28 [ rebase_path("net.gypi") ], | |
| 29 "scope", | |
| 30 [ "net.gypi" ]) | |
| 31 | |
| 32 # Disable Kerberos on ChromeOS, Android and iOS, at least for now. It needs | |
| 33 # configuration (krb5.conf and so on). | |
| 34 use_kerberos = !is_chromeos && !is_android && !is_ios | |
| 35 | |
| 36 # The way the cache uses mmap() is inefficient on some Android devices. If | |
| 37 # this flag is set, we hackily avoid using mmap() in the disk cache. We are | |
| 38 # pretty confident that mmap-ing the index would not hurt any existing x86 | |
| 39 # android devices, but we cannot be so sure about the variety of ARM devices. | |
| 40 # So enable it for x86 only for now. | |
| 41 posix_avoid_mmap = is_android && cpu_arch != "x86" | |
| 42 | |
| 43 # WebSockets and socket stream code are used everywhere except iOS. | |
| 44 enable_websockets = !is_ios | |
| 45 use_v8_in_net = !is_ios | |
| 46 enable_built_in_dns = !is_ios | |
| 47 disable_ftp_support = is_ios | |
| 48 | |
| 49 declare_args() { | |
| 50 # Disables support for file URLs. File URL support requires use of icu. | |
| 51 disable_file_support = false | |
| 52 } | |
| 53 | |
| 54 config("net_config") { | |
| 55 defines = [] | |
| 56 if (posix_avoid_mmap) { | |
| 57 defines += [ "POSIX_AVOID_MMAP" ] | |
| 58 } | |
| 59 if (disable_file_support) { | |
| 60 defines += [ "DISABLE_FILE_SUPPORT" ] | |
| 61 } | |
| 62 } | |
| 63 | |
| 64 # Disables Windows warning about size to int truncations. | |
| 65 # TODO(jschuh): crbug.com/167187 fix this and delete this config. | |
| 66 config("net_win_size_truncation") { | |
| 67 if (is_win) { | |
| 68 cflags = [ "/wd4267" ] | |
| 69 } | |
| 70 } | |
| 71 | |
| 72 component("net") { | |
| 73 sources = | |
| 74 gypi_values.net_nacl_common_sources + gypi_values.net_non_nacl_sources | |
| 75 | |
| 76 cflags = [] | |
| 77 defines = [ | |
| 78 # TODO(GYP) Note that he GYP file supports linux_link_kerberos (defaults to | |
| 79 # 0) which implies that we run pkg_config on kerberos and link to that | |
| 80 # rather than setting this define which will dynamically open it. That | |
| 81 # doesn't seem to be set in the regular builds, so we're skipping this | |
| 82 # capability here. | |
| 83 "DLOPEN_KERBEROS", | |
| 84 "NET_IMPLEMENTATION", | |
| 85 ] | |
| 86 configs += [ ":net_win_size_truncation" ] | |
| 87 public_configs = [ ":net_config" ] | |
| 88 include_dirs = [] | |
| 89 | |
| 90 public_deps = [ | |
| 91 "//crypto", | |
| 92 "//crypto:platform", | |
| 93 ] | |
| 94 deps = [ | |
| 95 ":net_resources", | |
| 96 "//base", | |
| 97 "//base:i18n", | |
| 98 "//base:prefs", | |
| 99 "//base/third_party/dynamic_annotations", | |
| 100 "//net/base/registry_controlled_domains", | |
| 101 "//sdch", | |
| 102 "//third_party/icu", | |
| 103 "//third_party/zlib", | |
| 104 "//url", | |
| 105 ] | |
| 106 | |
| 107 if (use_kerberos) { | |
| 108 defines += [ "USE_KERBEROS" ] | |
| 109 if (is_android) { | |
| 110 include_dirs += [ "/usr/include/kerberosV" ] | |
| 111 } | |
| 112 } else { | |
| 113 sources -= [ | |
| 114 "http/http_auth_gssapi_posix.cc", | |
| 115 "http/http_auth_gssapi_posix.h", | |
| 116 "http/http_auth_handler_negotiate.cc", | |
| 117 "http/http_auth_handler_negotiate.h", | |
| 118 ] | |
| 119 } | |
| 120 | |
| 121 if (is_posix) { | |
| 122 if (posix_avoid_mmap) { | |
| 123 sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ] | |
| 124 } else { | |
| 125 sources -= [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ] | |
| 126 } | |
| 127 } | |
| 128 | |
| 129 if (disable_file_support) { | |
| 130 sources -= [ | |
| 131 "base/directory_lister.cc", | |
| 132 "base/directory_lister.h", | |
| 133 "url_request/file_protocol_handler.cc", | |
| 134 "url_request/file_protocol_handler.h", | |
| 135 "url_request/url_request_file_dir_job.cc", | |
| 136 "url_request/url_request_file_dir_job.h", | |
| 137 "url_request/url_request_file_job.cc", | |
| 138 "url_request/url_request_file_job.h", | |
| 139 ] | |
| 140 } | |
| 141 | |
| 142 if (disable_ftp_support) { | |
| 143 sources -= [ | |
| 144 "ftp/ftp_auth_cache.cc", | |
| 145 "ftp/ftp_auth_cache.h", | |
| 146 "ftp/ftp_ctrl_response_buffer.cc", | |
| 147 "ftp/ftp_ctrl_response_buffer.h", | |
| 148 "ftp/ftp_directory_listing_parser.cc", | |
| 149 "ftp/ftp_directory_listing_parser.h", | |
| 150 "ftp/ftp_directory_listing_parser_ls.cc", | |
| 151 "ftp/ftp_directory_listing_parser_ls.h", | |
| 152 "ftp/ftp_directory_listing_parser_netware.cc", | |
| 153 "ftp/ftp_directory_listing_parser_netware.h", | |
| 154 "ftp/ftp_directory_listing_parser_os2.cc", | |
| 155 "ftp/ftp_directory_listing_parser_os2.h", | |
| 156 "ftp/ftp_directory_listing_parser_vms.cc", | |
| 157 "ftp/ftp_directory_listing_parser_vms.h", | |
| 158 "ftp/ftp_directory_listing_parser_windows.cc", | |
| 159 "ftp/ftp_directory_listing_parser_windows.h", | |
| 160 "ftp/ftp_network_layer.cc", | |
| 161 "ftp/ftp_network_layer.h", | |
| 162 "ftp/ftp_network_session.cc", | |
| 163 "ftp/ftp_network_session.h", | |
| 164 "ftp/ftp_network_transaction.cc", | |
| 165 "ftp/ftp_network_transaction.h", | |
| 166 "ftp/ftp_request_info.h", | |
| 167 "ftp/ftp_response_info.cc", | |
| 168 "ftp/ftp_response_info.h", | |
| 169 "ftp/ftp_server_type_histograms.cc", | |
| 170 "ftp/ftp_server_type_histograms.h", | |
| 171 "ftp/ftp_transaction.h", | |
| 172 "ftp/ftp_transaction_factory.h", | |
| 173 "ftp/ftp_util.cc", | |
| 174 "ftp/ftp_util.h", | |
| 175 "url_request/ftp_protocol_handler.cc", | |
| 176 "url_request/ftp_protocol_handler.h", | |
| 177 "url_request/url_request_ftp_job.cc", | |
| 178 "url_request/url_request_ftp_job.h", | |
| 179 ] | |
| 180 } | |
| 181 | |
| 182 if (enable_built_in_dns) { | |
| 183 defines += [ "ENABLE_BUILT_IN_DNS" ] | |
| 184 } else { | |
| 185 sources -= [ | |
| 186 "dns/address_sorter_posix.cc", | |
| 187 "dns/address_sorter_posix.h", | |
| 188 "dns/dns_client.cc", | |
| 189 ] | |
| 190 } | |
| 191 | |
| 192 if (use_openssl) { | |
| 193 sources -= [ | |
| 194 "base/nss_memio.c", | |
| 195 "base/nss_memio.h", | |
| 196 "cert/ct_log_verifier_nss.cc", | |
| 197 "cert/ct_objects_extractor_nss.cc", | |
| 198 "cert/jwk_serializer_nss.cc", | |
| 199 "cert/scoped_nss_types.h", | |
| 200 "cert/test_root_certs_nss.cc", | |
| 201 "cert/x509_util_nss.cc", | |
| 202 "cert/x509_util_nss.h", | |
| 203 "ocsp/nss_ocsp.cc", | |
| 204 "ocsp/nss_ocsp.h", | |
| 205 "quic/crypto/aead_base_decrypter_nss.cc", | |
| 206 "quic/crypto/aead_base_encrypter_nss.cc", | |
| 207 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc", | |
| 208 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc", | |
| 209 "quic/crypto/chacha20_poly1305_decrypter_nss.cc", | |
| 210 "quic/crypto/chacha20_poly1305_encrypter_nss.cc", | |
| 211 "quic/crypto/channel_id_nss.cc", | |
| 212 "quic/crypto/p256_key_exchange_nss.cc", | |
| 213 "socket/nss_ssl_util.cc", | |
| 214 "socket/nss_ssl_util.h", | |
| 215 "socket/ssl_client_socket_nss.cc", | |
| 216 "socket/ssl_client_socket_nss.h", | |
| 217 "socket/ssl_server_socket_nss.cc", | |
| 218 "socket/ssl_server_socket_nss.h", | |
| 219 ] | |
| 220 if (is_chromeos) { | |
| 221 sources -= [ | |
| 222 "cert/nss_cert_database_chromeos.cc", | |
| 223 "cert/nss_cert_database_chromeos.h", | |
| 224 "cert/nss_profile_filter_chromeos.cc", | |
| 225 "cert/nss_profile_filter_chromeos.h", | |
| 226 ] | |
| 227 } | |
| 228 if (is_linux) { | |
| 229 # These are always removed for non-Linux cases below. | |
| 230 sources -= [ | |
| 231 "base/crypto_module_nss.cc", | |
| 232 "base/keygen_handler_nss.cc", | |
| 233 "cert/cert_database_nss.cc", | |
| 234 "cert/nss_cert_database.cc", | |
| 235 "cert/nss_cert_database.h", | |
| 236 "cert/x509_certificate_nss.cc", | |
| 237 "third_party/mozilla_security_manager/nsKeygenHandler.cpp", | |
| 238 "third_party/mozilla_security_manager/nsKeygenHandler.h", | |
| 239 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp", | |
| 240 "third_party/mozilla_security_manager/nsNSSCertificateDB.h", | |
| 241 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp", | |
| 242 "third_party/mozilla_security_manager/nsPKCS12Blob.h", | |
| 243 ] | |
| 244 } | |
| 245 if (is_ios) { | |
| 246 # Always removed for !ios below. | |
| 247 sources -= [ | |
| 248 "cert/cert_verify_proc_nss.cc", | |
| 249 "cert/cert_verify_proc_nss.h", | |
| 250 ] | |
| 251 } | |
| 252 if (is_win) { | |
| 253 sources -= [ "cert/sha256_legacy_support_nss_win.cc" ] | |
| 254 } | |
| 255 } else { | |
| 256 sources -= [ | |
| 257 "base/crypto_module_openssl.cc", | |
| 258 "cert/ct_log_verifier_openssl.cc", | |
| 259 "cert/ct_objects_extractor_openssl.cc", | |
| 260 "cert/jwk_serializer_openssl.cc", | |
| 261 "cert/x509_util_openssl.cc", | |
| 262 "cert/x509_util_openssl.h", | |
| 263 "quic/crypto/aead_base_decrypter_openssl.cc", | |
| 264 "quic/crypto/aead_base_encrypter_openssl.cc", | |
| 265 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc", | |
| 266 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc", | |
| 267 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc", | |
| 268 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc", | |
| 269 "quic/crypto/channel_id_openssl.cc", | |
| 270 "quic/crypto/p256_key_exchange_openssl.cc", | |
| 271 "quic/crypto/scoped_evp_aead_ctx.cc", | |
| 272 "quic/crypto/scoped_evp_aead_ctx.h", | |
| 273 "socket/ssl_client_socket_openssl.cc", | |
| 274 "socket/ssl_client_socket_openssl.h", | |
| 275 "socket/ssl_server_socket_openssl.cc", | |
| 276 "socket/ssl_server_socket_openssl.h", | |
| 277 "socket/ssl_session_cache_openssl.cc", | |
| 278 "socket/ssl_session_cache_openssl.h", | |
| 279 "ssl/openssl_platform_key.h", | |
| 280 "ssl/openssl_ssl_util.cc", | |
| 281 "ssl/openssl_ssl_util.h", | |
| 282 ] | |
| 283 if (is_mac) { | |
| 284 sources -= [ "ssl/openssl_platform_key_mac.cc" ] | |
| 285 } | |
| 286 if (is_win) { | |
| 287 sources -= [ | |
| 288 "cert/sha256_legacy_support_openssl_win.cc", | |
| 289 "ssl/openssl_platform_key_win.cc", | |
| 290 ] | |
| 291 } | |
| 292 } | |
| 293 | |
| 294 if (!use_openssl_certs) { | |
| 295 sources -= [ | |
| 296 "base/keygen_handler_openssl.cc", | |
| 297 "base/openssl_private_key_store.h", | |
| 298 "base/openssl_private_key_store_memory.cc", | |
| 299 "cert/cert_database_openssl.cc", | |
| 300 "cert/cert_verify_proc_openssl.cc", | |
| 301 "cert/cert_verify_proc_openssl.h", | |
| 302 "cert/test_root_certs_openssl.cc", | |
| 303 "cert/x509_certificate_openssl.cc", | |
| 304 "ssl/openssl_client_key_store.cc", | |
| 305 "ssl/openssl_client_key_store.h", | |
| 306 ] | |
| 307 if (is_android) { | |
| 308 sources -= [ "base/openssl_private_key_store_android.cc" ] | |
| 309 } | |
| 310 } else if (is_android) { | |
| 311 # Android doesn't use these even when using OpenSSL. | |
| 312 sources -= [ | |
| 313 "base/openssl_private_key_store_memory.cc", | |
| 314 "cert/cert_database_openssl.cc", | |
| 315 "cert/cert_verify_proc_openssl.cc", | |
| 316 "cert/test_root_certs_openssl.cc", | |
| 317 ] | |
| 318 } | |
| 319 | |
| 320 if (use_glib && !is_chromeos) { | |
| 321 configs += [ "//build/config/linux:gconf" ] | |
| 322 deps += [ "//build/config/linux:gio" ] | |
| 323 } | |
| 324 | |
| 325 if (is_linux) { | |
| 326 configs += [ "//build/config/linux:libresolv" ] | |
| 327 } else { | |
| 328 sources -= [ | |
| 329 "base/crypto_module_nss.cc", | |
| 330 "base/keygen_handler_nss.cc", | |
| 331 "cert/cert_database_nss.cc", | |
| 332 "cert/nss_cert_database.cc", | |
| 333 "cert/nss_cert_database.h", | |
| 334 "cert/x509_certificate_nss.cc", | |
| 335 "third_party/mozilla_security_manager/nsKeygenHandler.cpp", | |
| 336 "third_party/mozilla_security_manager/nsKeygenHandler.h", | |
| 337 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp", | |
| 338 "third_party/mozilla_security_manager/nsNSSCertificateDB.h", | |
| 339 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp", | |
| 340 "third_party/mozilla_security_manager/nsPKCS12Blob.h", | |
| 341 ] | |
| 342 | |
| 343 if (!is_ios && !use_openssl) { | |
| 344 # These files are part of the partial implementation of NSS on iOS so | |
| 345 # keep them in that case. | |
| 346 sources -= [ | |
| 347 "cert/test_root_certs_nss.cc", | |
| 348 "ocsp/nss_ocsp.cc", | |
| 349 "ocsp/nss_ocsp.h", | |
| 350 ] | |
| 351 } | |
| 352 } | |
| 353 | |
| 354 if (!use_nss_certs) { | |
| 355 sources -= [ | |
| 356 "ssl/client_cert_store_nss.cc", | |
| 357 "ssl/client_cert_store_nss.h", | |
| 358 ] | |
| 359 if (!is_ios) { | |
| 360 # These files are part of the partial implementation of NSS on iOS so | |
| 361 # keep them in that case (even though use_nss_certs is not set). | |
| 362 sources -= [ | |
| 363 "cert/cert_verify_proc_nss.cc", | |
| 364 "cert/cert_verify_proc_nss.h", | |
| 365 ] | |
| 366 } | |
| 367 if (is_chromeos) { | |
| 368 # These were already removed on non-ChromeOS. | |
| 369 sources -= [ | |
| 370 "ssl/client_cert_store_chromeos.cc", | |
| 371 "ssl/client_cert_store_chromeos.h", | |
| 372 ] | |
| 373 } | |
| 374 } | |
| 375 | |
| 376 if (!enable_websockets) { | |
| 377 sources -= [ | |
| 378 "websockets/websocket_basic_handshake_stream.cc", | |
| 379 "websockets/websocket_basic_handshake_stream.h", | |
| 380 "websockets/websocket_basic_stream.cc", | |
| 381 "websockets/websocket_basic_stream.h", | |
| 382 "websockets/websocket_channel.cc", | |
| 383 "websockets/websocket_channel.h", | |
| 384 "websockets/websocket_deflate_predictor.h", | |
| 385 "websockets/websocket_deflate_predictor_impl.cc", | |
| 386 "websockets/websocket_deflate_predictor_impl.h", | |
| 387 "websockets/websocket_deflate_stream.cc", | |
| 388 "websockets/websocket_deflate_stream.h", | |
| 389 "websockets/websocket_deflater.cc", | |
| 390 "websockets/websocket_deflater.h", | |
| 391 "websockets/websocket_errors.cc", | |
| 392 "websockets/websocket_errors.h", | |
| 393 "websockets/websocket_extension.cc", | |
| 394 "websockets/websocket_extension.h", | |
| 395 "websockets/websocket_extension_parser.cc", | |
| 396 "websockets/websocket_extension_parser.h", | |
| 397 "websockets/websocket_frame.cc", | |
| 398 "websockets/websocket_frame.h", | |
| 399 "websockets/websocket_frame_parser.cc", | |
| 400 "websockets/websocket_frame_parser.h", | |
| 401 "websockets/websocket_handshake_challenge.cc", | |
| 402 "websockets/websocket_handshake_challenge.h", | |
| 403 "websockets/websocket_handshake_constants.cc", | |
| 404 "websockets/websocket_handshake_constants.h", | |
| 405 "websockets/websocket_handshake_request_info.cc", | |
| 406 "websockets/websocket_handshake_request_info.h", | |
| 407 "websockets/websocket_handshake_response_info.cc", | |
| 408 "websockets/websocket_handshake_response_info.h", | |
| 409 "websockets/websocket_handshake_stream_base.h", | |
| 410 "websockets/websocket_handshake_stream_create_helper.cc", | |
| 411 "websockets/websocket_handshake_stream_create_helper.h", | |
| 412 "websockets/websocket_inflater.cc", | |
| 413 "websockets/websocket_inflater.h", | |
| 414 "websockets/websocket_mux.h", | |
| 415 "websockets/websocket_stream.cc", | |
| 416 "websockets/websocket_stream.h", | |
| 417 ] | |
| 418 } | |
| 419 | |
| 420 if (!enable_mdns) { | |
| 421 sources -= [ | |
| 422 "dns/mdns_cache.cc", | |
| 423 "dns/mdns_cache.h", | |
| 424 "dns/mdns_client.cc", | |
| 425 "dns/mdns_client.h", | |
| 426 "dns/mdns_client_impl.cc", | |
| 427 "dns/mdns_client_impl.h", | |
| 428 "dns/record_parsed.cc", | |
| 429 "dns/record_parsed.h", | |
| 430 "dns/record_rdata.cc", | |
| 431 "dns/record_rdata.h", | |
| 432 ] | |
| 433 } | |
| 434 | |
| 435 if (is_win) { | |
| 436 sources -= [ | |
| 437 "http/http_auth_handler_ntlm_portable.cc", | |
| 438 "socket/socket_libevent.cc", | |
| 439 "socket/socket_libevent.h", | |
| 440 "socket/tcp_socket_libevent.cc", | |
| 441 "socket/tcp_socket_libevent.h", | |
| 442 "udp/udp_socket_libevent.cc", | |
| 443 "udp/udp_socket_libevent.h", | |
| 444 ] | |
| 445 } else { # !is_win | |
| 446 sources -= [ | |
| 447 "base/winsock_init.cc", | |
| 448 "base/winsock_init.h", | |
| 449 "base/winsock_util.cc", | |
| 450 "base/winsock_util.h", | |
| 451 "proxy/proxy_resolver_winhttp.cc", | |
| 452 "proxy/proxy_resolver_winhttp.h", | |
| 453 ] | |
| 454 } | |
| 455 | |
| 456 if (is_mac) { | |
| 457 libs = [ | |
| 458 "Foundation.framework", | |
| 459 "Security.framework", | |
| 460 "SystemConfiguration.framework", | |
| 461 "resolv", | |
| 462 ] | |
| 463 } | |
| 464 | |
| 465 if (is_ios) { | |
| 466 # Add back some sources that were otherwise filtered out. iOS additionally | |
| 467 # doesn't set USE_NSS but needs some of the files. | |
| 468 set_sources_assignment_filter([]) | |
| 469 sources += [ | |
| 470 "base/net_util_mac.cc", | |
| 471 "base/net_util_mac.h", | |
| 472 "base/network_change_notifier_mac.cc", | |
| 473 "base/network_config_watcher_mac.cc", | |
| 474 "base/platform_mime_util_mac.mm", | |
| 475 "cert/cert_verify_proc_nss.cc", | |
| 476 "cert/cert_verify_proc_nss.h", | |
| 477 "cert/test_root_certs_nss.cc", | |
| 478 "cert/x509_util_nss.cc", | |
| 479 "cert/x509_util_nss.h", | |
| 480 "ocsp/nss_ocsp.cc", | |
| 481 "ocsp/nss_ocsp.h", | |
| 482 "proxy/proxy_resolver_mac.cc", | |
| 483 "proxy/proxy_server_mac.cc", | |
| 484 ] | |
| 485 set_sources_assignment_filter(sources_assignment_filter) | |
| 486 | |
| 487 sources -= [ "disk_cache/blockfile/file_posix.cc" ] | |
| 488 libs = [ | |
| 489 "CFNetwork.framework", | |
| 490 "MobileCoreServices.framework", | |
| 491 "Security.framework", | |
| 492 "SystemConfiguration.framework", | |
| 493 "resolv", | |
| 494 ] | |
| 495 } | |
| 496 | |
| 497 if (is_ios || is_mac) { | |
| 498 sources += gypi_values.net_base_mac_ios_sources | |
| 499 } | |
| 500 | |
| 501 if (is_android) { | |
| 502 # Add some Linux sources that were excluded by the filter, but which | |
| 503 # are needed. | |
| 504 set_sources_assignment_filter([]) | |
| 505 sources += [ | |
| 506 "base/address_tracker_linux.cc", | |
| 507 "base/address_tracker_linux.h", | |
| 508 "base/net_util_linux.cc", | |
| 509 "base/net_util_linux.h", | |
| 510 "base/platform_mime_util_linux.cc", | |
| 511 ] | |
| 512 set_sources_assignment_filter(sources_assignment_filter) | |
| 513 | |
| 514 if (!is_android_webview_build) { | |
| 515 deps += [ ":net_jni_headers" ] | |
| 516 } | |
| 517 } | |
| 518 | |
| 519 if (use_icu_alternatives_on_android) { | |
| 520 deps -= [ | |
| 521 "//base:i18n", | |
| 522 "//third_party/icu", | |
| 523 ] | |
| 524 sources -= [ | |
| 525 "base/filename_util_icu.cc", | |
| 526 "base/net_string_util_icu.cc", | |
| 527 "base/net_util_icu.cc", | |
| 528 ] | |
| 529 sources += [ | |
| 530 "base/net_string_util_icu_alternatives_android.cc", | |
| 531 "base/net_string_util_icu_alternatives_android.h", | |
| 532 ] | |
| 533 } | |
| 534 } | |
| 535 | |
| 536 grit("net_resources") { | |
| 537 source = "base/net_resources.grd" | |
| 538 use_qualified_include = true | |
| 539 outputs = [ | |
| 540 "grit/net_resources.h", | |
| 541 "net_resources.pak", | |
| 542 "net_resources.rc", | |
| 543 ] | |
| 544 } | |
| 545 | |
| 546 if (false) { | |
| 547 | |
| 548 static_library("extras") { | |
| 549 sources = gypi_values.net_extras_sources | |
| 550 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
| 551 deps = [ | |
| 552 ":net", | |
| 553 "//sql:sql", | |
| 554 ] | |
| 555 } | |
| 556 | |
| 557 } # if (false) | |
| 558 | |
| 559 static_library("http_server") { | |
| 560 sources = [ | |
| 561 "server/http_connection.cc", | |
| 562 "server/http_connection.h", | |
| 563 "server/http_server.cc", | |
| 564 "server/http_server.h", | |
| 565 "server/http_server_request_info.cc", | |
| 566 "server/http_server_request_info.h", | |
| 567 "server/http_server_response_info.cc", | |
| 568 "server/http_server_response_info.h", | |
| 569 "server/web_socket.cc", | |
| 570 "server/web_socket.h", | |
| 571 "server/web_socket_encoder.cc", | |
| 572 "server/web_socket_encoder.h", | |
| 573 ] | |
| 574 configs += [ | |
| 575 "//build/config/compiler:wexit_time_destructors", | |
| 576 ":net_win_size_truncation", | |
| 577 ] | |
| 578 deps = [ | |
| 579 ":net", | |
| 580 "//base", | |
| 581 ] | |
| 582 } | |
| 583 | |
| 584 executable("dump_cache") { | |
| 585 testonly = true | |
| 586 sources = [ | |
| 587 "tools/dump_cache/cache_dumper.cc", | |
| 588 "tools/dump_cache/cache_dumper.h", | |
| 589 "tools/dump_cache/dump_cache.cc", | |
| 590 "tools/dump_cache/dump_files.cc", | |
| 591 "tools/dump_cache/dump_files.h", | |
| 592 "tools/dump_cache/simple_cache_dumper.cc", | |
| 593 "tools/dump_cache/simple_cache_dumper.h", | |
| 594 "tools/dump_cache/url_to_filename_encoder.cc", | |
| 595 "tools/dump_cache/url_to_filename_encoder.h", | |
| 596 "tools/dump_cache/url_utilities.cc", | |
| 597 "tools/dump_cache/url_utilities.h", | |
| 598 ] | |
| 599 | |
| 600 configs += [ ":net_win_size_truncation" ] | |
| 601 | |
| 602 deps = [ | |
| 603 "//base", | |
| 604 ":net", | |
| 605 ":test_support", | |
| 606 ] | |
| 607 } | |
| 608 | |
| 609 source_set("test_support") { | |
| 610 testonly = true | |
| 611 sources = [ | |
| 612 "base/captured_net_log_entry.cc", | |
| 613 "base/captured_net_log_entry.h", | |
| 614 "base/capturing_net_log.cc", | |
| 615 "base/capturing_net_log.h", | |
| 616 "base/capturing_net_log_observer.cc", | |
| 617 "base/capturing_net_log_observer.h", | |
| 618 "base/load_timing_info_test_util.cc", | |
| 619 "base/load_timing_info_test_util.h", | |
| 620 "base/mock_file_stream.cc", | |
| 621 "base/mock_file_stream.h", | |
| 622 "base/test_completion_callback.cc", | |
| 623 "base/test_completion_callback.h", | |
| 624 "base/test_data_directory.cc", | |
| 625 "base/test_data_directory.h", | |
| 626 "cert/mock_cert_verifier.cc", | |
| 627 "cert/mock_cert_verifier.h", | |
| 628 "cookies/cookie_monster_store_test.cc", | |
| 629 "cookies/cookie_monster_store_test.h", | |
| 630 "cookies/cookie_store_test_callbacks.cc", | |
| 631 "cookies/cookie_store_test_callbacks.h", | |
| 632 "cookies/cookie_store_test_helpers.cc", | |
| 633 "cookies/cookie_store_test_helpers.h", | |
| 634 "disk_cache/disk_cache_test_base.cc", | |
| 635 "disk_cache/disk_cache_test_base.h", | |
| 636 "disk_cache/disk_cache_test_util.cc", | |
| 637 "disk_cache/disk_cache_test_util.h", | |
| 638 "dns/dns_test_util.cc", | |
| 639 "dns/dns_test_util.h", | |
| 640 "dns/mock_host_resolver.cc", | |
| 641 "dns/mock_host_resolver.h", | |
| 642 "dns/mock_mdns_socket_factory.cc", | |
| 643 "dns/mock_mdns_socket_factory.h", | |
| 644 "http/http_transaction_test_util.cc", | |
| 645 "http/http_transaction_test_util.h", | |
| 646 "proxy/mock_proxy_resolver.cc", | |
| 647 "proxy/mock_proxy_resolver.h", | |
| 648 "proxy/mock_proxy_script_fetcher.cc", | |
| 649 "proxy/mock_proxy_script_fetcher.h", | |
| 650 "proxy/proxy_config_service_common_unittest.cc", | |
| 651 "proxy/proxy_config_service_common_unittest.h", | |
| 652 "socket/socket_test_util.cc", | |
| 653 "socket/socket_test_util.h", | |
| 654 "test/cert_test_util.cc", | |
| 655 "test/cert_test_util.h", | |
| 656 "test/cert_test_util_nss.cc", | |
| 657 "test/ct_test_util.cc", | |
| 658 "test/ct_test_util.h", | |
| 659 "test/embedded_test_server/embedded_test_server.cc", | |
| 660 "test/embedded_test_server/embedded_test_server.h", | |
| 661 "test/embedded_test_server/http_connection.cc", | |
| 662 "test/embedded_test_server/http_connection.h", | |
| 663 "test/embedded_test_server/http_request.cc", | |
| 664 "test/embedded_test_server/http_request.h", | |
| 665 "test/embedded_test_server/http_response.cc", | |
| 666 "test/embedded_test_server/http_response.h", | |
| 667 "test/net_test_suite.cc", | |
| 668 "test/net_test_suite.h", | |
| 669 "test/python_utils.cc", | |
| 670 "test/python_utils.h", | |
| 671 "test/spawned_test_server/base_test_server.cc", | |
| 672 "test/spawned_test_server/base_test_server.h", | |
| 673 "test/spawned_test_server/local_test_server.cc", | |
| 674 "test/spawned_test_server/local_test_server.h", | |
| 675 "test/spawned_test_server/local_test_server_posix.cc", | |
| 676 "test/spawned_test_server/local_test_server_win.cc", | |
| 677 "test/spawned_test_server/remote_test_server.cc", | |
| 678 "test/spawned_test_server/remote_test_server.h", | |
| 679 "test/spawned_test_server/spawned_test_server.h", | |
| 680 "test/spawned_test_server/spawner_communicator.cc", | |
| 681 "test/spawned_test_server/spawner_communicator.h", | |
| 682 "test/url_request/url_request_failed_job.cc", | |
| 683 "test/url_request/url_request_failed_job.h", | |
| 684 "test/url_request/url_request_mock_data_job.cc", | |
| 685 "test/url_request/url_request_mock_data_job.h", | |
| 686 "test/url_request/url_request_mock_http_job.cc", | |
| 687 "test/url_request/url_request_mock_http_job.h", | |
| 688 "test/url_request/url_request_slow_download_job.cc", | |
| 689 "test/url_request/url_request_slow_download_job.h", | |
| 690 "url_request/test_url_fetcher_factory.cc", | |
| 691 "url_request/test_url_fetcher_factory.h", | |
| 692 "url_request/test_url_request_interceptor.cc", | |
| 693 "url_request/test_url_request_interceptor.h", | |
| 694 "url_request/url_request_test_util.cc", | |
| 695 "url_request/url_request_test_util.h", | |
| 696 ] | |
| 697 | |
| 698 configs += [ ":net_win_size_truncation" ] | |
| 699 | |
| 700 public_deps = [ | |
| 701 "//base", | |
| 702 "//base/test:test_support", | |
| 703 "//crypto", | |
| 704 "//net", | |
| 705 "//net/tools/tld_cleanup", | |
| 706 "//testing/gmock", | |
| 707 "//testing/gtest", | |
| 708 "//url", | |
| 709 ] | |
| 710 | |
| 711 if (!use_openssl && (use_nss_certs || is_ios)) { | |
| 712 public_deps += [ "//crypto:platform" ] | |
| 713 } | |
| 714 | |
| 715 if (!is_android) { | |
| 716 sources -= [ | |
| 717 "test/spawned_test_server/remote_test_server.cc", | |
| 718 "test/spawned_test_server/remote_test_server.h", | |
| 719 "test/spawned_test_server/spawner_communicator.cc", | |
| 720 "test/spawned_test_server/spawner_communicator.h", | |
| 721 ] | |
| 722 } | |
| 723 | |
| 724 if (use_v8_in_net) { | |
| 725 public_deps += [ ":net_with_v8" ] | |
| 726 } | |
| 727 | |
| 728 if (!enable_mdns) { | |
| 729 sources -= [ | |
| 730 "dns/mock_mdns_socket_factory.cc", | |
| 731 "dns/mock_mdns_socket_factory.h", | |
| 732 ] | |
| 733 } | |
| 734 | |
| 735 if (!use_nss_certs) { | |
| 736 sources -= [ "test/cert_test_util_nss.cc" ] | |
| 737 } | |
| 738 } | |
| 739 | |
| 740 source_set("balsa") { | |
| 741 sources = [ | |
| 742 "tools/balsa/balsa_enums.h", | |
| 743 "tools/balsa/balsa_frame.cc", | |
| 744 "tools/balsa/balsa_frame.h", | |
| 745 "tools/balsa/balsa_headers.cc", | |
| 746 "tools/balsa/balsa_headers.h", | |
| 747 "tools/balsa/balsa_headers_token_utils.cc", | |
| 748 "tools/balsa/balsa_headers_token_utils.h", | |
| 749 "tools/balsa/balsa_visitor_interface.h", | |
| 750 "tools/balsa/http_message_constants.cc", | |
| 751 "tools/balsa/http_message_constants.h", | |
| 752 "tools/balsa/noop_balsa_visitor.h", | |
| 753 "tools/balsa/simple_buffer.cc", | |
| 754 "tools/balsa/simple_buffer.h", | |
| 755 "tools/balsa/split.cc", | |
| 756 "tools/balsa/split.h", | |
| 757 "tools/balsa/string_piece_utils.h", | |
| 758 "tools/quic/spdy_utils.cc", | |
| 759 "tools/quic/spdy_utils.h", | |
| 760 ] | |
| 761 deps = [ | |
| 762 ":net", | |
| 763 "//base", | |
| 764 "//url", | |
| 765 ] | |
| 766 } | |
| 767 | |
| 768 if (use_v8_in_net) { | |
| 769 component("net_with_v8") { | |
| 770 sources = [ | |
| 771 "proxy/proxy_resolver_v8.cc", | |
| 772 "proxy/proxy_resolver_v8.h", | |
| 773 "proxy/proxy_resolver_v8_tracing.cc", | |
| 774 "proxy/proxy_resolver_v8_tracing.h", | |
| 775 "proxy/proxy_service_v8.cc", | |
| 776 "proxy/proxy_service_v8.h", | |
| 777 ] | |
| 778 | |
| 779 defines = [ "NET_IMPLEMENTATION" ] | |
| 780 configs += [ | |
| 781 ":net_win_size_truncation", | |
| 782 "//build/config/compiler:wexit_time_destructors", | |
| 783 ] | |
| 784 | |
| 785 public_deps = [ | |
| 786 ":net", | |
| 787 ] | |
| 788 deps = [ | |
| 789 "//base", | |
| 790 "//gin", | |
| 791 "//url", | |
| 792 "//v8", | |
| 793 ] | |
| 794 } | |
| 795 } | |
| 796 | |
| 797 if (use_v8_in_net && !is_android) { | |
| 798 source_set("net_browser_services") { | |
| 799 sources = [ | |
| 800 "dns/mojo_host_resolver_impl.cc", | |
| 801 "dns/mojo_host_resolver_impl.h", | |
| 802 ] | |
| 803 | |
| 804 public_deps = [ | |
| 805 ":mojo_type_converters", | |
| 806 ":net", | |
| 807 "//net/interfaces", | |
| 808 "//mojo/public/cpp/bindings", | |
| 809 ] | |
| 810 } | |
| 811 | |
| 812 source_set("mojo_type_converters") { | |
| 813 sources = [ | |
| 814 "dns/mojo_type_converters.cc", | |
| 815 "dns/mojo_type_converters.h", | |
| 816 ] | |
| 817 | |
| 818 public_deps = [ | |
| 819 ":net", | |
| 820 "//net/interfaces", | |
| 821 "//mojo/public/cpp/bindings", | |
| 822 ] | |
| 823 } | |
| 824 } | |
| 825 | |
| 826 if (!is_ios && !is_android) { | |
| 827 executable("crash_cache") { | |
| 828 testonly = true | |
| 829 sources = [ | |
| 830 "tools/crash_cache/crash_cache.cc", | |
| 831 ] | |
| 832 configs += [ ":net_win_size_truncation" ] | |
| 833 deps = [ | |
| 834 ":net", | |
| 835 ":test_support", | |
| 836 "//base", | |
| 837 ] | |
| 838 } | |
| 839 | |
| 840 executable("crl_set_dump") { | |
| 841 testonly = true | |
| 842 sources = [ | |
| 843 "tools/crl_set_dump/crl_set_dump.cc", | |
| 844 ] | |
| 845 configs += [ ":net_win_size_truncation" ] | |
| 846 deps = [ | |
| 847 ":net", | |
| 848 "//base", | |
| 849 ] | |
| 850 } | |
| 851 | |
| 852 executable("dns_fuzz_stub") { | |
| 853 testonly = true | |
| 854 sources = [ | |
| 855 "tools/dns_fuzz_stub/dns_fuzz_stub.cc", | |
| 856 ] | |
| 857 configs += [ ":net_win_size_truncation" ] | |
| 858 deps = [ | |
| 859 ":net", | |
| 860 "//base", | |
| 861 ] | |
| 862 } | |
| 863 | |
| 864 executable("gdig") { | |
| 865 testonly = true | |
| 866 sources = [ | |
| 867 "tools/gdig/file_net_log.cc", | |
| 868 "tools/gdig/gdig.cc", | |
| 869 ] | |
| 870 deps = [ | |
| 871 ":net", | |
| 872 "//base", | |
| 873 ] | |
| 874 } | |
| 875 | |
| 876 executable("get_server_time") { | |
| 877 testonly = true | |
| 878 sources = [ | |
| 879 "tools/get_server_time/get_server_time.cc", | |
| 880 ] | |
| 881 configs += [ ":net_win_size_truncation" ] | |
| 882 deps = [ | |
| 883 ":net", | |
| 884 "//base", | |
| 885 "//base:i18n", | |
| 886 "//url", | |
| 887 ] | |
| 888 } | |
| 889 | |
| 890 if (use_v8_in_net) { | |
| 891 executable("net_watcher") { | |
| 892 testonly = true | |
| 893 sources = [ | |
| 894 "tools/net_watcher/net_watcher.cc", | |
| 895 ] | |
| 896 deps = [ | |
| 897 ":net", | |
| 898 ":net_with_v8", | |
| 899 "//base", | |
| 900 ] | |
| 901 | |
| 902 if (is_desktop_linux) { | |
| 903 configs += [ | |
| 904 "//build/config/linux:gconf", | |
| 905 "//build/config/linux:glib", | |
| 906 ] | |
| 907 deps += [ "//build/config/linux:gio" ] | |
| 908 } | |
| 909 } | |
| 910 } | |
| 911 | |
| 912 executable("run_testserver") { | |
| 913 testonly = true | |
| 914 sources = [ | |
| 915 "tools/testserver/run_testserver.cc", | |
| 916 ] | |
| 917 deps = [ | |
| 918 ":net", # TODO(brettw) bug 363749: this shouldn't be necessary. It's not | |
| 919 # in the GYP build, and can be removed when the bug is fixed. | |
| 920 ":test_support", | |
| 921 "//base", | |
| 922 "//base/test:test_support", | |
| 923 "//testing/gtest", | |
| 924 ] | |
| 925 } | |
| 926 | |
| 927 executable("stress_cache") { | |
| 928 testonly = true | |
| 929 sources = [ | |
| 930 "disk_cache/blockfile/stress_cache.cc", | |
| 931 ] | |
| 932 configs += [ ":net_win_size_truncation" ] | |
| 933 deps = [ | |
| 934 ":net", | |
| 935 ":test_support", | |
| 936 "//base", | |
| 937 ] | |
| 938 } | |
| 939 | |
| 940 executable("tld_cleanup") { | |
| 941 sources = [ | |
| 942 "tools/tld_cleanup/tld_cleanup.cc", | |
| 943 ] | |
| 944 configs += [ ":net_win_size_truncation" ] | |
| 945 deps = [ | |
| 946 "//base", | |
| 947 "//base:i18n", | |
| 948 "//net/tools/tld_cleanup", | |
| 949 ] | |
| 950 } | |
| 951 } | |
| 952 | |
| 953 if (is_linux) { | |
| 954 static_library("epoll_server") { | |
| 955 sources = [ | |
| 956 "tools/epoll_server/epoll_server.cc", | |
| 957 "tools/epoll_server/epoll_server.h", | |
| 958 ] | |
| 959 deps = [ | |
| 960 ":net", | |
| 961 "//base", | |
| 962 ] | |
| 963 } | |
| 964 | |
| 965 static_library("flip_in_mem_edsm_server_base") { | |
| 966 testonly = true | |
| 967 sources = [ | |
| 968 "tools/dump_cache/url_to_filename_encoder.cc", | |
| 969 "tools/dump_cache/url_to_filename_encoder.h", | |
| 970 "tools/dump_cache/url_utilities.cc", | |
| 971 "tools/dump_cache/url_utilities.h", | |
| 972 "tools/flip_server/acceptor_thread.cc", | |
| 973 "tools/flip_server/acceptor_thread.h", | |
| 974 "tools/flip_server/constants.h", | |
| 975 "tools/flip_server/create_listener.cc", | |
| 976 "tools/flip_server/create_listener.h", | |
| 977 "tools/flip_server/flip_config.cc", | |
| 978 "tools/flip_server/flip_config.h", | |
| 979 "tools/flip_server/http_interface.cc", | |
| 980 "tools/flip_server/http_interface.h", | |
| 981 "tools/flip_server/loadtime_measurement.h", | |
| 982 "tools/flip_server/mem_cache.cc", | |
| 983 "tools/flip_server/mem_cache.h", | |
| 984 "tools/flip_server/output_ordering.cc", | |
| 985 "tools/flip_server/output_ordering.h", | |
| 986 "tools/flip_server/ring_buffer.cc", | |
| 987 "tools/flip_server/ring_buffer.h", | |
| 988 "tools/flip_server/sm_connection.cc", | |
| 989 "tools/flip_server/sm_connection.h", | |
| 990 "tools/flip_server/sm_interface.h", | |
| 991 "tools/flip_server/spdy_interface.cc", | |
| 992 "tools/flip_server/spdy_interface.h", | |
| 993 "tools/flip_server/spdy_ssl.cc", | |
| 994 "tools/flip_server/spdy_ssl.h", | |
| 995 "tools/flip_server/spdy_util.cc", | |
| 996 "tools/flip_server/spdy_util.h", | |
| 997 "tools/flip_server/streamer_interface.cc", | |
| 998 "tools/flip_server/streamer_interface.h", | |
| 999 ] | |
| 1000 deps = [ | |
| 1001 ":balsa", | |
| 1002 ":epoll_server", | |
| 1003 ":net", | |
| 1004 "//base", | |
| 1005 "//third_party/boringssl", | |
| 1006 ] | |
| 1007 } | |
| 1008 | |
| 1009 executable("flip_in_mem_edsm_server_unittests") { | |
| 1010 testonly = true | |
| 1011 sources = [ | |
| 1012 "tools/flip_server/flip_test_utils.cc", | |
| 1013 "tools/flip_server/flip_test_utils.h", | |
| 1014 "tools/flip_server/http_interface_test.cc", | |
| 1015 "tools/flip_server/mem_cache_test.cc", | |
| 1016 "tools/flip_server/run_all_tests.cc", | |
| 1017 "tools/flip_server/spdy_interface_test.cc", | |
| 1018 ] | |
| 1019 deps = [ | |
| 1020 ":flip_in_mem_edsm_server_base", | |
| 1021 ":net", | |
| 1022 ":test_support", | |
| 1023 "//testing/gtest", | |
| 1024 "//testing/gmock", | |
| 1025 "//third_party/boringssl", | |
| 1026 ] | |
| 1027 } | |
| 1028 | |
| 1029 executable("flip_in_mem_edsm_server") { | |
| 1030 testonly = true | |
| 1031 sources = [ | |
| 1032 "tools/flip_server/flip_in_mem_edsm_server.cc", | |
| 1033 ] | |
| 1034 deps = [ | |
| 1035 ":flip_in_mem_edsm_server_base", | |
| 1036 ":net", | |
| 1037 "//base", | |
| 1038 ] | |
| 1039 } | |
| 1040 | |
| 1041 source_set("quic_base") { | |
| 1042 sources = [ | |
| 1043 "tools/quic/quic_client.cc", | |
| 1044 "tools/quic/quic_client.h", | |
| 1045 "tools/quic/quic_client_session.cc", | |
| 1046 "tools/quic/quic_client_session.h", | |
| 1047 "tools/quic/quic_default_packet_writer.cc", | |
| 1048 "tools/quic/quic_default_packet_writer.h", | |
| 1049 "tools/quic/quic_dispatcher.cc", | |
| 1050 "tools/quic/quic_dispatcher.h", | |
| 1051 "tools/quic/quic_epoll_clock.cc", | |
| 1052 "tools/quic/quic_epoll_clock.h", | |
| 1053 "tools/quic/quic_epoll_connection_helper.cc", | |
| 1054 "tools/quic/quic_epoll_connection_helper.h", | |
| 1055 "tools/quic/quic_in_memory_cache.cc", | |
| 1056 "tools/quic/quic_in_memory_cache.h", | |
| 1057 "tools/quic/quic_packet_writer_wrapper.cc", | |
| 1058 "tools/quic/quic_packet_writer_wrapper.h", | |
| 1059 "tools/quic/quic_per_connection_packet_writer.cc", | |
| 1060 "tools/quic/quic_per_connection_packet_writer.h", | |
| 1061 "tools/quic/quic_server.cc", | |
| 1062 "tools/quic/quic_server.h", | |
| 1063 "tools/quic/quic_server_session.cc", | |
| 1064 "tools/quic/quic_server_session.h", | |
| 1065 "tools/quic/quic_socket_utils.cc", | |
| 1066 "tools/quic/quic_socket_utils.h", | |
| 1067 "tools/quic/quic_spdy_client_stream.cc", | |
| 1068 "tools/quic/quic_spdy_client_stream.h", | |
| 1069 "tools/quic/quic_spdy_server_stream.cc", | |
| 1070 "tools/quic/quic_spdy_server_stream.h", | |
| 1071 "tools/quic/quic_time_wait_list_manager.cc", | |
| 1072 "tools/quic/quic_time_wait_list_manager.h", | |
| 1073 ] | |
| 1074 deps = [ | |
| 1075 ":balsa", | |
| 1076 ":epoll_server", | |
| 1077 ":net", | |
| 1078 "//base", | |
| 1079 "//base/third_party/dynamic_annotations", | |
| 1080 "//crypto", | |
| 1081 "//third_party/boringssl", | |
| 1082 "//url", | |
| 1083 ] | |
| 1084 } | |
| 1085 | |
| 1086 executable("quic_client") { | |
| 1087 sources = [ | |
| 1088 "tools/quic/quic_client_bin.cc", | |
| 1089 ] | |
| 1090 deps = [ | |
| 1091 ":quic_base", | |
| 1092 ":net", | |
| 1093 "//base", | |
| 1094 "//third_party/boringssl", | |
| 1095 ] | |
| 1096 } | |
| 1097 } | |
| 1098 | |
| 1099 if (is_android) { | |
| 1100 generate_jni("net_jni_headers") { | |
| 1101 sources = [ | |
| 1102 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java", | |
| 1103 "android/java/src/org/chromium/net/AndroidKeyStore.java", | |
| 1104 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java", | |
| 1105 "android/java/src/org/chromium/net/AndroidPrivateKey.java", | |
| 1106 "android/java/src/org/chromium/net/GURLUtils.java", | |
| 1107 "android/java/src/org/chromium/net/NetworkChangeNotifier.java", | |
| 1108 "android/java/src/org/chromium/net/ProxyChangeListener.java", | |
| 1109 "android/java/src/org/chromium/net/X509Util.java", | |
| 1110 ] | |
| 1111 jni_package = "net" | |
| 1112 } | |
| 1113 generate_jni("net_test_jni_headers") { | |
| 1114 sources = [ | |
| 1115 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java", | |
| 1116 ] | |
| 1117 jni_package = "net" | |
| 1118 } | |
| 1119 } | |
| 1120 | |
| 1121 if (is_android || is_linux) { | |
| 1122 executable("disk_cache_memory_test") { | |
| 1123 testonly = true | |
| 1124 sources = [ | |
| 1125 "tools/disk_cache_memory_test/disk_cache_memory_test.cc", | |
| 1126 ] | |
| 1127 deps = [ | |
| 1128 ":net", | |
| 1129 "//base", | |
| 1130 ] | |
| 1131 } | |
| 1132 } | |
| 1133 | |
| 1134 # TODO(GYP) make this compile on Android, we need some native test deps done. | |
| 1135 # TODO(GYP) Also doesn't work on Windows; dependency on boringssl is wrong. | |
| 1136 # TODO(GYP) Also doesn't work on Mac, need to figure out why not. | |
| 1137 if (!is_android && !is_win && !is_mac) { | |
| 1138 source_set("quic_tools") { | |
| 1139 sources = [ | |
| 1140 "quic/quic_dispatcher.cc", | |
| 1141 "quic/quic_dispatcher.h", | |
| 1142 "quic/quic_in_memory_cache.cc", | |
| 1143 "quic/quic_in_memory_cache.h", | |
| 1144 "quic/quic_per_connection_packet_writer.cc", | |
| 1145 "quic/quic_per_connection_packet_writer.h", | |
| 1146 "quic/quic_server.cc", | |
| 1147 "quic/quic_server.h", | |
| 1148 "quic/quic_server_packet_writer.cc", | |
| 1149 "quic/quic_server_packet_writer.h", | |
| 1150 "quic/quic_server_session.cc", | |
| 1151 "quic/quic_server_session.h", | |
| 1152 "quic/quic_spdy_server_stream.cc", | |
| 1153 "quic/quic_spdy_server_stream.h", | |
| 1154 "quic/quic_time_wait_list_manager.cc", | |
| 1155 "quic/quic_time_wait_list_manager.h", | |
| 1156 ] | |
| 1157 deps = [ | |
| 1158 ":net", | |
| 1159 "//base", | |
| 1160 "//base/third_party/dynamic_annotations", | |
| 1161 "//url", | |
| 1162 ] | |
| 1163 } | |
| 1164 | |
| 1165 test("net_unittests") { | |
| 1166 sources = gypi_values.net_test_sources | |
| 1167 | |
| 1168 sources -= [ | |
| 1169 "extras/sqlite/sqlite_channel_id_store_unittest.cc", | |
| 1170 ] | |
| 1171 | |
| 1172 configs += [ ":net_win_size_truncation" ] | |
| 1173 defines = [] | |
| 1174 | |
| 1175 deps = [ | |
| 1176 ":http_server", | |
| 1177 ":net", | |
| 1178 ":quic_tools", | |
| 1179 ":test_support", | |
| 1180 "//base", | |
| 1181 "//base:i18n", | |
| 1182 "//base:prefs_test_support", | |
| 1183 "//base/allocator", | |
| 1184 "//base/third_party/dynamic_annotations", | |
| 1185 "//crypto", | |
| 1186 "//crypto:platform", | |
| 1187 "//crypto:test_support", | |
| 1188 "//net/base/registry_controlled_domains", | |
| 1189 "//testing/gmock", | |
| 1190 "//testing/gtest", | |
| 1191 "//third_party/zlib", | |
| 1192 "//url", | |
| 1193 ] | |
| 1194 | |
| 1195 if (is_linux) { | |
| 1196 sources += gypi_values.net_linux_test_sources | |
| 1197 deps += [ | |
| 1198 ":balsa", | |
| 1199 ":epoll_server", | |
| 1200 ":flip_in_mem_edsm_server_base", | |
| 1201 ":quic_base", | |
| 1202 ] | |
| 1203 } | |
| 1204 | |
| 1205 if (is_mac || is_ios) { | |
| 1206 sources += gypi_values.net_base_test_mac_ios_sources | |
| 1207 } | |
| 1208 | |
| 1209 if (is_chromeos) { | |
| 1210 sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ] | |
| 1211 } | |
| 1212 | |
| 1213 if (is_android) { | |
| 1214 sources -= [ | |
| 1215 # See bug http://crbug.com/344533. | |
| 1216 "disk_cache/blockfile/index_table_v3_unittest.cc", | |
| 1217 | |
| 1218 # No res_ninit() et al on Android, so this doesn't make a lot of | |
| 1219 # sense. | |
| 1220 "dns/dns_config_service_posix_unittest.cc", | |
| 1221 ] | |
| 1222 deps += [ | |
| 1223 ":net_javatests", # FIXME(brettw) | |
| 1224 ":net_test_jni_headers", | |
| 1225 ] | |
| 1226 } | |
| 1227 | |
| 1228 if (v8_use_external_startup_data) { | |
| 1229 deps += [ "//gin" ] | |
| 1230 } | |
| 1231 | |
| 1232 if (!use_nss_certs) { | |
| 1233 sources -= [ "ssl/client_cert_store_nss_unittest.cc" ] | |
| 1234 if (is_chromeos) { # Already removed for all non-ChromeOS builds. | |
| 1235 sources -= [ "ssl/client_cert_store_chromeos_unittest.cc" ] | |
| 1236 } | |
| 1237 } | |
| 1238 | |
| 1239 if (use_openssl) { | |
| 1240 # When building for OpenSSL, we need to exclude NSS specific tests | |
| 1241 # or functionality not supported by OpenSSL yet. | |
| 1242 # TODO(bulach): Add equivalent tests when the underlying | |
| 1243 # functionality is ported to OpenSSL. | |
| 1244 sources -= [ | |
| 1245 "cert/nss_cert_database_unittest.cc", | |
| 1246 "cert/x509_util_nss_unittest.cc", | |
| 1247 "quic/test_tools/crypto_test_utils_nss.cc", | |
| 1248 ] | |
| 1249 if (is_chromeos) { | |
| 1250 # These were already removed in the non-ChromeOS case. | |
| 1251 sources -= [ | |
| 1252 "cert/nss_cert_database_chromeos_unittest.cc", | |
| 1253 "cert/nss_profile_filter_chromeos_unittest.cc", | |
| 1254 ] | |
| 1255 } | |
| 1256 } else { | |
| 1257 sources -= [ | |
| 1258 "cert/x509_util_openssl_unittest.cc", | |
| 1259 "quic/test_tools/crypto_test_utils_openssl.cc", | |
| 1260 "socket/ssl_client_socket_openssl_unittest.cc", | |
| 1261 "socket/ssl_session_cache_openssl_unittest.cc", | |
| 1262 ] | |
| 1263 if (!is_desktop_linux && !is_chromeos) { | |
| 1264 sources -= [ "cert/nss_cert_database_unittest.cc" ] | |
| 1265 } | |
| 1266 } | |
| 1267 | |
| 1268 if (use_kerberos) { | |
| 1269 defines += [ "USE_KERBEROS" ] | |
| 1270 } else { | |
| 1271 sources -= [ | |
| 1272 "http/http_auth_gssapi_posix_unittest.cc", | |
| 1273 "http/http_auth_handler_negotiate_unittest.cc", | |
| 1274 "http/mock_gssapi_library_posix.cc", | |
| 1275 "http/mock_gssapi_library_posix.h", | |
| 1276 ] | |
| 1277 } | |
| 1278 | |
| 1279 if (use_openssl || (!is_desktop_linux && !is_chromeos && !is_ios)) { | |
| 1280 # Only include this test when on Posix and using NSS for | |
| 1281 # cert verification or on iOS (which also uses NSS for certs). | |
| 1282 sources -= [ "ocsp/nss_ocsp_unittest.cc" ] | |
| 1283 } | |
| 1284 | |
| 1285 if (!use_openssl_certs) { | |
| 1286 sources -= [ "ssl/openssl_client_key_store_unittest.cc" ] | |
| 1287 } | |
| 1288 | |
| 1289 if (!enable_websockets) { | |
| 1290 sources -= [ | |
| 1291 "server/http_connection_unittest.cc", | |
| 1292 "server/http_server_response_info_unittest.cc", | |
| 1293 "server/http_server_unittest.cc", | |
| 1294 "server/web_socket_encoder_unittest.cc", | |
| 1295 "websockets/websocket_basic_stream_test.cc", | |
| 1296 "websockets/websocket_channel_test.cc", | |
| 1297 "websockets/websocket_deflate_predictor_impl_test.cc", | |
| 1298 "websockets/websocket_deflate_stream_test.cc", | |
| 1299 "websockets/websocket_deflater_test.cc", | |
| 1300 "websockets/websocket_end_to_end_test.cc", | |
| 1301 "websockets/websocket_errors_test.cc", | |
| 1302 "websockets/websocket_extension_parser_test.cc", | |
| 1303 "websockets/websocket_frame_parser_test.cc", | |
| 1304 "websockets/websocket_frame_test.cc", | |
| 1305 "websockets/websocket_handshake_challenge_test.cc", | |
| 1306 "websockets/websocket_handshake_stream_create_helper_test.cc", | |
| 1307 "websockets/websocket_inflater_test.cc", | |
| 1308 "websockets/websocket_stream_test.cc", | |
| 1309 "websockets/websocket_test_util.cc", | |
| 1310 "websockets/websocket_test_util.h", | |
| 1311 ] | |
| 1312 deps -= [ ":http_server" ] | |
| 1313 } | |
| 1314 | |
| 1315 if (disable_file_support) { | |
| 1316 sources -= [ | |
| 1317 "base/directory_lister_unittest.cc", | |
| 1318 "url_request/url_request_file_job_unittest.cc", | |
| 1319 ] | |
| 1320 } | |
| 1321 | |
| 1322 if (disable_ftp_support) { | |
| 1323 sources -= [ | |
| 1324 "ftp/ftp_auth_cache_unittest.cc", | |
| 1325 "ftp/ftp_ctrl_response_buffer_unittest.cc", | |
| 1326 "ftp/ftp_directory_listing_parser_ls_unittest.cc", | |
| 1327 "ftp/ftp_directory_listing_parser_netware_unittest.cc", | |
| 1328 "ftp/ftp_directory_listing_parser_os2_unittest.cc", | |
| 1329 "ftp/ftp_directory_listing_parser_unittest.cc", | |
| 1330 "ftp/ftp_directory_listing_parser_unittest.h", | |
| 1331 "ftp/ftp_directory_listing_parser_vms_unittest.cc", | |
| 1332 "ftp/ftp_directory_listing_parser_windows_unittest.cc", | |
| 1333 "ftp/ftp_network_transaction_unittest.cc", | |
| 1334 "ftp/ftp_util_unittest.cc", | |
| 1335 "url_request/url_request_ftp_job_unittest.cc", | |
| 1336 ] | |
| 1337 } | |
| 1338 | |
| 1339 if (!enable_built_in_dns) { | |
| 1340 sources -= [ | |
| 1341 "dns/address_sorter_posix_unittest.cc", | |
| 1342 "dns/address_sorter_unittest.cc", | |
| 1343 ] | |
| 1344 } | |
| 1345 | |
| 1346 # Always need use_v8_in_net to be 1 to run on Android, so just remove | |
| 1347 # net_unittest's dependency on v8 when using icu alternatives instead of | |
| 1348 # setting use_v8_in_net to 0. | |
| 1349 if (use_v8_in_net && !use_icu_alternatives_on_android) { | |
| 1350 deps += [ ":net_with_v8" ] | |
| 1351 } else { | |
| 1352 sources -= [ | |
| 1353 "proxy/proxy_resolver_v8_tracing_unittest.cc", | |
| 1354 "proxy/proxy_resolver_v8_unittest.cc", | |
| 1355 ] | |
| 1356 } | |
| 1357 | |
| 1358 if (use_v8_in_net && !is_android) { | |
| 1359 deps += [ | |
| 1360 ":net_browser_services", | |
| 1361 "//mojo/environment:chromium", | |
| 1362 "//mojo/edk/system", | |
| 1363 ] | |
| 1364 } else { | |
| 1365 sources -= [ "dns/mojo_host_resolver_impl_unittest.cc" ] | |
| 1366 } | |
| 1367 | |
| 1368 if (!enable_mdns) { | |
| 1369 sources -= [ | |
| 1370 "dns/mdns_cache_unittest.cc", | |
| 1371 "dns/mdns_client_unittest.cc", | |
| 1372 "dns/record_parsed_unittest.cc", | |
| 1373 "dns/record_rdata_unittest.cc", | |
| 1374 ] | |
| 1375 } | |
| 1376 | |
| 1377 if (is_ios) { | |
| 1378 # TODO(GYP) | |
| 1379 # 'actions': [ | |
| 1380 # { | |
| 1381 # 'action_name': 'copy_test_data', | |
| 1382 # 'variables': { | |
| 1383 # 'test_data_files': [ | |
| 1384 # 'data/ssl/certificates/', | |
| 1385 # 'data/test.html', | |
| 1386 # 'data/url_request_unittest/', | |
| 1387 # ], | |
| 1388 # 'test_data_prefix': 'net', | |
| 1389 # }, | |
| 1390 # 'includes': [ '../build/copy_test_data_ios.gypi' ], | |
| 1391 # }, | |
| 1392 # ], | |
| 1393 sources -= [ | |
| 1394 # TODO(droger): The following tests are disabled because the | |
| 1395 # implementation is missing or incomplete. | |
| 1396 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS. | |
| 1397 "base/keygen_handler_unittest.cc", | |
| 1398 "disk_cache/backend_unittest.cc", | |
| 1399 "disk_cache/blockfile/block_files_unittest.cc", | |
| 1400 | |
| 1401 # Need to read input data files. | |
| 1402 "filter/gzip_filter_unittest.cc", | |
| 1403 "socket/ssl_server_socket_unittest.cc", | |
| 1404 "spdy/fuzzing/hpack_fuzz_util_test.cc", | |
| 1405 | |
| 1406 # Need TestServer. | |
| 1407 "proxy/proxy_script_fetcher_impl_unittest.cc", | |
| 1408 "socket/ssl_client_socket_unittest.cc", | |
| 1409 "url_request/url_fetcher_impl_unittest.cc", | |
| 1410 "url_request/url_request_context_builder_unittest.cc", | |
| 1411 | |
| 1412 # Needs GetAppOutput(). | |
| 1413 "test/python_utils_unittest.cc", | |
| 1414 | |
| 1415 # The following tests are disabled because they don't apply to | |
| 1416 # iOS. | |
| 1417 # OS is not "linux" or "freebsd" or "openbsd". | |
| 1418 "socket/unix_domain_client_socket_posix_unittest.cc", | |
| 1419 "socket/unix_domain_listen_socket_posix_unittest.cc", | |
| 1420 "socket/unix_domain_server_socket_posix_unittest.cc", | |
| 1421 | |
| 1422 # See bug http://crbug.com/344533. | |
| 1423 "disk_cache/blockfile/index_table_v3_unittest.cc", | |
| 1424 ] | |
| 1425 } | |
| 1426 | |
| 1427 if (is_android) { | |
| 1428 sources -= [ "dns/dns_config_service_posix_unittest.cc" ] | |
| 1429 | |
| 1430 # TODO(GYP) | |
| 1431 # # TODO(mmenke): This depends on test_support_base, which depends on | |
| 1432 # # icu. Figure out a way to remove that dependency. | |
| 1433 # 'dependencies': [ | |
| 1434 # '../testing/android/native_test.gyp:native_test_native_code', | |
| 1435 # ] | |
| 1436 | |
| 1437 set_sources_assignment_filter([]) | |
| 1438 sources += [ "base/address_tracker_linux_unittest.cc" ] | |
| 1439 set_sources_assignment_filter(sources_assignment_filter) | |
| 1440 } | |
| 1441 | |
| 1442 if (use_icu_alternatives_on_android) { | |
| 1443 sources -= [ | |
| 1444 "base/filename_util_unittest.cc", | |
| 1445 "base/net_util_icu_unittest.cc", | |
| 1446 ] | |
| 1447 deps -= [ "//base:i18n" ] | |
| 1448 } | |
| 1449 } | |
| 1450 | |
| 1451 executable("quic_server") { | |
| 1452 sources = [ | |
| 1453 "quic/quic_server_bin.cc", | |
| 1454 ] | |
| 1455 deps = [ | |
| 1456 ":quic_tools", | |
| 1457 ":net", | |
| 1458 "//base", | |
| 1459 "//third_party/boringssl", | |
| 1460 ] | |
| 1461 } | |
| 1462 } # !is_android && !is_win && !is_mac | |
| OLD | NEW |