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 } |
| 67 } | 71 } |
| 68 | 72 |
| 69 # net_internal_config is shared with net and net_small. | |
| 70 config("net_internal_config") { | 73 config("net_internal_config") { |
| 71 defines = [ | 74 defines = [ |
| 72 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to | 75 # 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 | 76 # 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 | 77 # 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 | 78 # doesn't seem to be set in the regular builds, so we're skipping this |
| 76 # capability here. | 79 # capability here. |
| 77 "DLOPEN_KERBEROS", | 80 "DLOPEN_KERBEROS", |
| 78 "NET_IMPLEMENTATION", | 81 "NET_IMPLEMENTATION", |
| 79 ] | 82 ] |
| 80 | 83 |
| 81 if (use_kerberos) { | 84 if (use_kerberos) { |
| 82 defines += [ "USE_KERBEROS" ] | 85 defines += [ "USE_KERBEROS" ] |
| 83 if (is_android) { | 86 if (is_android) { |
| 84 include_dirs = [ "/usr/include/kerberosV" ] | 87 include_dirs = [ "/usr/include/kerberosV" ] |
| 85 } | 88 } |
| 86 } | 89 } |
| 87 | 90 |
| 88 if (enable_built_in_dns) { | 91 if (enable_built_in_dns) { |
| 89 defines += [ "ENABLE_BUILT_IN_DNS" ] | 92 defines += [ "ENABLE_BUILT_IN_DNS" ] |
| 90 } | 93 } |
| 91 } | 94 } |
| 92 | 95 |
| 93 # net_shared_* are settings shared between net and net_small | 96 net_sources = gypi_values.net_nacl_common_sources |
| 94 net_shared_sources = gypi_values.net_nacl_common_sources | |
| 95 | 97 |
| 96 net_shared_unfiltered_sources = [] | 98 net_unfiltered_sources = [] |
| 97 | 99 |
| 98 net_shared_configs = [ | 100 net_configs = [ |
| 99 ":net_internal_config", | 101 ":net_internal_config", |
| 100 "//build/config:precompiled_headers", | 102 "//build/config:precompiled_headers", |
| 101 | 103 |
| 102 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 104 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 103 "//build/config/compiler:no_size_t_to_int_warning", | 105 "//build/config/compiler:no_size_t_to_int_warning", |
| 104 ] | 106 ] |
| 105 | 107 |
| 106 net_shared_public_deps = [ | 108 net_public_deps = [ |
| 107 ":net_quic_proto", | 109 ":net_quic_proto", |
| 108 "//crypto", | 110 "//crypto", |
| 109 "//crypto:platform", | 111 "//crypto:platform", |
| 110 ] | 112 ] |
| 111 | 113 |
| 112 net_shared_deps = [ | 114 net_deps = [ |
| 113 ":net_resources", | 115 ":net_resources", |
| 114 "//base", | 116 "//base", |
| 115 "//net/base/registry_controlled_domains", | 117 "//net/base/registry_controlled_domains", |
| 116 "//third_party/protobuf:protobuf_lite", | 118 "//third_party/protobuf:protobuf_lite", |
| 117 ] | 119 ] |
| 118 | 120 |
| 119 if (!is_nacl) { | 121 if (!is_nacl) { |
| 120 net_shared_sources += gypi_values.net_non_nacl_sources | 122 net_sources += gypi_values.net_non_nacl_sources |
| 121 | 123 |
| 122 net_shared_deps += [ | 124 net_deps += [ |
| 123 "//base/third_party/dynamic_annotations", | 125 "//base/third_party/dynamic_annotations", |
| 124 "//components/prefs", | 126 "//components/prefs", |
| 125 "//sdch", | 127 "//sdch", |
| 126 "//third_party/zlib", | 128 "//third_party/zlib", |
| 127 ] | 129 ] |
| 128 | 130 |
| 129 if (!use_kerberos) { | 131 if (!use_kerberos) { |
| 130 net_shared_sources -= [ | 132 net_sources -= [ |
| 131 "http/http_auth_handler_negotiate.cc", | 133 "http/http_auth_handler_negotiate.cc", |
| 132 "http/http_auth_handler_negotiate.h", | 134 "http/http_auth_handler_negotiate.h", |
| 133 ] | 135 ] |
| 134 } | 136 } |
| 135 | 137 |
| 136 if (is_posix) { | 138 if (is_posix) { |
| 137 if (posix_avoid_mmap) { | 139 if (posix_avoid_mmap) { |
| 138 net_shared_sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ] | 140 net_sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ] |
| 139 } else { | 141 } else { |
| 140 net_shared_sources -= | 142 net_sources -= [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ] |
| 141 [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ] | |
| 142 } | 143 } |
| 143 } | 144 } |
| 144 | 145 |
| 145 if (!enable_built_in_dns) { | 146 if (!enable_built_in_dns) { |
| 146 net_shared_sources -= [ | 147 net_sources -= [ |
| 147 "dns/address_sorter_posix.cc", | 148 "dns/address_sorter_posix.cc", |
| 148 "dns/address_sorter_posix.h", | 149 "dns/address_sorter_posix.h", |
| 149 "dns/dns_client.cc", | 150 "dns/dns_client.cc", |
| 150 ] | 151 ] |
| 151 } | 152 } |
| 152 | 153 |
| 153 if (use_openssl) { | 154 if (use_openssl) { |
| 154 net_shared_sources -= [ | 155 net_sources -= [ |
| 155 "base/nss_memio.c", | 156 "base/nss_memio.c", |
| 156 "base/nss_memio.h", | 157 "base/nss_memio.h", |
| 157 "cert/ct_log_verifier_nss.cc", | 158 "cert/ct_log_verifier_nss.cc", |
| 158 "cert/ct_objects_extractor_nss.cc", | 159 "cert/ct_objects_extractor_nss.cc", |
| 159 "cert/jwk_serializer_nss.cc", | 160 "cert/jwk_serializer_nss.cc", |
| 160 "cert/scoped_nss_types.h", | 161 "cert/scoped_nss_types.h", |
| 161 "cert/x509_util_nss.cc", | 162 "cert/x509_util_nss.cc", |
| 162 "quic/crypto/aead_base_decrypter_nss.cc", | 163 "quic/crypto/aead_base_decrypter_nss.cc", |
| 163 "quic/crypto/aead_base_encrypter_nss.cc", | 164 "quic/crypto/aead_base_encrypter_nss.cc", |
| 164 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc", | 165 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc", |
| 165 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc", | 166 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc", |
| 166 "quic/crypto/chacha20_poly1305_decrypter_nss.cc", | 167 "quic/crypto/chacha20_poly1305_decrypter_nss.cc", |
| 167 "quic/crypto/chacha20_poly1305_encrypter_nss.cc", | 168 "quic/crypto/chacha20_poly1305_encrypter_nss.cc", |
| 168 "quic/crypto/chacha20_poly1305_rfc7539_decrypter_nss.cc", | 169 "quic/crypto/chacha20_poly1305_rfc7539_decrypter_nss.cc", |
| 169 "quic/crypto/chacha20_poly1305_rfc7539_encrypter_nss.cc", | 170 "quic/crypto/chacha20_poly1305_rfc7539_encrypter_nss.cc", |
| 170 "quic/crypto/channel_id_nss.cc", | 171 "quic/crypto/channel_id_nss.cc", |
| 171 "quic/crypto/p256_key_exchange_nss.cc", | 172 "quic/crypto/p256_key_exchange_nss.cc", |
| 172 "quic/crypto/proof_source_chromium_nss.cc", | 173 "quic/crypto/proof_source_chromium_nss.cc", |
| 173 "socket/nss_ssl_util.cc", | 174 "socket/nss_ssl_util.cc", |
| 174 "socket/nss_ssl_util.h", | 175 "socket/nss_ssl_util.h", |
| 175 "socket/ssl_client_socket_nss.cc", | 176 "socket/ssl_client_socket_nss.cc", |
| 176 "socket/ssl_client_socket_nss.h", | 177 "socket/ssl_client_socket_nss.h", |
| 177 "socket/ssl_server_socket_nss.cc", | 178 "socket/ssl_server_socket_nss.cc", |
| 178 "socket/ssl_server_socket_nss.h", | 179 "socket/ssl_server_socket_nss.h", |
| 179 "ssl/token_binding_nss.cc", | 180 "ssl/token_binding_nss.cc", |
| 180 ] | 181 ] |
| 181 if (is_ios) { | 182 if (is_ios) { |
| 182 net_shared_sources -= [ | 183 net_sources -= [ |
| 183 "cert/x509_util_ios.cc", | 184 "cert/x509_util_ios.cc", |
| 184 "cert/x509_util_ios.h", | 185 "cert/x509_util_ios.h", |
| 185 ] | 186 ] |
| 186 } | 187 } |
| 187 } else { | 188 } else { |
| 188 net_shared_sources -= [ | 189 net_sources -= [ |
| 189 "cert/ct_log_verifier_openssl.cc", | 190 "cert/ct_log_verifier_openssl.cc", |
| 190 "cert/ct_objects_extractor_openssl.cc", | 191 "cert/ct_objects_extractor_openssl.cc", |
| 191 "cert/jwk_serializer_openssl.cc", | 192 "cert/jwk_serializer_openssl.cc", |
| 192 "cert/x509_util_openssl.cc", | 193 "cert/x509_util_openssl.cc", |
| 193 "cert/x509_util_openssl.h", | 194 "cert/x509_util_openssl.h", |
| 194 "quic/crypto/aead_base_decrypter_openssl.cc", | 195 "quic/crypto/aead_base_decrypter_openssl.cc", |
| 195 "quic/crypto/aead_base_encrypter_openssl.cc", | 196 "quic/crypto/aead_base_encrypter_openssl.cc", |
| 196 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc", | 197 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc", |
| 197 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc", | 198 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc", |
| 198 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc", | 199 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc", |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 219 "ssl/ssl_platform_key_task_runner.h", | 220 "ssl/ssl_platform_key_task_runner.h", |
| 220 "ssl/test_ssl_private_key.cc", | 221 "ssl/test_ssl_private_key.cc", |
| 221 "ssl/test_ssl_private_key.h", | 222 "ssl/test_ssl_private_key.h", |
| 222 "ssl/threaded_ssl_private_key.cc", | 223 "ssl/threaded_ssl_private_key.cc", |
| 223 "ssl/threaded_ssl_private_key.h", | 224 "ssl/threaded_ssl_private_key.h", |
| 224 "ssl/token_binding_openssl.cc", | 225 "ssl/token_binding_openssl.cc", |
| 225 ] | 226 ] |
| 226 } | 227 } |
| 227 | 228 |
| 228 if (!use_openssl_certs) { | 229 if (!use_openssl_certs) { |
| 229 net_shared_sources -= [ | 230 net_sources -= [ |
| 230 "base/crypto_module_openssl.cc", | 231 "base/crypto_module_openssl.cc", |
| 231 "base/keygen_handler_openssl.cc", | 232 "base/keygen_handler_openssl.cc", |
| 232 "base/openssl_private_key_store.h", | 233 "base/openssl_private_key_store.h", |
| 233 "base/openssl_private_key_store_memory.cc", | 234 "base/openssl_private_key_store_memory.cc", |
| 234 "cert/cert_database_openssl.cc", | 235 "cert/cert_database_openssl.cc", |
| 235 "cert/cert_verify_proc_openssl.cc", | 236 "cert/cert_verify_proc_openssl.cc", |
| 236 "cert/cert_verify_proc_openssl.h", | 237 "cert/cert_verify_proc_openssl.h", |
| 237 "cert/test_root_certs_openssl.cc", | 238 "cert/test_root_certs_openssl.cc", |
| 238 "cert/x509_certificate_openssl.cc", | 239 "cert/x509_certificate_openssl.cc", |
| 239 "ssl/openssl_client_key_store.cc", | 240 "ssl/openssl_client_key_store.cc", |
| 240 "ssl/openssl_client_key_store.h", | 241 "ssl/openssl_client_key_store.h", |
| 241 ] | 242 ] |
| 242 if (is_android) { | 243 if (is_android) { |
| 243 net_shared_sources -= [ "base/openssl_private_key_store_android.cc" ] | 244 net_sources -= [ "base/openssl_private_key_store_android.cc" ] |
| 244 } | 245 } |
| 245 } else { | 246 } else { |
| 246 if (is_android) { | 247 if (is_android) { |
| 247 # Android doesn't use these even when using OpenSSL. | 248 # Android doesn't use these even when using OpenSSL. |
| 248 net_shared_sources -= [ | 249 net_sources -= [ |
| 249 "base/openssl_private_key_store_memory.cc", | 250 "base/openssl_private_key_store_memory.cc", |
| 250 "cert/cert_database_openssl.cc", | 251 "cert/cert_database_openssl.cc", |
| 251 "cert/cert_verify_proc_openssl.cc", | 252 "cert/cert_verify_proc_openssl.cc", |
| 252 "cert/test_root_certs_openssl.cc", | 253 "cert/test_root_certs_openssl.cc", |
| 253 ] | 254 ] |
| 254 } | 255 } |
| 255 } | 256 } |
| 256 | 257 |
| 257 if (!use_kerberos || is_android) { | 258 if (!use_kerberos || is_android) { |
| 258 net_shared_sources -= [ | 259 net_sources -= [ |
| 259 "http/http_auth_gssapi_posix.cc", | 260 "http/http_auth_gssapi_posix.cc", |
| 260 "http/http_auth_gssapi_posix.h", | 261 "http/http_auth_gssapi_posix.h", |
| 261 ] | 262 ] |
| 262 } | 263 } |
| 263 | 264 |
| 264 if (use_glib && use_gconf && !is_chromeos) { | 265 if (use_glib && use_gconf && !is_chromeos) { |
| 265 net_shared_configs += [ "//build/config/linux:gconf" ] | 266 net_configs += [ "//build/config/linux:gconf" ] |
| 266 net_shared_deps += [ "//build/linux:gio" ] | 267 net_deps += [ "//build/linux:gio" ] |
| 267 } | 268 } |
| 268 | 269 |
| 269 if (is_linux) { | 270 if (is_linux) { |
| 270 net_shared_configs += [ "//build/config/linux:libresolv" ] | 271 net_configs += [ "//build/config/linux:libresolv" ] |
| 271 } | 272 } |
| 272 | 273 |
| 273 if (!use_nss_certs) { | 274 if (!use_nss_certs) { |
| 274 net_shared_sources -= [ | 275 net_sources -= [ |
| 275 "base/crypto_module_nss.cc", | 276 "base/crypto_module_nss.cc", |
| 276 "base/keygen_handler_nss.cc", | 277 "base/keygen_handler_nss.cc", |
| 277 "cert/cert_database_nss.cc", | 278 "cert/cert_database_nss.cc", |
| 278 "cert/nss_cert_database.cc", | 279 "cert/nss_cert_database.cc", |
| 279 "cert/nss_cert_database.h", | 280 "cert/nss_cert_database.h", |
| 280 "cert/x509_certificate_nss.cc", | 281 "cert/x509_certificate_nss.cc", |
| 281 "ssl/client_cert_store_nss.cc", | 282 "ssl/client_cert_store_nss.cc", |
| 282 "ssl/client_cert_store_nss.h", | 283 "ssl/client_cert_store_nss.h", |
| 283 "third_party/mozilla_security_manager/nsKeygenHandler.cpp", | 284 "third_party/mozilla_security_manager/nsKeygenHandler.cpp", |
| 284 "third_party/mozilla_security_manager/nsKeygenHandler.h", | 285 "third_party/mozilla_security_manager/nsKeygenHandler.h", |
| 285 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp", | 286 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp", |
| 286 "third_party/mozilla_security_manager/nsNSSCertificateDB.h", | 287 "third_party/mozilla_security_manager/nsNSSCertificateDB.h", |
| 287 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp", | 288 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp", |
| 288 "third_party/mozilla_security_manager/nsPKCS12Blob.h", | 289 "third_party/mozilla_security_manager/nsPKCS12Blob.h", |
| 289 ] | 290 ] |
| 290 if (is_chromeos) { | 291 if (is_chromeos) { |
| 291 # These were already removed on non-ChromeOS. | 292 # These were already removed on non-ChromeOS. |
| 292 net_shared_sources -= [ | 293 net_sources -= [ |
| 293 "cert/nss_cert_database_chromeos.cc", | 294 "cert/nss_cert_database_chromeos.cc", |
| 294 "cert/nss_cert_database_chromeos.h", | 295 "cert/nss_cert_database_chromeos.h", |
| 295 "cert/nss_profile_filter_chromeos.cc", | 296 "cert/nss_profile_filter_chromeos.cc", |
| 296 "cert/nss_profile_filter_chromeos.h", | 297 "cert/nss_profile_filter_chromeos.h", |
| 297 ] | 298 ] |
| 298 } | 299 } |
| 299 net_shared_sources -= [ | 300 net_sources -= [ |
| 300 "ssl/client_key_store.cc", | 301 "ssl/client_key_store.cc", |
| 301 "ssl/client_key_store.h", | 302 "ssl/client_key_store.h", |
| 302 "ssl/ssl_platform_key_nss.cc", | 303 "ssl/ssl_platform_key_nss.cc", |
| 303 ] | 304 ] |
| 304 } else if (use_openssl) { | 305 } else if (use_openssl) { |
| 305 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's | 306 # 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 | 307 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file |
| 307 # in directly. | 308 # in directly. |
| 308 net_shared_sources += [ "third_party/nss/ssl/cmpcert.c" ] | 309 net_sources += [ "third_party/nss/ssl/cmpcert.c" ] |
| 309 } | 310 } |
| 310 | 311 |
| 311 if (!use_nss_verifier) { | 312 if (!use_nss_verifier) { |
| 312 # These files are part of the partial implementation of NSS for | 313 # These files are part of the partial implementation of NSS for |
| 313 # cert verification, so keep them in that case. | 314 # cert verification, so keep them in that case. |
| 314 net_shared_sources -= [ | 315 net_sources -= [ |
| 315 "cert/cert_verify_proc_nss.cc", | 316 "cert/cert_verify_proc_nss.cc", |
| 316 "cert/cert_verify_proc_nss.h", | 317 "cert/cert_verify_proc_nss.h", |
| 317 "cert/test_root_certs_nss.cc", | 318 "cert/test_root_certs_nss.cc", |
| 318 "cert/x509_util_nss_certs.cc", | 319 "cert/x509_util_nss_certs.cc", |
| 319 "cert_net/nss_ocsp.cc", | 320 "cert_net/nss_ocsp.cc", |
| 320 "cert_net/nss_ocsp.h", | 321 "cert_net/nss_ocsp.h", |
| 321 ] | 322 ] |
| 322 } | 323 } |
| 323 | 324 |
| 324 if (is_ios && use_nss_verifier) { | 325 if (is_ios && use_nss_verifier) { |
| 325 net_shared_sources -= [ | 326 net_sources -= [ |
| 326 "cert/cert_verify_proc_ios.cc", | 327 "cert/cert_verify_proc_ios.cc", |
| 327 "cert/cert_verify_proc_ios.h", | 328 "cert/cert_verify_proc_ios.h", |
| 328 "cert/x509_certificate_openssl_ios.cc", | 329 "cert/x509_certificate_openssl_ios.cc", |
| 329 ] | 330 ] |
| 330 } | 331 } |
| 331 | 332 |
| 332 if (is_chromecast && use_nss_certs) { | 333 if (is_chromecast && use_nss_certs) { |
| 333 net_shared_sources += [ "ssl/ssl_platform_key_chromecast.cc" ] | 334 net_sources += [ "ssl/ssl_platform_key_chromecast.cc" ] |
| 334 net_shared_sources -= [ "ssl/ssl_platform_key_nss.cc" ] | 335 net_sources -= [ "ssl/ssl_platform_key_nss.cc" ] |
| 335 } | 336 } |
| 336 | 337 |
| 337 if (!enable_mdns) { | 338 if (!enable_mdns) { |
| 338 net_shared_sources -= [ | 339 net_sources -= [ |
| 339 "dns/mdns_cache.cc", | 340 "dns/mdns_cache.cc", |
| 340 "dns/mdns_cache.h", | 341 "dns/mdns_cache.h", |
| 341 "dns/mdns_client.cc", | 342 "dns/mdns_client.cc", |
| 342 "dns/mdns_client.h", | 343 "dns/mdns_client.h", |
| 343 "dns/mdns_client_impl.cc", | 344 "dns/mdns_client_impl.cc", |
| 344 "dns/mdns_client_impl.h", | 345 "dns/mdns_client_impl.h", |
| 345 "dns/record_parsed.cc", | 346 "dns/record_parsed.cc", |
| 346 "dns/record_parsed.h", | 347 "dns/record_parsed.h", |
| 347 "dns/record_rdata.cc", | 348 "dns/record_rdata.cc", |
| 348 "dns/record_rdata.h", | 349 "dns/record_rdata.h", |
| 349 ] | 350 ] |
| 350 } | 351 } |
| 351 | 352 |
| 352 if (is_win) { | 353 if (is_win) { |
| 353 net_shared_sources -= [ "http/http_auth_handler_ntlm_portable.cc" ] | 354 net_sources -= [ "http/http_auth_handler_ntlm_portable.cc" ] |
| 354 } else { # !is_win | 355 } else { # !is_win |
| 355 net_shared_sources -= [ | 356 net_sources -= [ |
| 356 "base/winsock_init.cc", | 357 "base/winsock_init.cc", |
| 357 "base/winsock_init.h", | 358 "base/winsock_init.h", |
| 358 "base/winsock_util.cc", | 359 "base/winsock_util.cc", |
| 359 "base/winsock_util.h", | 360 "base/winsock_util.h", |
| 360 "proxy/proxy_resolver_winhttp.cc", | 361 "proxy/proxy_resolver_winhttp.cc", |
| 361 "proxy/proxy_resolver_winhttp.h", | 362 "proxy/proxy_resolver_winhttp.h", |
| 362 ] | 363 ] |
| 363 } | 364 } |
| 364 | 365 |
| 365 if (is_ios) { | 366 if (is_ios) { |
| 366 # Add back some sources that were otherwise filtered out. iOS needs some Mac | 367 # Add back some sources that were otherwise filtered out. iOS needs some Mac |
| 367 # files. | 368 # files. |
| 368 net_shared_unfiltered_sources += [ | 369 net_unfiltered_sources += [ |
| 369 "base/mac/url_conversions.h", | 370 "base/mac/url_conversions.h", |
| 370 "base/mac/url_conversions.mm", | 371 "base/mac/url_conversions.mm", |
| 371 "base/network_change_notifier_mac.cc", | 372 "base/network_change_notifier_mac.cc", |
| 372 "base/network_config_watcher_mac.cc", | 373 "base/network_config_watcher_mac.cc", |
| 373 "base/network_interfaces_mac.cc", | 374 "base/network_interfaces_mac.cc", |
| 374 "base/network_interfaces_mac.h", | 375 "base/network_interfaces_mac.h", |
| 375 "base/platform_mime_util_mac.mm", | 376 "base/platform_mime_util_mac.mm", |
| 376 "proxy/proxy_resolver_mac.cc", | 377 "proxy/proxy_resolver_mac.cc", |
| 377 "proxy/proxy_server_mac.cc", | 378 "proxy/proxy_server_mac.cc", |
| 378 ] | 379 ] |
| 379 | 380 |
| 380 net_shared_sources -= [ "disk_cache/blockfile/file_posix.cc" ] | 381 net_sources -= [ "disk_cache/blockfile/file_posix.cc" ] |
| 381 net_shared_deps += [ | 382 net_deps += [ |
| 382 "//third_party/nss:nspr", | 383 "//third_party/nss:nspr", |
| 383 "//third_party/nss", | 384 "//third_party/nss", |
| 384 "//net/third_party/nss/ssl:libssl", | 385 "//net/third_party/nss/ssl:libssl", |
| 385 ] | 386 ] |
| 386 } | 387 } |
| 387 | 388 |
| 388 if (is_ios && !use_nss_verifier) { | 389 if (is_ios && !use_nss_verifier) { |
| 389 net_shared_sources += [ "cert/test_root_certs_mac.cc" ] | 390 net_sources += [ "cert/test_root_certs_mac.cc" ] |
| 390 } | 391 } |
| 391 | 392 |
| 392 if (is_ios || is_mac) { | 393 if (is_ios || is_mac) { |
| 393 net_shared_sources += gypi_values.net_base_mac_ios_sources | 394 net_sources += gypi_values.net_base_mac_ios_sources |
| 394 } | 395 } |
| 395 | 396 |
| 396 if (is_android) { | 397 if (is_android) { |
| 397 net_shared_deps += [ ":net_jni_headers" ] | 398 net_deps += [ ":net_jni_headers" ] |
| 398 | 399 |
| 399 # Add some Linux sources that were excluded by the filter, but which | 400 # Add some Linux sources that were excluded by the filter, but which |
| 400 # are needed. | 401 # are needed. |
| 401 net_shared_unfiltered_sources += [ | 402 net_unfiltered_sources += [ |
| 402 "base/address_tracker_linux.cc", | 403 "base/address_tracker_linux.cc", |
| 403 "base/address_tracker_linux.h", | 404 "base/address_tracker_linux.h", |
| 404 "base/network_interfaces_linux.cc", | 405 "base/network_interfaces_linux.cc", |
| 405 "base/network_interfaces_linux.h", | 406 "base/network_interfaces_linux.h", |
| 406 "base/platform_mime_util_linux.cc", | 407 "base/platform_mime_util_linux.cc", |
| 407 ] | 408 ] |
| 408 } | 409 } |
| 409 } else { | 410 } else { |
| 410 net_shared_public_deps += [ "//native_client_sdk/src/libraries/nacl_io" ] | 411 net_public_deps += [ "//native_client_sdk/src/libraries/nacl_io" ] |
| 411 } | 412 } |
| 412 | 413 |
| 413 component("net") { | 414 component("net") { |
| 414 sources = net_shared_sources | 415 sources = net_sources |
| 415 | 416 |
| 416 # Add back some sources that were otherwise filtered out. | 417 # Add back some sources that were otherwise filtered out. |
| 417 set_sources_assignment_filter([]) | 418 set_sources_assignment_filter([]) |
| 418 sources += net_shared_unfiltered_sources | 419 sources += net_unfiltered_sources |
| 419 set_sources_assignment_filter(sources_assignment_filter) | 420 set_sources_assignment_filter(sources_assignment_filter) |
| 420 | 421 |
| 421 cflags = [] | 422 cflags = [] |
| 422 configs += net_shared_configs | 423 configs += net_configs |
| 423 public_configs = [ ":net_config" ] | 424 public_configs = [ ":net_config" ] |
| 424 | 425 |
| 425 public_deps = net_shared_public_deps + [ "//url" ] | 426 public_deps = net_public_deps + [ "//url" ] |
| 426 deps = net_shared_deps | 427 deps = net_deps |
| 427 | 428 |
| 428 if (is_mac) { | 429 if (is_mac) { |
| 429 libs = [ | 430 libs = [ |
| 430 "Foundation.framework", | 431 "Foundation.framework", |
| 431 "Security.framework", | 432 "Security.framework", |
| 432 "SystemConfiguration.framework", | 433 "SystemConfiguration.framework", |
| 433 "resolv", | 434 "resolv", |
| 434 ] | 435 ] |
| 435 } | 436 } |
| 436 | 437 |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 451 | 452 |
| 452 if (!disable_ftp_support) { | 453 if (!disable_ftp_support) { |
| 453 sources += gypi_values.net_ftp_support_sources | 454 sources += gypi_values.net_ftp_support_sources |
| 454 } | 455 } |
| 455 | 456 |
| 456 if (enable_websockets) { | 457 if (enable_websockets) { |
| 457 sources += gypi_values.net_websockets_sources | 458 sources += gypi_values.net_websockets_sources |
| 458 } | 459 } |
| 459 | 460 |
| 460 # ICU support. | 461 # ICU support. |
| 461 deps += [ | 462 if (is_android && use_platform_icu_alternatives) { |
|
mef
2016/04/01 20:42:50
are nested ifs allowed in gn?
If so, maybe do
i
kapishnikov
2016/04/04 20:17:26
Done with failing the build if use_platform_icu_al
| |
| 462 "//base:i18n", | 463 # Use ICU alternative on Android. |
| 463 "//third_party/icu", | 464 sources += [ |
| 464 ] | 465 "base/net_string_util_icu_alternatives_android.cc", |
| 465 sources += [ | 466 "base/net_string_util_icu_alternatives_android.h", |
| 466 "base/filename_util_icu.cc", | 467 ] |
| 467 "base/net_string_util_icu.cc", | 468 defines = [ "USE_PLATFORM_ICU_ALTERNATIVES=1" ] |
| 468 ] | 469 deps += [ ":net_jni_headers" ] |
|
mef
2016/04/01 20:42:50
Is it needed? I'd think that net_jni_headers is ad
kapishnikov
2016/04/04 20:17:27
net_jni_headers are added automatically only if "i
| |
| 470 } else if (is_ios && use_platform_icu_alternatives) { | |
| 471 # Use ICU alternative on Android. | |
| 472 sources += [ "base/net_string_util_icu_alternatives_ios.mm" ] | |
| 473 defines = [ "USE_PLATFORM_ICU_ALTERNATIVES=1" ] | |
| 474 } else { # use third-party ICU implementation by default. | |
| 475 deps += [ | |
| 476 "//base:i18n", | |
| 477 "//third_party/icu", | |
| 478 ] | |
| 479 sources += [ | |
| 480 "base/filename_util_icu.cc", | |
| 481 "base/net_string_util_icu.cc", | |
| 482 ] | |
| 483 } | |
| 469 | 484 |
| 470 # Brotli support. | 485 # Brotli support. |
| 471 deps += [ "//third_party/brotli" ] | 486 if (!disable_brotli_filter) { |
| 472 sources += [ "filter/brotli_filter.cc" ] | 487 sources += [ "filter/brotli_filter.cc" ] |
| 488 deps += [ "//third_party/brotli" ] | |
| 489 } else { | |
| 490 sources += [ "filter/brotli_filter_disabled.cc" ] | |
| 491 } | |
| 473 } | 492 } |
| 474 } | 493 } |
| 475 | 494 |
| 476 if (is_android) { | |
| 477 # Same as net, but with brotli encoding, ICU, file, ftp, and websocket | |
| 478 # support stripped. | |
| 479 component("net_small") { | |
| 480 sources = net_shared_sources | |
| 481 | |
| 482 # Add back some sources that were otherwise filtered out. | |
| 483 set_sources_assignment_filter([]) | |
| 484 sources += net_shared_unfiltered_sources | |
| 485 set_sources_assignment_filter(sources_assignment_filter) | |
| 486 | |
| 487 cflags = [] | |
| 488 defines = [] | |
| 489 configs += net_shared_configs | |
| 490 public_configs = [ ":net_config" ] | |
| 491 | |
| 492 public_deps = net_shared_public_deps + | |
| 493 [ "//url:url_lib_use_icu_alternatives_on_android" ] | |
| 494 deps = net_shared_deps + [ ":net_jni_headers" ] | |
| 495 | |
| 496 defines += [ | |
| 497 "DISABLE_FILE_SUPPORT", | |
| 498 "DISABLE_FTP_SUPPORT", | |
| 499 "USE_ICU_ALTERNATIVES_ON_ANDROID=1", | |
| 500 ] | |
| 501 | |
| 502 # Use ICU alternative on Android. | |
| 503 sources += [ | |
| 504 "base/net_string_util_icu_alternatives_android.cc", | |
| 505 "base/net_string_util_icu_alternatives_android.h", | |
| 506 ] | |
| 507 | |
| 508 # Disable Brotli support. | |
| 509 sources += [ "filter/brotli_filter_disabled.cc" ] | |
| 510 } | |
| 511 } | |
| 512 | |
| 513 grit("net_resources") { | 495 grit("net_resources") { |
| 514 source = "base/net_resources.grd" | 496 source = "base/net_resources.grd" |
| 515 use_qualified_include = true | 497 use_qualified_include = true |
| 516 outputs = [ | 498 outputs = [ |
| 517 "grit/net_resources.h", | 499 "grit/net_resources.h", |
| 518 "net_resources.pak", | 500 "net_resources.pak", |
| 519 ] | 501 ] |
| 520 } | 502 } |
| 521 | 503 |
| 522 proto_library("net_quic_proto") { | 504 proto_library("net_quic_proto") { |
| 523 visibility = [ | 505 visibility = [ ":net" ] |
| 524 ":net", | |
| 525 ":net_small", | |
| 526 ] | |
| 527 | 506 |
| 528 sources = [ | 507 sources = [ |
| 529 "quic/proto/cached_network_parameters.proto", | 508 "quic/proto/cached_network_parameters.proto", |
| 530 "quic/proto/source_address_token.proto", | 509 "quic/proto/source_address_token.proto", |
| 531 ] | 510 ] |
| 532 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:" | 511 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:" |
| 533 cc_include = "net/base/net_export.h" | 512 cc_include = "net/base/net_export.h" |
| 534 | 513 |
| 535 defines = [ "NET_IMPLEMENTATION" ] | 514 defines = [ "NET_IMPLEMENTATION" ] |
| 536 | 515 |
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1374 source_set("stale_while_revalidate_experiment_domains") { | 1353 source_set("stale_while_revalidate_experiment_domains") { |
| 1375 sources = [ | 1354 sources = [ |
| 1376 "base/stale_while_revalidate_experiment_domains.cc", | 1355 "base/stale_while_revalidate_experiment_domains.cc", |
| 1377 "base/stale_while_revalidate_experiment_domains.h", | 1356 "base/stale_while_revalidate_experiment_domains.h", |
| 1378 ] | 1357 ] |
| 1379 deps = [ | 1358 deps = [ |
| 1380 ":net", | 1359 ":net", |
| 1381 ":stale_while_revalidate_experiment_domains_dafsa", | 1360 ":stale_while_revalidate_experiment_domains_dafsa", |
| 1382 "//base", | 1361 "//base", |
| 1383 ] | 1362 ] |
| 1384 configs += net_shared_configs | 1363 configs += net_configs |
| 1385 } | 1364 } |
| 1386 | 1365 |
| 1387 if (!is_ios) { | 1366 if (!is_ios) { |
| 1388 executable("quic_client") { | 1367 executable("quic_client") { |
| 1389 sources = [ | 1368 sources = [ |
| 1390 "tools/quic/quic_simple_client_bin.cc", | 1369 "tools/quic/quic_simple_client_bin.cc", |
| 1391 ] | 1370 ] |
| 1392 deps = [ | 1371 deps = [ |
| 1393 ":net", | 1372 ":net", |
| 1394 ":simple_quic_tools", | 1373 ":simple_quic_tools", |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1639 if (is_ios) { | 1618 if (is_ios) { |
| 1640 sources -= [ | 1619 sources -= [ |
| 1641 # TODO(droger): The following tests are disabled because the | 1620 # TODO(droger): The following tests are disabled because the |
| 1642 # implementation is missing or incomplete. | 1621 # implementation is missing or incomplete. |
| 1643 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS. | 1622 # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS. |
| 1644 "base/keygen_handler_unittest.cc", | 1623 "base/keygen_handler_unittest.cc", |
| 1645 "disk_cache/backend_unittest.cc", | 1624 "disk_cache/backend_unittest.cc", |
| 1646 "disk_cache/blockfile/block_files_unittest.cc", | 1625 "disk_cache/blockfile/block_files_unittest.cc", |
| 1647 | 1626 |
| 1648 # Need to read input data files. | 1627 # Need to read input data files. |
| 1649 "filter/brotli_filter_unittest.cc", | |
| 1650 "filter/gzip_filter_unittest.cc", | 1628 "filter/gzip_filter_unittest.cc", |
| 1651 "socket/ssl_server_socket_unittest.cc", | 1629 "socket/ssl_server_socket_unittest.cc", |
| 1652 "spdy/fuzzing/hpack_fuzz_util_test.cc", | 1630 "spdy/fuzzing/hpack_fuzz_util_test.cc", |
| 1653 | 1631 |
| 1654 # Need TestServer. | 1632 # Need TestServer. |
| 1655 "cert_net/cert_net_fetcher_impl_unittest.cc", | 1633 "cert_net/cert_net_fetcher_impl_unittest.cc", |
| 1656 "proxy/proxy_script_fetcher_impl_unittest.cc", | 1634 "proxy/proxy_script_fetcher_impl_unittest.cc", |
| 1657 "socket/ssl_client_socket_unittest.cc", | 1635 "socket/ssl_client_socket_unittest.cc", |
| 1658 "url_request/url_fetcher_impl_unittest.cc", | 1636 "url_request/url_fetcher_impl_unittest.cc", |
| 1659 "url_request/url_request_context_builder_unittest.cc", | 1637 "url_request/url_request_context_builder_unittest.cc", |
| 1660 | 1638 |
| 1661 # Needs GetAppOutput(). | 1639 # Needs GetAppOutput(). |
| 1662 "test/python_utils_unittest.cc", | 1640 "test/python_utils_unittest.cc", |
| 1663 | 1641 |
| 1664 # The following tests are disabled because they don't apply to | 1642 # The following tests are disabled because they don't apply to |
| 1665 # iOS. | 1643 # iOS. |
| 1666 # OS is not "linux" or "freebsd" or "openbsd". | 1644 # OS is not "linux" or "freebsd" or "openbsd". |
| 1667 "socket/unix_domain_client_socket_posix_unittest.cc", | 1645 "socket/unix_domain_client_socket_posix_unittest.cc", |
| 1668 "socket/unix_domain_server_socket_posix_unittest.cc", | 1646 "socket/unix_domain_server_socket_posix_unittest.cc", |
| 1669 | 1647 |
| 1670 # See bug http://crbug.com/344533. | 1648 # See bug http://crbug.com/344533. |
| 1671 "disk_cache/blockfile/index_table_v3_unittest.cc", | 1649 "disk_cache/blockfile/index_table_v3_unittest.cc", |
| 1672 ] | 1650 ] |
| 1673 } | 1651 } |
| 1674 | 1652 |
| 1653 # Unit tests that are not supported by the current ICU alternatives on Android . | |
| 1654 if (is_android && use_platform_icu_alternatives) { | |
| 1655 sources -= [ | |
| 1656 "base/filename_util_unittest.cc", | |
| 1657 "base/url_util_unittest.cc", | |
| 1658 "cert/x509_certificate_unittest.cc", | |
| 1659 "proxy/proxy_resolver_v8_unittest.cc", | |
| 1660 "url_request/url_request_job_unittest.cc", | |
| 1661 ] | |
| 1662 } | |
| 1663 | |
| 1664 # Unit tests that are not supported by the current ICU alternatives on iOS. | |
| 1665 if (is_ios && use_platform_icu_alternatives) { | |
| 1666 sources -= [ | |
| 1667 "base/filename_util_unittest.cc", | |
| 1668 "base/url_util_unittest.cc", | |
| 1669 "cert/x509_certificate_unittest.cc", | |
| 1670 "http/http_auth_handler_basic_unittest.cc", | |
| 1671 "http/http_auth_handler_digest_unittest.cc", | |
| 1672 "http/http_auth_handler_factory_unittest.cc", | |
| 1673 "http/http_auth_unittest.cc", | |
| 1674 "http/http_content_disposition_unittest.cc", | |
| 1675 "http/http_network_transaction_unittest.cc", | |
| 1676 "http/http_proxy_client_socket_pool_unittest.cc", | |
| 1677 "socket/ssl_client_socket_pool_unittest.cc", | |
| 1678 "spdy/spdy_network_transaction_unittest.cc", | |
| 1679 "spdy/spdy_proxy_client_socket_unittest.cc", | |
| 1680 "url_request/url_request_job_unittest.cc", | |
| 1681 "url_request/url_request_unittest.cc", | |
| 1682 ] | |
| 1683 } | |
| 1684 | |
| 1685 # Exclude brotli test if the support for brotli is disabled. | |
| 1686 # Also, exclude the test from iOS for now (needs to read input data files). | |
| 1687 if (disable_brotli_filter || is_ios) { | |
| 1688 sources -= [ "filter/brotli_filter_unittest.cc" ] | |
| 1689 } | |
| 1690 | |
| 1675 if (is_android) { | 1691 if (is_android) { |
| 1676 deps += [ | 1692 deps += [ |
| 1677 ":net_test_jni_headers", | 1693 ":net_test_jni_headers", |
| 1678 "//base:base_java_unittest_support", | 1694 "//base:base_java_unittest_support", |
| 1679 "//net/android:net_java", | 1695 "//net/android:net_java", |
| 1680 "//net/android:net_java_test_support", | 1696 "//net/android:net_java_test_support", |
| 1681 "//net/android:net_javatests", | 1697 "//net/android:net_javatests", |
| 1682 "//net/android:net_unittests_apk_resources", | 1698 "//net/android:net_unittests_apk_resources", |
| 1683 | 1699 |
| 1684 # TODO(mmenke): This depends on test_support_base, which depends on | 1700 # TODO(mmenke): This depends on test_support_base, which depends on |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1937 fuzzer_test("net_quic_crypto_framer_parse_message_fuzzer") { | 1953 fuzzer_test("net_quic_crypto_framer_parse_message_fuzzer") { |
| 1938 sources = [ | 1954 sources = [ |
| 1939 "quic/quic_crypto_framer_parse_message_fuzzer.cc", | 1955 "quic/quic_crypto_framer_parse_message_fuzzer.cc", |
| 1940 ] | 1956 ] |
| 1941 deps = [ | 1957 deps = [ |
| 1942 ":net_fuzzer_test_support", | 1958 ":net_fuzzer_test_support", |
| 1943 "//base", | 1959 "//base", |
| 1944 "//net", | 1960 "//net", |
| 1945 ] | 1961 ] |
| 1946 } | 1962 } |
| OLD | NEW |