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