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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 defines += [ "POSIX_AVOID_MMAP" ] | 59 defines += [ "POSIX_AVOID_MMAP" ] |
59 } | 60 } |
60 if (disable_file_support) { | 61 if (disable_file_support) { |
61 defines += [ "DISABLE_FILE_SUPPORT" ] | 62 defines += [ "DISABLE_FILE_SUPPORT" ] |
62 } | 63 } |
63 if (disable_ftp_support) { | 64 if (disable_ftp_support) { |
64 defines += [ "DISABLE_FTP_SUPPORT=1" ] | 65 defines += [ "DISABLE_FTP_SUPPORT=1" ] |
65 } | 66 } |
66 } | 67 } |
67 | 68 |
68 # net_internal_config is shared with net and net_small. | |
69 config("net_internal_config") { | 69 config("net_internal_config") { |
70 defines = [ | 70 defines = [ |
71 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to | 71 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to |
72 # 0) which implies that we run pkg_config on kerberos and link to that | 72 # 0) which implies that we run pkg_config on kerberos and link to that |
73 # rather than setting this define which will dynamically open it. That | 73 # rather than setting this define which will dynamically open it. That |
74 # doesn't seem to be set in the regular builds, so we're skipping this | 74 # doesn't seem to be set in the regular builds, so we're skipping this |
75 # capability here. | 75 # capability here. |
76 "DLOPEN_KERBEROS", | 76 "DLOPEN_KERBEROS", |
77 "NET_IMPLEMENTATION", | 77 "NET_IMPLEMENTATION", |
78 ] | 78 ] |
79 | 79 |
80 if (use_kerberos) { | 80 if (use_kerberos) { |
81 defines += [ "USE_KERBEROS" ] | 81 defines += [ "USE_KERBEROS" ] |
82 if (is_android) { | 82 if (is_android) { |
83 include_dirs = [ "/usr/include/kerberosV" ] | 83 include_dirs = [ "/usr/include/kerberosV" ] |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
87 if (enable_built_in_dns) { | 87 if (enable_built_in_dns) { |
88 defines += [ "ENABLE_BUILT_IN_DNS" ] | 88 defines += [ "ENABLE_BUILT_IN_DNS" ] |
89 } | 89 } |
90 } | 90 } |
91 | 91 |
92 # net_shared_* are settings shared between net and net_small | 92 net_sources = gypi_values.net_nacl_common_sources |
93 net_shared_sources = gypi_values.net_nacl_common_sources | |
94 | 93 |
95 net_shared_unfiltered_sources = [] | 94 net_unfiltered_sources = [] |
96 | 95 |
97 net_shared_configs = [ | 96 net_configs = [ |
98 ":net_internal_config", | 97 ":net_internal_config", |
99 "//build/config:precompiled_headers", | 98 "//build/config:precompiled_headers", |
100 | 99 |
101 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 100 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
102 "//build/config/compiler:no_size_t_to_int_warning", | 101 "//build/config/compiler:no_size_t_to_int_warning", |
103 ] | 102 ] |
104 | 103 |
105 net_shared_public_deps = [ | 104 net_public_deps = [ |
106 ":net_quic_proto", | 105 ":net_quic_proto", |
107 "//crypto", | 106 "//crypto", |
108 "//crypto:platform", | 107 "//crypto:platform", |
109 ] | 108 ] |
110 | 109 |
111 net_shared_deps = [ | 110 net_deps = [ |
112 ":net_resources", | 111 ":net_resources", |
113 "//base", | 112 "//base", |
114 "//net/base/registry_controlled_domains", | 113 "//net/base/registry_controlled_domains", |
115 "//third_party/protobuf:protobuf_lite", | 114 "//third_party/protobuf:protobuf_lite", |
116 ] | 115 ] |
117 | 116 |
118 if (!is_nacl) { | 117 if (!is_nacl) { |
119 net_shared_sources += gypi_values.net_non_nacl_sources | 118 net_sources += gypi_values.net_non_nacl_sources |
120 | 119 |
121 net_shared_deps += [ | 120 net_deps += [ |
122 "//base/third_party/dynamic_annotations", | 121 "//base/third_party/dynamic_annotations", |
123 "//components/prefs", | 122 "//components/prefs", |
124 "//sdch", | 123 "//sdch", |
125 "//third_party/zlib", | 124 "//third_party/zlib", |
126 ] | 125 ] |
127 | 126 |
128 if (!use_kerberos) { | 127 if (!use_kerberos) { |
129 net_shared_sources -= [ | 128 net_sources -= [ |
130 "http/http_auth_handler_negotiate.cc", | 129 "http/http_auth_handler_negotiate.cc", |
131 "http/http_auth_handler_negotiate.h", | 130 "http/http_auth_handler_negotiate.h", |
132 ] | 131 ] |
133 } | 132 } |
134 | 133 |
135 if (is_posix) { | 134 if (is_posix) { |
136 if (posix_avoid_mmap) { | 135 if (posix_avoid_mmap) { |
137 net_shared_sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ] | 136 net_sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ] |
138 } else { | 137 } else { |
139 net_shared_sources -= | 138 net_sources -= [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ] |
140 [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ] | |
141 } | 139 } |
142 } | 140 } |
143 | 141 |
144 if (!enable_built_in_dns) { | 142 if (!enable_built_in_dns) { |
145 net_shared_sources -= [ | 143 net_sources -= [ |
146 "dns/address_sorter_posix.cc", | 144 "dns/address_sorter_posix.cc", |
147 "dns/address_sorter_posix.h", | 145 "dns/address_sorter_posix.h", |
148 "dns/dns_client.cc", | 146 "dns/dns_client.cc", |
149 ] | 147 ] |
150 } | 148 } |
151 | 149 |
152 if (use_openssl) { | 150 if (use_openssl) { |
153 net_shared_sources -= [ | 151 net_sources -= [ |
154 "base/nss_memio.c", | 152 "base/nss_memio.c", |
155 "base/nss_memio.h", | 153 "base/nss_memio.h", |
156 "cert/ct_log_verifier_nss.cc", | 154 "cert/ct_log_verifier_nss.cc", |
157 "cert/ct_objects_extractor_nss.cc", | 155 "cert/ct_objects_extractor_nss.cc", |
158 "cert/jwk_serializer_nss.cc", | 156 "cert/jwk_serializer_nss.cc", |
159 "cert/scoped_nss_types.h", | 157 "cert/scoped_nss_types.h", |
160 "cert/x509_util_nss.cc", | 158 "cert/x509_util_nss.cc", |
161 "quic/crypto/aead_base_decrypter_nss.cc", | 159 "quic/crypto/aead_base_decrypter_nss.cc", |
162 "quic/crypto/aead_base_encrypter_nss.cc", | 160 "quic/crypto/aead_base_encrypter_nss.cc", |
163 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc", | 161 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc", |
164 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc", | 162 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc", |
165 "quic/crypto/chacha20_poly1305_decrypter_nss.cc", | 163 "quic/crypto/chacha20_poly1305_decrypter_nss.cc", |
166 "quic/crypto/chacha20_poly1305_encrypter_nss.cc", | 164 "quic/crypto/chacha20_poly1305_encrypter_nss.cc", |
167 "quic/crypto/chacha20_poly1305_rfc7539_decrypter_nss.cc", | 165 "quic/crypto/chacha20_poly1305_rfc7539_decrypter_nss.cc", |
168 "quic/crypto/chacha20_poly1305_rfc7539_encrypter_nss.cc", | 166 "quic/crypto/chacha20_poly1305_rfc7539_encrypter_nss.cc", |
169 "quic/crypto/channel_id_nss.cc", | 167 "quic/crypto/channel_id_nss.cc", |
170 "quic/crypto/p256_key_exchange_nss.cc", | 168 "quic/crypto/p256_key_exchange_nss.cc", |
171 "quic/crypto/proof_source_chromium_nss.cc", | 169 "quic/crypto/proof_source_chromium_nss.cc", |
172 "socket/nss_ssl_util.cc", | 170 "socket/nss_ssl_util.cc", |
173 "socket/nss_ssl_util.h", | 171 "socket/nss_ssl_util.h", |
174 "socket/ssl_client_socket_nss.cc", | 172 "socket/ssl_client_socket_nss.cc", |
175 "socket/ssl_client_socket_nss.h", | 173 "socket/ssl_client_socket_nss.h", |
176 "socket/ssl_server_socket_nss.cc", | 174 "socket/ssl_server_socket_nss.cc", |
177 "socket/ssl_server_socket_nss.h", | 175 "socket/ssl_server_socket_nss.h", |
178 "ssl/token_binding_nss.cc", | 176 "ssl/token_binding_nss.cc", |
179 ] | 177 ] |
180 if (is_ios) { | 178 if (is_ios) { |
181 net_shared_sources -= [ | 179 net_sources -= [ |
182 "cert/x509_util_ios.cc", | 180 "cert/x509_util_ios.cc", |
183 "cert/x509_util_ios.h", | 181 "cert/x509_util_ios.h", |
184 ] | 182 ] |
185 } | 183 } |
186 } else { | 184 } else { |
187 net_shared_sources -= [ | 185 net_sources -= [ |
188 "cert/ct_log_verifier_openssl.cc", | 186 "cert/ct_log_verifier_openssl.cc", |
189 "cert/ct_objects_extractor_openssl.cc", | 187 "cert/ct_objects_extractor_openssl.cc", |
190 "cert/jwk_serializer_openssl.cc", | 188 "cert/jwk_serializer_openssl.cc", |
191 "cert/x509_util_openssl.cc", | 189 "cert/x509_util_openssl.cc", |
192 "cert/x509_util_openssl.h", | 190 "cert/x509_util_openssl.h", |
193 "quic/crypto/aead_base_decrypter_openssl.cc", | 191 "quic/crypto/aead_base_decrypter_openssl.cc", |
194 "quic/crypto/aead_base_encrypter_openssl.cc", | 192 "quic/crypto/aead_base_encrypter_openssl.cc", |
195 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc", | 193 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc", |
196 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc", | 194 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc", |
197 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc", | 195 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc", |
(...skipping 20 matching lines...) Expand all Loading... | |
218 "ssl/ssl_platform_key_task_runner.h", | 216 "ssl/ssl_platform_key_task_runner.h", |
219 "ssl/test_ssl_private_key.cc", | 217 "ssl/test_ssl_private_key.cc", |
220 "ssl/test_ssl_private_key.h", | 218 "ssl/test_ssl_private_key.h", |
221 "ssl/threaded_ssl_private_key.cc", | 219 "ssl/threaded_ssl_private_key.cc", |
222 "ssl/threaded_ssl_private_key.h", | 220 "ssl/threaded_ssl_private_key.h", |
223 "ssl/token_binding_openssl.cc", | 221 "ssl/token_binding_openssl.cc", |
224 ] | 222 ] |
225 } | 223 } |
226 | 224 |
227 if (!use_openssl_certs) { | 225 if (!use_openssl_certs) { |
228 net_shared_sources -= [ | 226 net_sources -= [ |
229 "base/crypto_module_openssl.cc", | 227 "base/crypto_module_openssl.cc", |
230 "base/keygen_handler_openssl.cc", | 228 "base/keygen_handler_openssl.cc", |
231 "base/openssl_private_key_store.h", | 229 "base/openssl_private_key_store.h", |
232 "base/openssl_private_key_store_memory.cc", | 230 "base/openssl_private_key_store_memory.cc", |
233 "cert/cert_database_openssl.cc", | 231 "cert/cert_database_openssl.cc", |
234 "cert/cert_verify_proc_openssl.cc", | 232 "cert/cert_verify_proc_openssl.cc", |
235 "cert/cert_verify_proc_openssl.h", | 233 "cert/cert_verify_proc_openssl.h", |
236 "cert/test_root_certs_openssl.cc", | 234 "cert/test_root_certs_openssl.cc", |
237 "cert/x509_certificate_openssl.cc", | 235 "cert/x509_certificate_openssl.cc", |
238 "ssl/openssl_client_key_store.cc", | 236 "ssl/openssl_client_key_store.cc", |
239 "ssl/openssl_client_key_store.h", | 237 "ssl/openssl_client_key_store.h", |
240 ] | 238 ] |
241 if (is_android) { | 239 if (is_android) { |
242 net_shared_sources -= [ "base/openssl_private_key_store_android.cc" ] | 240 net_sources -= [ "base/openssl_private_key_store_android.cc" ] |
243 } | 241 } |
244 } else { | 242 } else { |
245 if (is_android) { | 243 if (is_android) { |
246 # Android doesn't use these even when using OpenSSL. | 244 # Android doesn't use these even when using OpenSSL. |
247 net_shared_sources -= [ | 245 net_sources -= [ |
248 "base/openssl_private_key_store_memory.cc", | 246 "base/openssl_private_key_store_memory.cc", |
249 "cert/cert_database_openssl.cc", | 247 "cert/cert_database_openssl.cc", |
250 "cert/cert_verify_proc_openssl.cc", | 248 "cert/cert_verify_proc_openssl.cc", |
251 "cert/test_root_certs_openssl.cc", | 249 "cert/test_root_certs_openssl.cc", |
252 ] | 250 ] |
253 } | 251 } |
254 } | 252 } |
255 | 253 |
256 if (!use_kerberos || is_android) { | 254 if (!use_kerberos || is_android) { |
257 net_shared_sources -= [ | 255 net_sources -= [ |
258 "http/http_auth_gssapi_posix.cc", | 256 "http/http_auth_gssapi_posix.cc", |
259 "http/http_auth_gssapi_posix.h", | 257 "http/http_auth_gssapi_posix.h", |
260 ] | 258 ] |
261 } | 259 } |
262 | 260 |
263 if (use_glib && use_gconf && !is_chromeos) { | 261 if (use_glib && use_gconf && !is_chromeos) { |
264 net_shared_configs += [ "//build/config/linux:gconf" ] | 262 net_configs += [ "//build/config/linux:gconf" ] |
265 net_shared_deps += [ "//build/linux:gio" ] | 263 net_deps += [ "//build/linux:gio" ] |
266 } | 264 } |
267 | 265 |
268 if (is_linux) { | 266 if (is_linux) { |
269 net_shared_configs += [ "//build/config/linux:libresolv" ] | 267 net_configs += [ "//build/config/linux:libresolv" ] |
270 } | 268 } |
271 | 269 |
272 if (!use_nss_certs) { | 270 if (!use_nss_certs) { |
273 net_shared_sources -= [ | 271 net_sources -= [ |
274 "base/crypto_module_nss.cc", | 272 "base/crypto_module_nss.cc", |
275 "base/keygen_handler_nss.cc", | 273 "base/keygen_handler_nss.cc", |
276 "cert/cert_database_nss.cc", | 274 "cert/cert_database_nss.cc", |
277 "cert/nss_cert_database.cc", | 275 "cert/nss_cert_database.cc", |
278 "cert/nss_cert_database.h", | 276 "cert/nss_cert_database.h", |
279 "cert/x509_certificate_nss.cc", | 277 "cert/x509_certificate_nss.cc", |
280 "ssl/client_cert_store_nss.cc", | 278 "ssl/client_cert_store_nss.cc", |
281 "ssl/client_cert_store_nss.h", | 279 "ssl/client_cert_store_nss.h", |
282 "third_party/mozilla_security_manager/nsKeygenHandler.cpp", | 280 "third_party/mozilla_security_manager/nsKeygenHandler.cpp", |
283 "third_party/mozilla_security_manager/nsKeygenHandler.h", | 281 "third_party/mozilla_security_manager/nsKeygenHandler.h", |
284 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp", | 282 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp", |
285 "third_party/mozilla_security_manager/nsNSSCertificateDB.h", | 283 "third_party/mozilla_security_manager/nsNSSCertificateDB.h", |
286 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp", | 284 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp", |
287 "third_party/mozilla_security_manager/nsPKCS12Blob.h", | 285 "third_party/mozilla_security_manager/nsPKCS12Blob.h", |
288 ] | 286 ] |
289 if (is_chromeos) { | 287 if (is_chromeos) { |
290 # These were already removed on non-ChromeOS. | 288 # These were already removed on non-ChromeOS. |
291 net_shared_sources -= [ | 289 net_sources -= [ |
292 "cert/nss_cert_database_chromeos.cc", | 290 "cert/nss_cert_database_chromeos.cc", |
293 "cert/nss_cert_database_chromeos.h", | 291 "cert/nss_cert_database_chromeos.h", |
294 "cert/nss_profile_filter_chromeos.cc", | 292 "cert/nss_profile_filter_chromeos.cc", |
295 "cert/nss_profile_filter_chromeos.h", | 293 "cert/nss_profile_filter_chromeos.h", |
296 ] | 294 ] |
297 } | 295 } |
298 net_shared_sources -= [ | 296 net_sources -= [ |
299 "ssl/client_key_store.cc", | 297 "ssl/client_key_store.cc", |
300 "ssl/client_key_store.h", | 298 "ssl/client_key_store.h", |
301 "ssl/ssl_platform_key_nss.cc", | 299 "ssl/ssl_platform_key_nss.cc", |
302 ] | 300 ] |
303 } else if (use_openssl) { | 301 } else if (use_openssl) { |
304 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's | 302 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's |
305 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file | 303 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file |
306 # in directly. | 304 # in directly. |
307 net_shared_sources += [ "third_party/nss/ssl/cmpcert.c" ] | 305 net_sources += [ "third_party/nss/ssl/cmpcert.c" ] |
308 } | 306 } |
309 | 307 |
310 if (!use_nss_verifier) { | 308 if (!use_nss_verifier) { |
311 # These files are part of the partial implementation of NSS for | 309 # These files are part of the partial implementation of NSS for |
312 # cert verification, so keep them in that case. | 310 # cert verification, so keep them in that case. |
313 net_shared_sources -= [ | 311 net_sources -= [ |
314 "cert/cert_verify_proc_nss.cc", | 312 "cert/cert_verify_proc_nss.cc", |
315 "cert/cert_verify_proc_nss.h", | 313 "cert/cert_verify_proc_nss.h", |
316 "cert/test_root_certs_nss.cc", | 314 "cert/test_root_certs_nss.cc", |
317 "cert/x509_util_nss_certs.cc", | 315 "cert/x509_util_nss_certs.cc", |
318 "cert_net/nss_ocsp.cc", | 316 "cert_net/nss_ocsp.cc", |
319 "cert_net/nss_ocsp.h", | 317 "cert_net/nss_ocsp.h", |
320 ] | 318 ] |
321 } | 319 } |
322 | 320 |
323 if (is_ios && use_nss_verifier) { | 321 if (is_ios && use_nss_verifier) { |
324 net_shared_sources -= [ | 322 net_sources -= [ |
325 "cert/cert_verify_proc_ios.cc", | 323 "cert/cert_verify_proc_ios.cc", |
326 "cert/cert_verify_proc_ios.h", | 324 "cert/cert_verify_proc_ios.h", |
327 "cert/x509_certificate_openssl_ios.cc", | 325 "cert/x509_certificate_openssl_ios.cc", |
328 ] | 326 ] |
329 } | 327 } |
330 | 328 |
331 if (is_chromecast && use_nss_certs) { | 329 if (is_chromecast && use_nss_certs) { |
332 net_shared_sources += [ "ssl/ssl_platform_key_chromecast.cc" ] | 330 net_sources += [ "ssl/ssl_platform_key_chromecast.cc" ] |
333 net_shared_sources -= [ "ssl/ssl_platform_key_nss.cc" ] | 331 net_sources -= [ "ssl/ssl_platform_key_nss.cc" ] |
334 } | 332 } |
335 | 333 |
336 if (!enable_mdns) { | 334 if (!enable_mdns) { |
337 net_shared_sources -= [ | 335 net_sources -= [ |
338 "dns/mdns_cache.cc", | 336 "dns/mdns_cache.cc", |
339 "dns/mdns_cache.h", | 337 "dns/mdns_cache.h", |
340 "dns/mdns_client.cc", | 338 "dns/mdns_client.cc", |
341 "dns/mdns_client.h", | 339 "dns/mdns_client.h", |
342 "dns/mdns_client_impl.cc", | 340 "dns/mdns_client_impl.cc", |
343 "dns/mdns_client_impl.h", | 341 "dns/mdns_client_impl.h", |
344 "dns/record_parsed.cc", | 342 "dns/record_parsed.cc", |
345 "dns/record_parsed.h", | 343 "dns/record_parsed.h", |
346 "dns/record_rdata.cc", | 344 "dns/record_rdata.cc", |
347 "dns/record_rdata.h", | 345 "dns/record_rdata.h", |
348 ] | 346 ] |
349 } | 347 } |
350 | 348 |
351 if (is_win) { | 349 if (is_win) { |
352 net_shared_sources -= [ "http/http_auth_handler_ntlm_portable.cc" ] | 350 net_sources -= [ "http/http_auth_handler_ntlm_portable.cc" ] |
353 } else { # !is_win | 351 } else { # !is_win |
354 net_shared_sources -= [ | 352 net_sources -= [ |
355 "base/winsock_init.cc", | 353 "base/winsock_init.cc", |
356 "base/winsock_init.h", | 354 "base/winsock_init.h", |
357 "base/winsock_util.cc", | 355 "base/winsock_util.cc", |
358 "base/winsock_util.h", | 356 "base/winsock_util.h", |
359 "proxy/proxy_resolver_winhttp.cc", | 357 "proxy/proxy_resolver_winhttp.cc", |
360 "proxy/proxy_resolver_winhttp.h", | 358 "proxy/proxy_resolver_winhttp.h", |
361 ] | 359 ] |
362 } | 360 } |
363 | 361 |
364 if (is_ios) { | 362 if (is_ios) { |
365 # Add back some sources that were otherwise filtered out. iOS needs some Mac | 363 # Add back some sources that were otherwise filtered out. iOS needs some Mac |
366 # files. | 364 # files. |
367 net_shared_unfiltered_sources += [ | 365 net_unfiltered_sources += [ |
368 "base/mac/url_conversions.h", | 366 "base/mac/url_conversions.h", |
369 "base/mac/url_conversions.mm", | 367 "base/mac/url_conversions.mm", |
370 "base/network_change_notifier_mac.cc", | 368 "base/network_change_notifier_mac.cc", |
371 "base/network_config_watcher_mac.cc", | 369 "base/network_config_watcher_mac.cc", |
372 "base/network_interfaces_mac.cc", | 370 "base/network_interfaces_mac.cc", |
373 "base/network_interfaces_mac.h", | 371 "base/network_interfaces_mac.h", |
374 "base/platform_mime_util_mac.mm", | 372 "base/platform_mime_util_mac.mm", |
375 "proxy/proxy_resolver_mac.cc", | 373 "proxy/proxy_resolver_mac.cc", |
376 "proxy/proxy_server_mac.cc", | 374 "proxy/proxy_server_mac.cc", |
377 ] | 375 ] |
378 | 376 |
379 net_shared_sources -= [ "disk_cache/blockfile/file_posix.cc" ] | 377 net_sources -= [ "disk_cache/blockfile/file_posix.cc" ] |
380 net_shared_deps += [ | 378 net_deps += [ |
381 "//third_party/nss:nspr", | 379 "//third_party/nss:nspr", |
382 "//third_party/nss", | 380 "//third_party/nss", |
383 "//net/third_party/nss/ssl:libssl", | 381 "//net/third_party/nss/ssl:libssl", |
384 ] | 382 ] |
385 } | 383 } |
386 | 384 |
387 if (is_ios && !use_nss_verifier) { | 385 if (is_ios && !use_nss_verifier) { |
388 net_shared_sources += [ "cert/test_root_certs_mac.cc" ] | 386 net_sources += [ "cert/test_root_certs_mac.cc" ] |
389 } | 387 } |
390 | 388 |
391 if (is_ios || is_mac) { | 389 if (is_ios || is_mac) { |
392 net_shared_sources += gypi_values.net_base_mac_ios_sources | 390 net_sources += gypi_values.net_base_mac_ios_sources |
393 } | 391 } |
394 | 392 |
395 if (is_android) { | 393 if (is_android) { |
396 net_shared_deps += [ ":net_jni_headers" ] | 394 net_deps += [ ":net_jni_headers" ] |
397 | 395 |
398 # Add some Linux sources that were excluded by the filter, but which | 396 # Add some Linux sources that were excluded by the filter, but which |
399 # are needed. | 397 # are needed. |
400 net_shared_unfiltered_sources += [ | 398 net_unfiltered_sources += [ |
401 "base/address_tracker_linux.cc", | 399 "base/address_tracker_linux.cc", |
402 "base/address_tracker_linux.h", | 400 "base/address_tracker_linux.h", |
403 "base/network_interfaces_linux.cc", | 401 "base/network_interfaces_linux.cc", |
404 "base/network_interfaces_linux.h", | 402 "base/network_interfaces_linux.h", |
405 "base/platform_mime_util_linux.cc", | 403 "base/platform_mime_util_linux.cc", |
406 ] | 404 ] |
407 } | 405 } |
408 } else { | 406 } else { |
409 net_shared_public_deps += [ "//native_client_sdk/src/libraries/nacl_io" ] | 407 net_public_deps += [ "//native_client_sdk/src/libraries/nacl_io" ] |
410 } | 408 } |
411 | 409 |
412 component("net") { | 410 component("net") { |
413 sources = net_shared_sources | 411 sources = net_sources |
414 | 412 |
415 # Add back some sources that were otherwise filtered out. | 413 # Add back some sources that were otherwise filtered out. |
416 set_sources_assignment_filter([]) | 414 set_sources_assignment_filter([]) |
417 sources += net_shared_unfiltered_sources | 415 sources += net_unfiltered_sources |
418 set_sources_assignment_filter(sources_assignment_filter) | 416 set_sources_assignment_filter(sources_assignment_filter) |
419 | 417 |
420 cflags = [] | 418 cflags = [] |
421 configs += net_shared_configs | 419 configs += net_configs |
422 public_configs = [ ":net_config" ] | 420 public_configs = [ ":net_config" ] |
423 | 421 |
424 public_deps = net_shared_public_deps + [ "//url" ] | 422 public_deps = net_public_deps + [ "//url" ] |
425 deps = net_shared_deps | 423 deps = net_deps |
426 | 424 |
427 if (is_mac) { | 425 if (is_mac) { |
428 libs = [ | 426 libs = [ |
429 "Foundation.framework", | 427 "Foundation.framework", |
430 "Security.framework", | 428 "Security.framework", |
431 "SystemConfiguration.framework", | 429 "SystemConfiguration.framework", |
432 "resolv", | 430 "resolv", |
433 ] | 431 ] |
434 } | 432 } |
435 | 433 |
(...skipping 13 matching lines...) Expand all Loading... | |
449 } | 447 } |
450 | 448 |
451 if (!disable_ftp_support) { | 449 if (!disable_ftp_support) { |
452 sources += gypi_values.net_ftp_support_sources | 450 sources += gypi_values.net_ftp_support_sources |
453 } | 451 } |
454 | 452 |
455 if (enable_websockets) { | 453 if (enable_websockets) { |
456 sources += gypi_values.net_websockets_sources | 454 sources += gypi_values.net_websockets_sources |
457 } | 455 } |
458 | 456 |
459 # ICU support. | 457 # ICU & Brotli support. |
460 deps += [ | 458 if (is_android && use_platform_icu_alternatives) { |
461 "//base:i18n", | 459 # Use ICU alternative on Android & Disable Brotli support. |
462 "//third_party/icu", | 460 sources += [ |
463 ] | 461 "base/net_string_util_icu_alternatives_android.cc", |
464 sources += [ | 462 "base/net_string_util_icu_alternatives_android.h", |
465 "base/filename_util_icu.cc", | 463 "filter/brotli_filter_disabled.cc", |
466 "base/net_string_util_icu.cc", | 464 ] |
467 ] | 465 defines = [ |
468 | 466 "DISABLE_FILE_SUPPORT", |
469 # Brotli support. | 467 "DISABLE_FTP_SUPPORT", |
xunjieli
2016/04/01 14:16:43
These two defines should not be here?
kapishnikov
2016/04/01 18:55:01
Nice catch. These two defines come from "net_confi
| |
470 deps += [ "//third_party/brotli" ] | 468 "USE_PLATFORM_ICU_ALTERNATIVES=1", |
471 sources += [ "filter/brotli_filter.cc" ] | 469 ] |
470 deps += [ ":net_jni_headers" ] | |
471 } else if (is_ios && use_platform_icu_alternatives) { | |
472 # Use ICU alternative on Android & Disable Brotli support. | |
473 sources += [ | |
474 "base/net_string_util_icu_alternatives_ios.mm", | |
475 "filter/brotli_filter_disabled.cc", | |
476 ] | |
477 defines = [ | |
478 "DISABLE_FILE_SUPPORT", | |
479 "DISABLE_FTP_SUPPORT", | |
xunjieli
2016/04/01 14:16:43
These two defines should not be here?
kapishnikov
2016/04/01 18:55:01
Removed.
| |
480 "USE_PLATFORM_ICU_ALTERNATIVES=1", | |
481 ] | |
482 } else { # use third-party ICU implementation by default. | |
483 deps += [ | |
484 "//base:i18n", | |
485 "//third_party/brotli", | |
486 "//third_party/icu", | |
487 ] | |
488 sources += [ | |
489 "base/filename_util_icu.cc", | |
490 "base/net_string_util_icu.cc", | |
491 "filter/brotli_filter.cc", | |
492 ] | |
493 } | |
472 } | 494 } |
473 } | 495 } |
474 | 496 |
475 if (is_android) { | |
476 # Same as net, but with brotli encoding, ICU, file, ftp, and websocket | |
477 # support stripped. | |
478 component("net_small") { | |
479 sources = net_shared_sources | |
480 | |
481 # Add back some sources that were otherwise filtered out. | |
482 set_sources_assignment_filter([]) | |
483 sources += net_shared_unfiltered_sources | |
484 set_sources_assignment_filter(sources_assignment_filter) | |
485 | |
486 cflags = [] | |
487 defines = [] | |
488 configs += net_shared_configs | |
489 public_configs = [ ":net_config" ] | |
490 | |
491 public_deps = net_shared_public_deps + | |
492 [ "//url:url_lib_use_icu_alternatives_on_android" ] | |
493 deps = net_shared_deps + [ ":net_jni_headers" ] | |
494 | |
495 defines += [ | |
496 "DISABLE_FILE_SUPPORT", | |
497 "DISABLE_FTP_SUPPORT", | |
498 "USE_ICU_ALTERNATIVES_ON_ANDROID=1", | |
499 ] | |
500 | |
501 # Use ICU alternative on Android. | |
502 sources += [ | |
503 "base/net_string_util_icu_alternatives_android.cc", | |
504 "base/net_string_util_icu_alternatives_android.h", | |
505 ] | |
506 | |
507 # Disable Brotli support. | |
508 sources += [ "filter/brotli_filter_disabled.cc" ] | |
509 } | |
510 } | |
511 | |
512 grit("net_resources") { | 497 grit("net_resources") { |
513 source = "base/net_resources.grd" | 498 source = "base/net_resources.grd" |
514 use_qualified_include = true | 499 use_qualified_include = true |
515 outputs = [ | 500 outputs = [ |
516 "grit/net_resources.h", | 501 "grit/net_resources.h", |
517 "net_resources.pak", | 502 "net_resources.pak", |
518 ] | 503 ] |
519 } | 504 } |
520 | 505 |
521 proto_library("net_quic_proto") { | 506 proto_library("net_quic_proto") { |
522 visibility = [ | 507 visibility = [ ":net" ] |
523 ":net", | |
524 ":net_small", | |
525 ] | |
526 | 508 |
527 sources = [ | 509 sources = [ |
528 "quic/proto/cached_network_parameters.proto", | 510 "quic/proto/cached_network_parameters.proto", |
529 "quic/proto/source_address_token.proto", | 511 "quic/proto/source_address_token.proto", |
530 ] | 512 ] |
531 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:" | 513 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:" |
532 cc_include = "net/base/net_export.h" | 514 cc_include = "net/base/net_export.h" |
533 | 515 |
534 defines = [ "NET_IMPLEMENTATION" ] | 516 defines = [ "NET_IMPLEMENTATION" ] |
535 | 517 |
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1373 source_set("stale_while_revalidate_experiment_domains") { | 1355 source_set("stale_while_revalidate_experiment_domains") { |
1374 sources = [ | 1356 sources = [ |
1375 "base/stale_while_revalidate_experiment_domains.cc", | 1357 "base/stale_while_revalidate_experiment_domains.cc", |
1376 "base/stale_while_revalidate_experiment_domains.h", | 1358 "base/stale_while_revalidate_experiment_domains.h", |
1377 ] | 1359 ] |
1378 deps = [ | 1360 deps = [ |
1379 ":net", | 1361 ":net", |
1380 ":stale_while_revalidate_experiment_domains_dafsa", | 1362 ":stale_while_revalidate_experiment_domains_dafsa", |
1381 "//base", | 1363 "//base", |
1382 ] | 1364 ] |
1383 configs += net_shared_configs | 1365 configs += net_configs |
1384 } | 1366 } |
1385 | 1367 |
1386 if (!is_ios) { | 1368 if (!is_ios) { |
1387 executable("quic_client") { | 1369 executable("quic_client") { |
1388 sources = [ | 1370 sources = [ |
1389 "tools/quic/quic_simple_client_bin.cc", | 1371 "tools/quic/quic_simple_client_bin.cc", |
1390 ] | 1372 ] |
1391 deps = [ | 1373 deps = [ |
1392 ":net", | 1374 ":net", |
1393 ":simple_quic_tools", | 1375 ":simple_quic_tools", |
(...skipping 30 matching lines...) Expand all Loading... | |
1424 ] | 1406 ] |
1425 outputs = [ | 1407 outputs = [ |
1426 "{{bundle_resources_dir}}/" + | 1408 "{{bundle_resources_dir}}/" + |
1427 "{{source_root_relative_dir}}/{{source_file_part}}", | 1409 "{{source_root_relative_dir}}/{{source_file_part}}", |
1428 ] | 1410 ] |
1429 } | 1411 } |
1430 | 1412 |
1431 test("net_unittests") { | 1413 test("net_unittests") { |
1432 sources = gypi_values.net_test_sources | 1414 sources = gypi_values.net_test_sources |
1433 | 1415 |
1434 if (is_ios) { | 1416 if (is_ios && enable_websockets) { |
1435 sources -= [ | 1417 sources -= [ |
1436 "websockets/websocket_stream_cookie_test.cc", | 1418 "websockets/websocket_stream_cookie_test.cc", |
1437 "websockets/websocket_stream_create_test_base.cc", | 1419 "websockets/websocket_stream_create_test_base.cc", |
1438 "websockets/websocket_stream_create_test_base.h", | 1420 "websockets/websocket_stream_create_test_base.h", |
1439 ] | 1421 ] |
1440 } | 1422 } |
1441 | 1423 |
1442 configs += [ | 1424 configs += [ |
1443 "//build/config:precompiled_headers", | 1425 "//build/config:precompiled_headers", |
1444 | 1426 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1585 "websockets/websocket_deflater_test.cc", | 1567 "websockets/websocket_deflater_test.cc", |
1586 "websockets/websocket_end_to_end_test.cc", | 1568 "websockets/websocket_end_to_end_test.cc", |
1587 "websockets/websocket_errors_test.cc", | 1569 "websockets/websocket_errors_test.cc", |
1588 "websockets/websocket_extension_parser_test.cc", | 1570 "websockets/websocket_extension_parser_test.cc", |
1589 "websockets/websocket_extension_test.cc", | 1571 "websockets/websocket_extension_test.cc", |
1590 "websockets/websocket_frame_parser_test.cc", | 1572 "websockets/websocket_frame_parser_test.cc", |
1591 "websockets/websocket_frame_test.cc", | 1573 "websockets/websocket_frame_test.cc", |
1592 "websockets/websocket_handshake_challenge_test.cc", | 1574 "websockets/websocket_handshake_challenge_test.cc", |
1593 "websockets/websocket_handshake_stream_create_helper_test.cc", | 1575 "websockets/websocket_handshake_stream_create_helper_test.cc", |
1594 "websockets/websocket_inflater_test.cc", | 1576 "websockets/websocket_inflater_test.cc", |
1577 "websockets/websocket_stream_cookie_test.cc", | |
1578 "websockets/websocket_stream_create_test_base.cc", | |
1595 "websockets/websocket_stream_test.cc", | 1579 "websockets/websocket_stream_test.cc", |
1596 "websockets/websocket_test_util.cc", | 1580 "websockets/websocket_test_util.cc", |
1597 "websockets/websocket_test_util.h", | 1581 "websockets/websocket_test_util.h", |
1598 ] | 1582 ] |
1599 deps -= [ ":http_server" ] | 1583 deps -= [ ":http_server" ] |
1600 } | 1584 } |
1601 | 1585 |
1602 if (disable_file_support) { | 1586 if (disable_file_support) { |
1603 sources -= [ | 1587 sources -= [ |
1604 "base/directory_lister_unittest.cc", | 1588 "base/directory_lister_unittest.cc", |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1696 # iOS. | 1680 # iOS. |
1697 # OS is not "linux" or "freebsd" or "openbsd". | 1681 # OS is not "linux" or "freebsd" or "openbsd". |
1698 "socket/unix_domain_client_socket_posix_unittest.cc", | 1682 "socket/unix_domain_client_socket_posix_unittest.cc", |
1699 "socket/unix_domain_server_socket_posix_unittest.cc", | 1683 "socket/unix_domain_server_socket_posix_unittest.cc", |
1700 | 1684 |
1701 # See bug http://crbug.com/344533. | 1685 # See bug http://crbug.com/344533. |
1702 "disk_cache/blockfile/index_table_v3_unittest.cc", | 1686 "disk_cache/blockfile/index_table_v3_unittest.cc", |
1703 ] | 1687 ] |
1704 } | 1688 } |
1705 | 1689 |
1690 # Unit tests that are not supported by the current ICU alternatives on Android . | |
1691 if (is_android && use_platform_icu_alternatives) { | |
1692 sources -= [ | |
1693 "base/filename_util_unittest.cc", | |
1694 "base/url_util_unittest.cc", | |
1695 "cert/x509_certificate_unittest.cc", | |
1696 "filter/brotli_filter_unittest.cc", | |
1697 "proxy/proxy_resolver_v8_unittest.cc", | |
1698 "url_request/url_request_job_unittest.cc", | |
1699 ] | |
1700 } | |
1701 | |
1702 # Unit tests that are not supported by the current ICU alternatives on iOS. | |
1703 if (is_ios && use_platform_icu_alternatives) { | |
1704 sources -= [ | |
1705 "base/filename_util_unittest.cc", | |
1706 "base/url_util_unittest.cc", | |
1707 "cert/x509_certificate_unittest.cc", | |
1708 "http/http_auth_handler_basic_unittest.cc", | |
1709 "http/http_auth_handler_digest_unittest.cc", | |
1710 "http/http_auth_handler_factory_unittest.cc", | |
1711 "http/http_auth_unittest.cc", | |
1712 "http/http_content_disposition_unittest.cc", | |
1713 "http/http_network_transaction_unittest.cc", | |
1714 "http/http_proxy_client_socket_pool_unittest.cc", | |
1715 "socket/ssl_client_socket_pool_unittest.cc", | |
1716 "spdy/spdy_network_transaction_unittest.cc", | |
1717 "spdy/spdy_proxy_client_socket_unittest.cc", | |
1718 "url_request/url_request_job_unittest.cc", | |
1719 "url_request/url_request_unittest.cc", | |
1720 ] | |
1721 } | |
1722 | |
1706 if (is_android) { | 1723 if (is_android) { |
1707 deps += [ | 1724 deps += [ |
1708 ":net_test_jni_headers", | 1725 ":net_test_jni_headers", |
1709 "//base:base_java_unittest_support", | 1726 "//base:base_java_unittest_support", |
1710 "//net/android:net_java", | 1727 "//net/android:net_java", |
1711 "//net/android:net_java_test_support", | 1728 "//net/android:net_java_test_support", |
1712 "//net/android:net_javatests", | 1729 "//net/android:net_javatests", |
1713 "//net/android:net_unittests_apk_resources", | 1730 "//net/android:net_unittests_apk_resources", |
1714 | 1731 |
1715 # TODO(mmenke): This depends on test_support_base, which depends on | 1732 # TODO(mmenke): This depends on test_support_base, which depends on |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1968 fuzzer_test("net_quic_crypto_framer_parse_message_fuzzer") { | 1985 fuzzer_test("net_quic_crypto_framer_parse_message_fuzzer") { |
1969 sources = [ | 1986 sources = [ |
1970 "quic/quic_crypto_framer_parse_message_fuzzer.cc", | 1987 "quic/quic_crypto_framer_parse_message_fuzzer.cc", |
1971 ] | 1988 ] |
1972 deps = [ | 1989 deps = [ |
1973 ":net_fuzzer_test_support", | 1990 ":net_fuzzer_test_support", |
1974 "//base", | 1991 "//base", |
1975 "//net", | 1992 "//net", |
1976 ] | 1993 ] |
1977 } | 1994 } |
OLD | NEW |