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