Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: net/BUILD.gn

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

Powered by Google App Engine
This is Rietveld 408576698