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