Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/buildflag_header.gni") | 5 import("//build/buildflag_header.gni") |
| 6 import("//build/config/chromecast_build.gni") | 6 import("//build/config/chromecast_build.gni") |
| 7 import("//build/config/compiler/compiler.gni") | 7 import("//build/config/compiler/compiler.gni") |
| 8 import("//build/config/crypto.gni") | 8 import("//build/config/crypto.gni") |
| 9 import("//build/config/features.gni") | 9 import("//build/config/features.gni") |
| 10 import("//build/config/ui.gni") | 10 import("//build/config/ui.gni") |
| 11 import("//build_overrides/v8.gni") | 11 import("//build_overrides/v8.gni") |
| 12 import("//testing/libfuzzer/fuzzer_test.gni") | 12 import("//testing/libfuzzer/fuzzer_test.gni") |
| 13 import("//testing/test.gni") | 13 import("//testing/test.gni") |
| 14 import("//third_party/icu/config.gni") | 14 import("//third_party/icu/config.gni") |
| 15 import("//third_party/protobuf/proto_library.gni") | 15 import("//third_party/protobuf/proto_library.gni") |
| 16 import("//tools/grit/grit_rule.gni") | 16 import("//tools/grit/grit_rule.gni") |
| 17 import("//url/features.gni") | |
| 17 | 18 |
| 18 if (is_android) { | 19 if (is_android) { |
| 19 import("//build/config/android/config.gni") | 20 import("//build/config/android/config.gni") |
| 20 import("//build/config/android/rules.gni") | 21 import("//build/config/android/rules.gni") |
| 21 } else if (is_mac) { | 22 } else if (is_mac) { |
| 22 import("//build/config/mac/mac_sdk.gni") | 23 import("//build/config/mac/mac_sdk.gni") |
| 23 } | 24 } |
| 24 | 25 |
| 25 # The list of net files is kept in net.gypi. Read it. | 26 # The list of net files is kept in net.gypi. Read it. |
| 26 gypi_values = exec_script("//build/gypi_to_gn.py", | 27 gypi_values = exec_script("//build/gypi_to_gn.py", |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 44 | 45 |
| 45 # WebSockets and socket stream code are not used on iOS and are optional in | 46 # WebSockets and socket stream code are not used on iOS and are optional in |
| 46 # cronet. | 47 # cronet. |
| 47 enable_websockets = !is_ios | 48 enable_websockets = !is_ios |
| 48 disable_ftp_support = is_ios | 49 disable_ftp_support = is_ios |
| 49 | 50 |
| 50 # Enable Kerberos authentication. It is disabled by default on ChromeOS, iOS, | 51 # Enable Kerberos authentication. It is disabled by default on ChromeOS, iOS, |
| 51 # Chromecast, at least for now. This feature needs configuration (krb5.conf | 52 # Chromecast, at least for now. This feature needs configuration (krb5.conf |
| 52 # and so on). | 53 # and so on). |
| 53 use_kerberos = !is_chromeos && !is_ios && !is_chromecast | 54 use_kerberos = !is_chromeos && !is_ios && !is_chromecast |
| 55 | |
| 56 # Do not disable brotli filter by default. | |
| 57 disable_brotli_filter = false | |
| 54 } | 58 } |
| 55 | 59 |
| 56 config("net_config") { | 60 config("net_config") { |
| 57 defines = [] | 61 defines = [] |
| 58 if (posix_avoid_mmap) { | 62 if (posix_avoid_mmap) { |
| 59 defines += [ "POSIX_AVOID_MMAP" ] | 63 defines += [ "POSIX_AVOID_MMAP" ] |
| 60 } | 64 } |
| 61 if (disable_file_support) { | 65 if (disable_file_support) { |
| 62 defines += [ "DISABLE_FILE_SUPPORT" ] | 66 defines += [ "DISABLE_FILE_SUPPORT" ] |
| 63 } | 67 } |
| 64 if (disable_ftp_support) { | 68 if (disable_ftp_support) { |
| 65 defines += [ "DISABLE_FTP_SUPPORT=1" ] | 69 defines += [ "DISABLE_FTP_SUPPORT=1" ] |
| 66 } | 70 } |
| 71 if (use_platform_icu_alternatives) { | |
| 72 defines += [ "USE_PLATFORM_ICU_ALTERNATIVES=1" ] | |
| 73 } | |
| 67 } | 74 } |
| 68 | 75 |
| 69 # net_internal_config is shared with net and net_small. | |
| 70 config("net_internal_config") { | 76 config("net_internal_config") { |
| 71 defines = [ | 77 defines = [ |
| 72 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to | 78 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to |
| 73 # 0) which implies that we run pkg_config on kerberos and link to that | 79 # 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 | 80 # 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 | 81 # doesn't seem to be set in the regular builds, so we're skipping this |
| 76 # capability here. | 82 # capability here. |
| 77 "DLOPEN_KERBEROS", | 83 "DLOPEN_KERBEROS", |
| 78 "NET_IMPLEMENTATION", | 84 "NET_IMPLEMENTATION", |
| 79 ] | 85 ] |
| 80 | 86 |
| 81 if (use_kerberos) { | 87 if (use_kerberos) { |
| 82 defines += [ "USE_KERBEROS" ] | 88 defines += [ "USE_KERBEROS" ] |
| 83 if (is_android) { | 89 if (is_android) { |
| 84 include_dirs = [ "/usr/include/kerberosV" ] | 90 include_dirs = [ "/usr/include/kerberosV" ] |
| 85 } | 91 } |
| 86 } | 92 } |
| 87 | 93 |
| 88 if (enable_built_in_dns) { | 94 if (enable_built_in_dns) { |
| 89 defines += [ "ENABLE_BUILT_IN_DNS" ] | 95 defines += [ "ENABLE_BUILT_IN_DNS" ] |
| 90 } | 96 } |
| 91 } | 97 } |
| 92 | 98 |
| 93 # net_shared_* are settings shared between net and net_small | 99 net_sources = gypi_values.net_nacl_common_sources |
| 94 net_shared_sources = gypi_values.net_nacl_common_sources | |
| 95 | 100 |
| 96 net_shared_unfiltered_sources = [] | 101 net_unfiltered_sources = [] |
| 97 | 102 |
| 98 net_shared_configs = [ | 103 net_configs = [ |
| 99 ":net_internal_config", | 104 ":net_internal_config", |
| 100 "//build/config:precompiled_headers", | 105 "//build/config:precompiled_headers", |
| 101 | 106 |
| 102 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 107 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 103 "//build/config/compiler:no_size_t_to_int_warning", | 108 "//build/config/compiler:no_size_t_to_int_warning", |
| 104 ] | 109 ] |
| 105 | 110 |
| 106 net_shared_public_deps = [ | 111 net_public_deps = [ |
| 107 ":net_quic_proto", | 112 ":net_quic_proto", |
| 108 "//crypto", | 113 "//crypto", |
| 109 "//crypto:platform", | 114 "//crypto:platform", |
| 110 ] | 115 ] |
| 111 | 116 |
| 112 net_shared_deps = [ | 117 net_deps = [ |
| 113 ":net_resources", | 118 ":net_resources", |
| 114 "//base", | 119 "//base", |
| 115 "//net/base/registry_controlled_domains", | 120 "//net/base/registry_controlled_domains", |
| 116 "//third_party/protobuf:protobuf_lite", | 121 "//third_party/protobuf:protobuf_lite", |
| 117 ] | 122 ] |
| 118 | 123 |
| 119 if (!is_nacl) { | 124 if (!is_nacl) { |
| 120 net_shared_sources += gypi_values.net_non_nacl_sources | 125 net_sources += gypi_values.net_non_nacl_sources |
| 121 | 126 |
| 122 net_shared_deps += [ | 127 net_deps += [ |
| 123 "//base/third_party/dynamic_annotations", | 128 "//base/third_party/dynamic_annotations", |
| 124 "//components/prefs", | 129 "//components/prefs", |
| 125 "//sdch", | 130 "//sdch", |
| 126 "//third_party/zlib", | 131 "//third_party/zlib", |
| 127 ] | 132 ] |
| 128 | 133 |
| 129 if (!use_kerberos) { | 134 if (!use_kerberos) { |
| 130 net_shared_sources -= [ | 135 net_sources -= [ |
| 131 "http/http_auth_handler_negotiate.cc", | 136 "http/http_auth_handler_negotiate.cc", |
| 132 "http/http_auth_handler_negotiate.h", | 137 "http/http_auth_handler_negotiate.h", |
| 133 ] | 138 ] |
| 134 } | 139 } |
| 135 | 140 |
| 136 if (is_posix) { | 141 if (is_posix) { |
| 137 if (posix_avoid_mmap) { | 142 if (posix_avoid_mmap) { |
| 138 net_shared_sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ] | 143 net_sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ] |
| 139 } else { | 144 } else { |
| 140 net_shared_sources -= | 145 net_sources -= [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ] |
| 141 [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ] | |
| 142 } | 146 } |
| 143 } | 147 } |
| 144 | 148 |
| 145 if (!enable_built_in_dns) { | 149 if (!enable_built_in_dns) { |
| 146 net_shared_sources -= [ | 150 net_sources -= [ |
| 147 "dns/address_sorter_posix.cc", | 151 "dns/address_sorter_posix.cc", |
| 148 "dns/address_sorter_posix.h", | 152 "dns/address_sorter_posix.h", |
| 149 "dns/dns_client.cc", | 153 "dns/dns_client.cc", |
| 150 ] | 154 ] |
| 151 } | 155 } |
| 152 | 156 |
| 153 if (use_openssl) { | 157 if (use_openssl) { |
| 154 net_shared_sources -= [ | 158 net_sources -= [ |
| 155 "base/nss_memio.c", | 159 "base/nss_memio.c", |
| 156 "base/nss_memio.h", | 160 "base/nss_memio.h", |
| 157 "cert/ct_log_verifier_nss.cc", | 161 "cert/ct_log_verifier_nss.cc", |
| 158 "cert/ct_objects_extractor_nss.cc", | 162 "cert/ct_objects_extractor_nss.cc", |
| 159 "cert/jwk_serializer_nss.cc", | 163 "cert/jwk_serializer_nss.cc", |
| 160 "cert/scoped_nss_types.h", | 164 "cert/scoped_nss_types.h", |
| 161 "cert/x509_util_nss.cc", | 165 "cert/x509_util_nss.cc", |
| 162 "quic/crypto/aead_base_decrypter_nss.cc", | 166 "quic/crypto/aead_base_decrypter_nss.cc", |
| 163 "quic/crypto/aead_base_encrypter_nss.cc", | 167 "quic/crypto/aead_base_encrypter_nss.cc", |
| 164 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc", | 168 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc", |
| 165 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc", | 169 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc", |
| 166 "quic/crypto/chacha20_poly1305_decrypter_nss.cc", | 170 "quic/crypto/chacha20_poly1305_decrypter_nss.cc", |
| 167 "quic/crypto/chacha20_poly1305_encrypter_nss.cc", | 171 "quic/crypto/chacha20_poly1305_encrypter_nss.cc", |
| 168 "quic/crypto/chacha20_poly1305_rfc7539_decrypter_nss.cc", | 172 "quic/crypto/chacha20_poly1305_rfc7539_decrypter_nss.cc", |
| 169 "quic/crypto/chacha20_poly1305_rfc7539_encrypter_nss.cc", | 173 "quic/crypto/chacha20_poly1305_rfc7539_encrypter_nss.cc", |
| 170 "quic/crypto/channel_id_nss.cc", | 174 "quic/crypto/channel_id_nss.cc", |
| 171 "quic/crypto/p256_key_exchange_nss.cc", | 175 "quic/crypto/p256_key_exchange_nss.cc", |
| 172 "quic/crypto/proof_source_chromium_nss.cc", | 176 "quic/crypto/proof_source_chromium_nss.cc", |
| 173 "socket/nss_ssl_util.cc", | 177 "socket/nss_ssl_util.cc", |
| 174 "socket/nss_ssl_util.h", | 178 "socket/nss_ssl_util.h", |
| 175 "socket/ssl_client_socket_nss.cc", | 179 "socket/ssl_client_socket_nss.cc", |
| 176 "socket/ssl_client_socket_nss.h", | 180 "socket/ssl_client_socket_nss.h", |
| 177 "socket/ssl_server_socket_nss.cc", | 181 "socket/ssl_server_socket_nss.cc", |
| 178 "socket/ssl_server_socket_nss.h", | 182 "socket/ssl_server_socket_nss.h", |
| 179 "ssl/token_binding_nss.cc", | 183 "ssl/token_binding_nss.cc", |
| 180 ] | 184 ] |
| 181 if (is_ios) { | 185 if (is_ios) { |
| 182 net_shared_sources -= [ | 186 net_sources -= [ |
| 183 "cert/x509_util_ios.cc", | 187 "cert/x509_util_ios.cc", |
| 184 "cert/x509_util_ios.h", | 188 "cert/x509_util_ios.h", |
| 185 ] | 189 ] |
| 186 } | 190 } |
| 187 } else { | 191 } else { |
| 188 net_shared_sources -= [ | 192 net_sources -= [ |
| 189 "cert/ct_log_verifier_openssl.cc", | 193 "cert/ct_log_verifier_openssl.cc", |
| 190 "cert/ct_objects_extractor_openssl.cc", | 194 "cert/ct_objects_extractor_openssl.cc", |
| 191 "cert/jwk_serializer_openssl.cc", | 195 "cert/jwk_serializer_openssl.cc", |
| 192 "cert/x509_util_openssl.cc", | 196 "cert/x509_util_openssl.cc", |
| 193 "cert/x509_util_openssl.h", | 197 "cert/x509_util_openssl.h", |
| 194 "quic/crypto/aead_base_decrypter_openssl.cc", | 198 "quic/crypto/aead_base_decrypter_openssl.cc", |
| 195 "quic/crypto/aead_base_encrypter_openssl.cc", | 199 "quic/crypto/aead_base_encrypter_openssl.cc", |
| 196 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc", | 200 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc", |
| 197 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc", | 201 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc", |
| 198 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc", | 202 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc", |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 219 "ssl/ssl_platform_key_task_runner.h", | 223 "ssl/ssl_platform_key_task_runner.h", |
| 220 "ssl/test_ssl_private_key.cc", | 224 "ssl/test_ssl_private_key.cc", |
| 221 "ssl/test_ssl_private_key.h", | 225 "ssl/test_ssl_private_key.h", |
| 222 "ssl/threaded_ssl_private_key.cc", | 226 "ssl/threaded_ssl_private_key.cc", |
| 223 "ssl/threaded_ssl_private_key.h", | 227 "ssl/threaded_ssl_private_key.h", |
| 224 "ssl/token_binding_openssl.cc", | 228 "ssl/token_binding_openssl.cc", |
| 225 ] | 229 ] |
| 226 } | 230 } |
| 227 | 231 |
| 228 if (!use_openssl_certs) { | 232 if (!use_openssl_certs) { |
| 229 net_shared_sources -= [ | 233 net_sources -= [ |
| 230 "base/crypto_module_openssl.cc", | 234 "base/crypto_module_openssl.cc", |
| 231 "base/keygen_handler_openssl.cc", | 235 "base/keygen_handler_openssl.cc", |
| 232 "base/openssl_private_key_store.h", | 236 "base/openssl_private_key_store.h", |
| 233 "base/openssl_private_key_store_memory.cc", | 237 "base/openssl_private_key_store_memory.cc", |
| 234 "cert/cert_database_openssl.cc", | 238 "cert/cert_database_openssl.cc", |
| 235 "cert/cert_verify_proc_openssl.cc", | 239 "cert/cert_verify_proc_openssl.cc", |
| 236 "cert/cert_verify_proc_openssl.h", | 240 "cert/cert_verify_proc_openssl.h", |
| 237 "cert/test_root_certs_openssl.cc", | 241 "cert/test_root_certs_openssl.cc", |
| 238 "cert/x509_certificate_openssl.cc", | 242 "cert/x509_certificate_openssl.cc", |
| 239 "ssl/openssl_client_key_store.cc", | 243 "ssl/openssl_client_key_store.cc", |
| 240 "ssl/openssl_client_key_store.h", | 244 "ssl/openssl_client_key_store.h", |
| 241 ] | 245 ] |
| 242 if (is_android) { | 246 if (is_android) { |
| 243 net_shared_sources -= [ "base/openssl_private_key_store_android.cc" ] | 247 net_sources -= [ "base/openssl_private_key_store_android.cc" ] |
| 244 } | 248 } |
| 245 } else { | 249 } else { |
| 246 if (is_android) { | 250 if (is_android) { |
| 247 # Android doesn't use these even when using OpenSSL. | 251 # Android doesn't use these even when using OpenSSL. |
| 248 net_shared_sources -= [ | 252 net_sources -= [ |
| 249 "base/openssl_private_key_store_memory.cc", | 253 "base/openssl_private_key_store_memory.cc", |
| 250 "cert/cert_database_openssl.cc", | 254 "cert/cert_database_openssl.cc", |
| 251 "cert/cert_verify_proc_openssl.cc", | 255 "cert/cert_verify_proc_openssl.cc", |
| 252 "cert/test_root_certs_openssl.cc", | 256 "cert/test_root_certs_openssl.cc", |
| 253 ] | 257 ] |
| 254 } | 258 } |
| 255 } | 259 } |
| 256 | 260 |
| 257 if (!use_kerberos || is_android) { | 261 if (!use_kerberos || is_android) { |
| 258 net_shared_sources -= [ | 262 net_sources -= [ |
| 259 "http/http_auth_gssapi_posix.cc", | 263 "http/http_auth_gssapi_posix.cc", |
| 260 "http/http_auth_gssapi_posix.h", | 264 "http/http_auth_gssapi_posix.h", |
| 261 ] | 265 ] |
| 262 } | 266 } |
| 263 | 267 |
| 264 if (use_glib && use_gconf && !is_chromeos) { | 268 if (use_glib && use_gconf && !is_chromeos) { |
| 265 net_shared_configs += [ "//build/config/linux:gconf" ] | 269 net_configs += [ "//build/config/linux:gconf" ] |
| 266 net_shared_deps += [ "//build/linux:gio" ] | 270 net_deps += [ "//build/linux:gio" ] |
| 267 } | 271 } |
| 268 | 272 |
| 269 if (is_linux) { | 273 if (is_linux) { |
| 270 net_shared_configs += [ "//build/config/linux:libresolv" ] | 274 net_configs += [ "//build/config/linux:libresolv" ] |
| 271 } | 275 } |
| 272 | 276 |
| 273 if (!use_nss_certs) { | 277 if (!use_nss_certs) { |
| 274 net_shared_sources -= [ | 278 net_sources -= [ |
| 275 "base/crypto_module_nss.cc", | 279 "base/crypto_module_nss.cc", |
| 276 "base/keygen_handler_nss.cc", | 280 "base/keygen_handler_nss.cc", |
| 277 "cert/cert_database_nss.cc", | 281 "cert/cert_database_nss.cc", |
| 278 "cert/nss_cert_database.cc", | 282 "cert/nss_cert_database.cc", |
| 279 "cert/nss_cert_database.h", | 283 "cert/nss_cert_database.h", |
| 280 "cert/x509_certificate_nss.cc", | 284 "cert/x509_certificate_nss.cc", |
| 281 "ssl/client_cert_store_nss.cc", | 285 "ssl/client_cert_store_nss.cc", |
| 282 "ssl/client_cert_store_nss.h", | 286 "ssl/client_cert_store_nss.h", |
| 283 "third_party/mozilla_security_manager/nsKeygenHandler.cpp", | 287 "third_party/mozilla_security_manager/nsKeygenHandler.cpp", |
| 284 "third_party/mozilla_security_manager/nsKeygenHandler.h", | 288 "third_party/mozilla_security_manager/nsKeygenHandler.h", |
| 285 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp", | 289 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp", |
| 286 "third_party/mozilla_security_manager/nsNSSCertificateDB.h", | 290 "third_party/mozilla_security_manager/nsNSSCertificateDB.h", |
| 287 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp", | 291 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp", |
| 288 "third_party/mozilla_security_manager/nsPKCS12Blob.h", | 292 "third_party/mozilla_security_manager/nsPKCS12Blob.h", |
| 289 ] | 293 ] |
| 290 if (is_chromeos) { | 294 if (is_chromeos) { |
| 291 # These were already removed on non-ChromeOS. | 295 # These were already removed on non-ChromeOS. |
| 292 net_shared_sources -= [ | 296 net_sources -= [ |
| 293 "cert/nss_cert_database_chromeos.cc", | 297 "cert/nss_cert_database_chromeos.cc", |
| 294 "cert/nss_cert_database_chromeos.h", | 298 "cert/nss_cert_database_chromeos.h", |
| 295 "cert/nss_profile_filter_chromeos.cc", | 299 "cert/nss_profile_filter_chromeos.cc", |
| 296 "cert/nss_profile_filter_chromeos.h", | 300 "cert/nss_profile_filter_chromeos.h", |
| 297 ] | 301 ] |
| 298 } | 302 } |
| 299 net_shared_sources -= [ | 303 net_sources -= [ |
| 300 "ssl/client_key_store.cc", | 304 "ssl/client_key_store.cc", |
| 301 "ssl/client_key_store.h", | 305 "ssl/client_key_store.h", |
| 302 "ssl/ssl_platform_key_nss.cc", | 306 "ssl/ssl_platform_key_nss.cc", |
| 303 ] | 307 ] |
| 304 } else if (use_openssl) { | 308 } else if (use_openssl) { |
| 305 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's | 309 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's |
| 306 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file | 310 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file |
| 307 # in directly. | 311 # in directly. |
| 308 net_shared_sources += [ "third_party/nss/ssl/cmpcert.c" ] | 312 net_sources += [ "third_party/nss/ssl/cmpcert.c" ] |
| 309 } | 313 } |
| 310 | 314 |
| 311 if (!use_nss_verifier) { | 315 if (!use_nss_verifier) { |
| 312 # These files are part of the partial implementation of NSS for | 316 # These files are part of the partial implementation of NSS for |
| 313 # cert verification, so keep them in that case. | 317 # cert verification, so keep them in that case. |
| 314 net_shared_sources -= [ | 318 net_sources -= [ |
| 315 "cert/cert_verify_proc_nss.cc", | 319 "cert/cert_verify_proc_nss.cc", |
| 316 "cert/cert_verify_proc_nss.h", | 320 "cert/cert_verify_proc_nss.h", |
| 317 "cert/test_root_certs_nss.cc", | 321 "cert/test_root_certs_nss.cc", |
| 318 "cert/x509_util_nss_certs.cc", | 322 "cert/x509_util_nss_certs.cc", |
| 319 "cert_net/nss_ocsp.cc", | 323 "cert_net/nss_ocsp.cc", |
| 320 "cert_net/nss_ocsp.h", | 324 "cert_net/nss_ocsp.h", |
| 321 ] | 325 ] |
| 322 } | 326 } |
| 323 | 327 |
| 324 if (is_ios && use_nss_verifier) { | 328 if (is_ios && use_nss_verifier) { |
| 325 net_shared_sources -= [ | 329 net_sources -= [ |
| 326 "cert/cert_verify_proc_ios.cc", | 330 "cert/cert_verify_proc_ios.cc", |
| 327 "cert/cert_verify_proc_ios.h", | 331 "cert/cert_verify_proc_ios.h", |
| 328 "cert/x509_certificate_openssl_ios.cc", | 332 "cert/x509_certificate_openssl_ios.cc", |
| 329 ] | 333 ] |
| 330 } | 334 } |
| 331 | 335 |
| 332 if (is_chromecast && use_nss_certs) { | 336 if (is_chromecast && use_nss_certs) { |
| 333 net_shared_sources += [ "ssl/ssl_platform_key_chromecast.cc" ] | 337 net_sources += [ "ssl/ssl_platform_key_chromecast.cc" ] |
| 334 net_shared_sources -= [ "ssl/ssl_platform_key_nss.cc" ] | 338 net_sources -= [ "ssl/ssl_platform_key_nss.cc" ] |
| 335 } | 339 } |
| 336 | 340 |
| 337 if (!enable_mdns) { | 341 if (!enable_mdns) { |
| 338 net_shared_sources -= [ | 342 net_sources -= [ |
| 339 "dns/mdns_cache.cc", | 343 "dns/mdns_cache.cc", |
| 340 "dns/mdns_cache.h", | 344 "dns/mdns_cache.h", |
| 341 "dns/mdns_client.cc", | 345 "dns/mdns_client.cc", |
| 342 "dns/mdns_client.h", | 346 "dns/mdns_client.h", |
| 343 "dns/mdns_client_impl.cc", | 347 "dns/mdns_client_impl.cc", |
| 344 "dns/mdns_client_impl.h", | 348 "dns/mdns_client_impl.h", |
| 345 "dns/record_parsed.cc", | 349 "dns/record_parsed.cc", |
| 346 "dns/record_parsed.h", | 350 "dns/record_parsed.h", |
| 347 "dns/record_rdata.cc", | 351 "dns/record_rdata.cc", |
| 348 "dns/record_rdata.h", | 352 "dns/record_rdata.h", |
| 349 ] | 353 ] |
| 350 } | 354 } |
| 351 | 355 |
| 352 if (is_win) { | 356 if (is_win) { |
| 353 net_shared_sources -= [ "http/http_auth_handler_ntlm_portable.cc" ] | 357 net_sources -= [ "http/http_auth_handler_ntlm_portable.cc" ] |
| 354 } else { # !is_win | 358 } else { # !is_win |
| 355 net_shared_sources -= [ | 359 net_sources -= [ |
| 356 "base/winsock_init.cc", | 360 "base/winsock_init.cc", |
| 357 "base/winsock_init.h", | 361 "base/winsock_init.h", |
| 358 "base/winsock_util.cc", | 362 "base/winsock_util.cc", |
| 359 "base/winsock_util.h", | 363 "base/winsock_util.h", |
| 360 "proxy/proxy_resolver_winhttp.cc", | 364 "proxy/proxy_resolver_winhttp.cc", |
| 361 "proxy/proxy_resolver_winhttp.h", | 365 "proxy/proxy_resolver_winhttp.h", |
| 362 ] | 366 ] |
| 363 } | 367 } |
| 364 | 368 |
| 365 if (is_ios) { | 369 if (is_ios) { |
| 366 # Add back some sources that were otherwise filtered out. iOS needs some Mac | 370 # Add back some sources that were otherwise filtered out. iOS needs some Mac |
| 367 # files. | 371 # files. |
| 368 net_shared_unfiltered_sources += [ | 372 net_unfiltered_sources += [ |
| 369 "base/mac/url_conversions.h", | 373 "base/mac/url_conversions.h", |
| 370 "base/mac/url_conversions.mm", | 374 "base/mac/url_conversions.mm", |
| 371 "base/network_change_notifier_mac.cc", | 375 "base/network_change_notifier_mac.cc", |
| 372 "base/network_config_watcher_mac.cc", | 376 "base/network_config_watcher_mac.cc", |
| 373 "base/network_interfaces_mac.cc", | 377 "base/network_interfaces_mac.cc", |
| 374 "base/network_interfaces_mac.h", | 378 "base/network_interfaces_mac.h", |
| 375 "base/platform_mime_util_mac.mm", | 379 "base/platform_mime_util_mac.mm", |
| 376 "proxy/proxy_resolver_mac.cc", | 380 "proxy/proxy_resolver_mac.cc", |
| 377 "proxy/proxy_server_mac.cc", | 381 "proxy/proxy_server_mac.cc", |
| 378 ] | 382 ] |
| 379 | 383 |
| 380 net_shared_sources -= [ "disk_cache/blockfile/file_posix.cc" ] | 384 net_sources -= [ "disk_cache/blockfile/file_posix.cc" ] |
| 381 net_shared_deps += [ | 385 net_deps += [ |
| 382 "//third_party/nss:nspr", | 386 "//third_party/nss:nspr", |
| 383 "//third_party/nss", | 387 "//third_party/nss", |
| 384 "//net/third_party/nss/ssl:libssl", | 388 "//net/third_party/nss/ssl:libssl", |
| 385 ] | 389 ] |
| 386 } | 390 } |
| 387 | 391 |
| 388 if (is_ios && !use_nss_verifier) { | 392 if (is_ios && !use_nss_verifier) { |
| 389 net_shared_sources += [ "cert/test_root_certs_mac.cc" ] | 393 net_sources += [ "cert/test_root_certs_mac.cc" ] |
| 390 } | 394 } |
| 391 | 395 |
| 392 if (is_ios || is_mac) { | 396 if (is_ios || is_mac) { |
| 393 net_shared_sources += gypi_values.net_base_mac_ios_sources | 397 net_sources += gypi_values.net_base_mac_ios_sources |
| 394 } | 398 } |
| 395 | 399 |
| 396 if (is_android) { | 400 if (is_android) { |
| 397 net_shared_deps += [ ":net_jni_headers" ] | 401 net_deps += [ ":net_jni_headers" ] |
| 398 | 402 |
| 399 # Add some Linux sources that were excluded by the filter, but which | 403 # Add some Linux sources that were excluded by the filter, but which |
| 400 # are needed. | 404 # are needed. |
| 401 net_shared_unfiltered_sources += [ | 405 net_unfiltered_sources += [ |
| 402 "base/address_tracker_linux.cc", | 406 "base/address_tracker_linux.cc", |
| 403 "base/address_tracker_linux.h", | 407 "base/address_tracker_linux.h", |
| 404 "base/network_interfaces_linux.cc", | 408 "base/network_interfaces_linux.cc", |
| 405 "base/network_interfaces_linux.h", | 409 "base/network_interfaces_linux.h", |
| 406 "base/platform_mime_util_linux.cc", | 410 "base/platform_mime_util_linux.cc", |
| 407 ] | 411 ] |
| 408 } | 412 } |
| 409 } else { | 413 } else { |
| 410 net_shared_public_deps += [ "//native_client_sdk/src/libraries/nacl_io" ] | 414 net_public_deps += [ "//native_client_sdk/src/libraries/nacl_io" ] |
| 411 } | 415 } |
| 412 | 416 |
| 413 component("net") { | 417 component("net") { |
| 414 sources = net_shared_sources | 418 sources = net_sources |
| 415 | 419 |
| 416 # Add back some sources that were otherwise filtered out. | 420 # Add back some sources that were otherwise filtered out. |
| 417 set_sources_assignment_filter([]) | 421 set_sources_assignment_filter([]) |
| 418 sources += net_shared_unfiltered_sources | 422 sources += net_unfiltered_sources |
| 419 set_sources_assignment_filter(sources_assignment_filter) | 423 set_sources_assignment_filter(sources_assignment_filter) |
| 420 | 424 |
| 421 cflags = [] | 425 cflags = [] |
| 422 configs += net_shared_configs | 426 configs += net_configs |
| 423 public_configs = [ ":net_config" ] | 427 public_configs = [ ":net_config" ] |
| 424 | 428 |
| 425 public_deps = net_shared_public_deps + [ "//url" ] | 429 public_deps = net_public_deps + [ "//url" ] |
| 426 deps = net_shared_deps | 430 deps = net_deps |
| 427 | 431 |
| 428 if (is_mac) { | 432 if (is_mac) { |
| 429 libs = [ | 433 libs = [ |
| 430 "Foundation.framework", | 434 "Foundation.framework", |
| 431 "Security.framework", | 435 "Security.framework", |
| 432 "SystemConfiguration.framework", | 436 "SystemConfiguration.framework", |
| 433 "resolv", | 437 "resolv", |
| 434 ] | 438 ] |
| 435 } | 439 } |
| 436 | 440 |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 463 | 467 |
| 464 if (!disable_ftp_support) { | 468 if (!disable_ftp_support) { |
| 465 sources += gypi_values.net_ftp_support_sources | 469 sources += gypi_values.net_ftp_support_sources |
| 466 } | 470 } |
| 467 | 471 |
| 468 if (enable_websockets) { | 472 if (enable_websockets) { |
| 469 sources += gypi_values.net_websockets_sources | 473 sources += gypi_values.net_websockets_sources |
| 470 } | 474 } |
| 471 | 475 |
| 472 # ICU support. | 476 # ICU support. |
| 473 deps += [ | 477 if (use_platform_icu_alternatives) { |
| 474 "//base:i18n", | 478 if (is_android) { |
| 475 "//third_party/icu", | 479 # Use ICU alternative on Android. |
| 476 ] | 480 sources += [ |
| 477 sources += [ | 481 "base/net_string_util_icu_alternatives_android.cc", |
| 478 "base/filename_util_icu.cc", | 482 "base/net_string_util_icu_alternatives_android.h", |
| 479 "base/net_string_util_icu.cc", | 483 ] |
| 480 ] | 484 deps += [ ":net_jni_headers" ] |
| 485 } else if (is_ios) { | |
| 486 # Use ICU alternative on iOS. | |
| 487 sources += [ "base/net_string_util_icu_alternatives_ios.mm" ] | |
| 488 } else { | |
| 489 assert(false, | |
| 490 "ICU alternative is not implemented for platform: " + target_os) | |
| 491 } | |
| 492 } else { | |
| 493 # use third-party ICU implementation. | |
|
mef
2016/04/04 22:25:43
nit: Use (capital).
kapishnikov
2016/04/05 15:22:04
Done.
| |
| 494 deps += [ | |
| 495 "//base:i18n", | |
| 496 "//third_party/icu", | |
| 497 ] | |
| 498 sources += [ | |
| 499 "base/filename_util_icu.cc", | |
| 500 "base/net_string_util_icu.cc", | |
| 501 ] | |
| 502 } | |
| 481 | 503 |
| 482 # Brotli support. | 504 # Brotli support. |
| 483 deps += [ "//third_party/brotli" ] | 505 if (!disable_brotli_filter) { |
| 484 sources += [ "filter/brotli_filter.cc" ] | 506 sources += [ "filter/brotli_filter.cc" ] |
| 507 deps += [ "//third_party/brotli" ] | |
| 508 } else { | |
| 509 sources += [ "filter/brotli_filter_disabled.cc" ] | |
| 510 } | |
| 485 } | 511 } |
| 486 } | 512 } |
| 487 | 513 |
| 488 if (is_android) { | |
| 489 # Same as net, but with brotli encoding, ICU, file, ftp, and websocket | |
| 490 # support stripped. | |
| 491 component("net_small") { | |
| 492 sources = net_shared_sources | |
| 493 | |
| 494 # Add back some sources that were otherwise filtered out. | |
| 495 set_sources_assignment_filter([]) | |
| 496 sources += net_shared_unfiltered_sources | |
| 497 set_sources_assignment_filter(sources_assignment_filter) | |
| 498 | |
| 499 cflags = [] | |
| 500 defines = [] | |
| 501 configs += net_shared_configs | |
| 502 public_configs = [ ":net_config" ] | |
| 503 | |
| 504 public_deps = net_shared_public_deps + | |
| 505 [ "//url:url_lib_use_icu_alternatives_on_android" ] | |
| 506 deps = net_shared_deps + [ ":net_jni_headers" ] | |
| 507 | |
| 508 defines += [ | |
| 509 "DISABLE_FILE_SUPPORT", | |
| 510 "DISABLE_FTP_SUPPORT", | |
| 511 "USE_ICU_ALTERNATIVES_ON_ANDROID=1", | |
| 512 ] | |
| 513 | |
| 514 # Use ICU alternative on Android. | |
| 515 sources += [ | |
| 516 "base/net_string_util_icu_alternatives_android.cc", | |
| 517 "base/net_string_util_icu_alternatives_android.h", | |
| 518 ] | |
| 519 | |
| 520 # Disable Brotli support. | |
| 521 sources += [ "filter/brotli_filter_disabled.cc" ] | |
| 522 } | |
| 523 } | |
| 524 | |
| 525 grit("net_resources") { | 514 grit("net_resources") { |
| 526 source = "base/net_resources.grd" | 515 source = "base/net_resources.grd" |
| 527 use_qualified_include = true | 516 use_qualified_include = true |
| 528 outputs = [ | 517 outputs = [ |
| 529 "grit/net_resources.h", | 518 "grit/net_resources.h", |
| 530 "net_resources.pak", | 519 "net_resources.pak", |
| 531 ] | 520 ] |
| 532 } | 521 } |
| 533 | 522 |
| 534 proto_library("net_quic_proto") { | 523 proto_library("net_quic_proto") { |
| 535 visibility = [ | 524 visibility = [ ":net" ] |
| 536 ":net", | |
| 537 ":net_small", | |
| 538 ] | |
| 539 | 525 |
| 540 sources = [ | 526 sources = [ |
| 541 "quic/proto/cached_network_parameters.proto", | 527 "quic/proto/cached_network_parameters.proto", |
| 542 "quic/proto/source_address_token.proto", | 528 "quic/proto/source_address_token.proto", |
| 543 ] | 529 ] |
| 544 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:" | 530 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:" |
| 545 cc_include = "net/base/net_export.h" | 531 cc_include = "net/base/net_export.h" |
| 546 | 532 |
| 547 defines = [ "NET_IMPLEMENTATION" ] | 533 defines = [ "NET_IMPLEMENTATION" ] |
| 548 | 534 |
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1386 source_set("stale_while_revalidate_experiment_domains") { | 1372 source_set("stale_while_revalidate_experiment_domains") { |
| 1387 sources = [ | 1373 sources = [ |
| 1388 "base/stale_while_revalidate_experiment_domains.cc", | 1374 "base/stale_while_revalidate_experiment_domains.cc", |
| 1389 "base/stale_while_revalidate_experiment_domains.h", | 1375 "base/stale_while_revalidate_experiment_domains.h", |
| 1390 ] | 1376 ] |
| 1391 deps = [ | 1377 deps = [ |
| 1392 ":net", | 1378 ":net", |
| 1393 ":stale_while_revalidate_experiment_domains_dafsa", | 1379 ":stale_while_revalidate_experiment_domains_dafsa", |
| 1394 "//base", | 1380 "//base", |
| 1395 ] | 1381 ] |
| 1396 configs += net_shared_configs | 1382 configs += net_configs |
| 1397 } | 1383 } |
| 1398 | 1384 |
| 1399 if (!is_ios) { | 1385 if (!is_ios) { |
| 1400 executable("quic_client") { | 1386 executable("quic_client") { |
| 1401 sources = [ | 1387 sources = [ |
| 1402 "tools/quic/quic_simple_client_bin.cc", | 1388 "tools/quic/quic_simple_client_bin.cc", |
| 1403 ] | 1389 ] |
| 1404 deps = [ | 1390 deps = [ |
| 1405 ":net", | 1391 ":net", |
| 1406 ":simple_quic_tools", | 1392 ":simple_quic_tools", |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1652 if (is_ios) { | 1638 if (is_ios) { |
| 1653 sources -= [ | 1639 sources -= [ |
| 1654 # TODO(droger): The following tests are disabled because the | 1640 # TODO(droger): The following tests are disabled because the |
| 1655 # implementation is missing or incomplete. | 1641 # implementation is missing or incomplete. |
| 1656 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS. | 1642 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS. |
| 1657 "base/keygen_handler_unittest.cc", | 1643 "base/keygen_handler_unittest.cc", |
| 1658 "disk_cache/backend_unittest.cc", | 1644 "disk_cache/backend_unittest.cc", |
| 1659 "disk_cache/blockfile/block_files_unittest.cc", | 1645 "disk_cache/blockfile/block_files_unittest.cc", |
| 1660 | 1646 |
| 1661 # Need to read input data files. | 1647 # Need to read input data files. |
| 1662 "filter/brotli_filter_unittest.cc", | |
| 1663 "filter/gzip_filter_unittest.cc", | 1648 "filter/gzip_filter_unittest.cc", |
| 1664 "socket/ssl_server_socket_unittest.cc", | 1649 "socket/ssl_server_socket_unittest.cc", |
| 1665 "spdy/fuzzing/hpack_fuzz_util_test.cc", | 1650 "spdy/fuzzing/hpack_fuzz_util_test.cc", |
| 1666 | 1651 |
| 1667 # Need TestServer. | 1652 # Need TestServer. |
| 1668 "cert_net/cert_net_fetcher_impl_unittest.cc", | 1653 "cert_net/cert_net_fetcher_impl_unittest.cc", |
| 1669 "proxy/proxy_script_fetcher_impl_unittest.cc", | 1654 "proxy/proxy_script_fetcher_impl_unittest.cc", |
| 1670 "socket/ssl_client_socket_unittest.cc", | 1655 "socket/ssl_client_socket_unittest.cc", |
| 1671 "url_request/url_fetcher_impl_unittest.cc", | 1656 "url_request/url_fetcher_impl_unittest.cc", |
| 1672 "url_request/url_request_context_builder_unittest.cc", | 1657 "url_request/url_request_context_builder_unittest.cc", |
| 1673 | 1658 |
| 1674 # Needs GetAppOutput(). | 1659 # Needs GetAppOutput(). |
| 1675 "test/python_utils_unittest.cc", | 1660 "test/python_utils_unittest.cc", |
| 1676 | 1661 |
| 1677 # The following tests are disabled because they don't apply to | 1662 # The following tests are disabled because they don't apply to |
| 1678 # iOS. | 1663 # iOS. |
| 1679 # OS is not "linux" or "freebsd" or "openbsd". | 1664 # OS is not "linux" or "freebsd" or "openbsd". |
| 1680 "socket/unix_domain_client_socket_posix_unittest.cc", | 1665 "socket/unix_domain_client_socket_posix_unittest.cc", |
| 1681 "socket/unix_domain_server_socket_posix_unittest.cc", | 1666 "socket/unix_domain_server_socket_posix_unittest.cc", |
| 1682 | 1667 |
| 1683 # See bug http://crbug.com/344533. | 1668 # See bug http://crbug.com/344533. |
| 1684 "disk_cache/blockfile/index_table_v3_unittest.cc", | 1669 "disk_cache/blockfile/index_table_v3_unittest.cc", |
| 1685 ] | 1670 ] |
| 1686 } | 1671 } |
| 1687 | 1672 |
| 1673 # Unit tests that are not supported by the current ICU alternatives on Android . | |
| 1674 if (is_android && use_platform_icu_alternatives) { | |
| 1675 sources -= [ | |
| 1676 "base/filename_util_unittest.cc", | |
| 1677 "base/url_util_unittest.cc", | |
| 1678 "cert/x509_certificate_unittest.cc", | |
| 1679 "proxy/proxy_resolver_v8_unittest.cc", | |
| 1680 "url_request/url_request_job_unittest.cc", | |
| 1681 ] | |
| 1682 } | |
| 1683 | |
| 1684 # Unit tests that are not supported by the current ICU alternatives on iOS. | |
| 1685 if (is_ios && use_platform_icu_alternatives) { | |
| 1686 sources -= [ | |
| 1687 "base/filename_util_unittest.cc", | |
| 1688 "base/url_util_unittest.cc", | |
| 1689 "cert/x509_certificate_unittest.cc", | |
| 1690 "http/http_auth_handler_basic_unittest.cc", | |
| 1691 "http/http_auth_handler_digest_unittest.cc", | |
| 1692 "http/http_auth_handler_factory_unittest.cc", | |
| 1693 "http/http_auth_unittest.cc", | |
| 1694 "http/http_content_disposition_unittest.cc", | |
| 1695 "http/http_network_transaction_unittest.cc", | |
| 1696 "http/http_proxy_client_socket_pool_unittest.cc", | |
| 1697 "socket/ssl_client_socket_pool_unittest.cc", | |
| 1698 "spdy/spdy_network_transaction_unittest.cc", | |
| 1699 "spdy/spdy_proxy_client_socket_unittest.cc", | |
| 1700 "url_request/url_request_job_unittest.cc", | |
| 1701 "url_request/url_request_unittest.cc", | |
| 1702 ] | |
| 1703 } | |
| 1704 | |
| 1705 # Exclude brotli test if the support for brotli is disabled. | |
| 1706 # Also, exclude the test from iOS for now (needs to read input data files). | |
| 1707 if (disable_brotli_filter || is_ios) { | |
| 1708 sources -= [ "filter/brotli_filter_unittest.cc" ] | |
| 1709 } | |
| 1710 | |
| 1688 if (is_android) { | 1711 if (is_android) { |
| 1689 deps += [ | 1712 deps += [ |
| 1690 ":net_test_jni_headers", | 1713 ":net_test_jni_headers", |
| 1691 "//base:base_java_unittest_support", | 1714 "//base:base_java_unittest_support", |
| 1692 "//net/android:net_java", | 1715 "//net/android:net_java", |
| 1693 "//net/android:net_java_test_support", | 1716 "//net/android:net_java_test_support", |
| 1694 "//net/android:net_javatests", | 1717 "//net/android:net_javatests", |
| 1695 "//net/android:net_unittests_apk_resources", | 1718 "//net/android:net_unittests_apk_resources", |
| 1696 | 1719 |
| 1697 # TODO(mmenke): This depends on test_support_base, which depends on | 1720 # TODO(mmenke): This depends on test_support_base, which depends on |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1950 fuzzer_test("net_quic_crypto_framer_parse_message_fuzzer") { | 1973 fuzzer_test("net_quic_crypto_framer_parse_message_fuzzer") { |
| 1951 sources = [ | 1974 sources = [ |
| 1952 "quic/quic_crypto_framer_parse_message_fuzzer.cc", | 1975 "quic/quic_crypto_framer_parse_message_fuzzer.cc", |
| 1953 ] | 1976 ] |
| 1954 deps = [ | 1977 deps = [ |
| 1955 ":net_fuzzer_test_support", | 1978 ":net_fuzzer_test_support", |
| 1956 "//base", | 1979 "//base", |
| 1957 "//net", | 1980 "//net", |
| 1958 ] | 1981 ] |
| 1959 } | 1982 } |
| OLD | NEW |