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

Side by Side Diff: net/BUILD.gn

Issue 1312583006: Revert of Make separate net and url GN targets with and without ICU (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | net/net.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/config/crypto.gni") 5 import("//build/config/crypto.gni")
6 import("//build/config/features.gni") 6 import("//build/config/features.gni")
7 import("//build/config/ui.gni") 7 import("//build/config/ui.gni")
8 import("//build/module_args/v8.gni") 8 import("//build/module_args/v8.gni")
9 import("//url/config.gni")
9 import("//testing/test.gni") 10 import("//testing/test.gni")
10 import("//third_party/icu/config.gni") 11 import("//third_party/icu/config.gni")
11 import("//third_party/protobuf/proto_library.gni") 12 import("//third_party/protobuf/proto_library.gni")
12 13
13 # TODO(cjhopman): //build/config/android/rules.gni also imports grit_rule.gni. 14 # TODO(cjhopman): //build/config/android/rules.gni also imports grit_rule.gni.
14 # Currently, that file can't be imported multiple times. Make this always 15 # Currently, that file can't be imported multiple times. Make this always
15 # imported when http://crbug.com/393704 is fixed. 16 # imported when http://crbug.com/393704 is fixed.
16 if (!is_android) { 17 if (!is_android) {
17 import("//tools/grit/grit_rule.gni") 18 import("//tools/grit/grit_rule.gni")
18 } 19 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 config("net_config") { 56 config("net_config") {
56 defines = [] 57 defines = []
57 if (posix_avoid_mmap) { 58 if (posix_avoid_mmap) {
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 } 64 }
64 65
65 # net_internal_config is shared with net and net_small. 66 component("net") {
66 config("net_internal_config") { 67 sources =
68 gypi_values.net_nacl_common_sources + gypi_values.net_non_nacl_sources
69
70 cflags = []
67 defines = [ 71 defines = [
68 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to 72 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to
69 # 0) which implies that we run pkg_config on kerberos and link to that 73 # 0) which implies that we run pkg_config on kerberos and link to that
70 # rather than setting this define which will dynamically open it. That 74 # rather than setting this define which will dynamically open it. That
71 # doesn't seem to be set in the regular builds, so we're skipping this 75 # doesn't seem to be set in the regular builds, so we're skipping this
72 # capability here. 76 # capability here.
73 "DLOPEN_KERBEROS", 77 "DLOPEN_KERBEROS",
74 "NET_IMPLEMENTATION", 78 "NET_IMPLEMENTATION",
75 ] 79 ]
76 80
81 configs += [
82 "//build/config:precompiled_headers",
83
84 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
85 "//build/config/compiler:no_size_t_to_int_warning",
86 ]
87 public_configs = [ ":net_config" ]
88 include_dirs = []
89
90 public_deps = [
91 ":net_quic_proto",
92 "//crypto",
93 "//crypto:platform",
94 "//url",
95 ]
96 deps = [
97 ":net_resources",
98 "//base",
99 "//base:prefs",
100 "//base/third_party/dynamic_annotations",
101 "//net/base/registry_controlled_domains",
102 "//sdch",
103 "//third_party/protobuf:protobuf_lite",
104 "//third_party/zlib",
105 "//url",
106 ]
107
77 if (use_kerberos) { 108 if (use_kerberos) {
78 defines += [ "USE_KERBEROS" ] 109 defines += [ "USE_KERBEROS" ]
79 if (is_android) { 110 if (is_android) {
80 include_dirs = [ "/usr/include/kerberosV" ] 111 include_dirs += [ "/usr/include/kerberosV" ]
81 } 112 }
113 } else {
114 sources -= [
115 "http/http_auth_gssapi_posix.cc",
116 "http/http_auth_gssapi_posix.h",
117 "http/http_auth_handler_negotiate.cc",
118 "http/http_auth_handler_negotiate.h",
119 ]
120 }
121
122 if (is_posix) {
123 if (posix_avoid_mmap) {
124 sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
125 } else {
126 sources -= [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ]
127 }
128 }
129
130 if (disable_file_support) {
131 sources -= [
132 "base/directory_lister.cc",
133 "base/directory_lister.h",
134 "url_request/file_protocol_handler.cc",
135 "url_request/file_protocol_handler.h",
136 "url_request/url_request_file_dir_job.cc",
137 "url_request/url_request_file_dir_job.h",
138 "url_request/url_request_file_job.cc",
139 "url_request/url_request_file_job.h",
140 ]
141 }
142
143 if (disable_ftp_support) {
144 sources -= [
145 "ftp/ftp_auth_cache.cc",
146 "ftp/ftp_auth_cache.h",
147 "ftp/ftp_ctrl_response_buffer.cc",
148 "ftp/ftp_ctrl_response_buffer.h",
149 "ftp/ftp_directory_listing_parser.cc",
150 "ftp/ftp_directory_listing_parser.h",
151 "ftp/ftp_directory_listing_parser_ls.cc",
152 "ftp/ftp_directory_listing_parser_ls.h",
153 "ftp/ftp_directory_listing_parser_netware.cc",
154 "ftp/ftp_directory_listing_parser_netware.h",
155 "ftp/ftp_directory_listing_parser_os2.cc",
156 "ftp/ftp_directory_listing_parser_os2.h",
157 "ftp/ftp_directory_listing_parser_vms.cc",
158 "ftp/ftp_directory_listing_parser_vms.h",
159 "ftp/ftp_directory_listing_parser_windows.cc",
160 "ftp/ftp_directory_listing_parser_windows.h",
161 "ftp/ftp_network_layer.cc",
162 "ftp/ftp_network_layer.h",
163 "ftp/ftp_network_session.cc",
164 "ftp/ftp_network_session.h",
165 "ftp/ftp_network_transaction.cc",
166 "ftp/ftp_network_transaction.h",
167 "ftp/ftp_request_info.h",
168 "ftp/ftp_response_info.cc",
169 "ftp/ftp_response_info.h",
170 "ftp/ftp_server_type_histograms.cc",
171 "ftp/ftp_server_type_histograms.h",
172 "ftp/ftp_transaction.h",
173 "ftp/ftp_transaction_factory.h",
174 "ftp/ftp_util.cc",
175 "ftp/ftp_util.h",
176 "url_request/ftp_protocol_handler.cc",
177 "url_request/ftp_protocol_handler.h",
178 "url_request/url_request_ftp_job.cc",
179 "url_request/url_request_ftp_job.h",
180 ]
82 } 181 }
83 182
84 if (enable_built_in_dns) { 183 if (enable_built_in_dns) {
85 defines += [ "ENABLE_BUILT_IN_DNS" ] 184 defines += [ "ENABLE_BUILT_IN_DNS" ]
86 }
87 }
88
89 # net_shared_* are settings shared between net and net_small
90 net_shared_sources =
91 gypi_values.net_nacl_common_sources + gypi_values.net_non_nacl_sources
92
93 net_shared_unfiltered_sources = []
94
95 net_shared_configs = [
96 ":net_internal_config",
97 "//build/config:precompiled_headers",
98
99 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
100 "//build/config/compiler:no_size_t_to_int_warning",
101 ]
102
103 net_shared_public_deps = [
104 ":net_quic_proto",
105 "//crypto",
106 "//crypto:platform",
107 ]
108
109 net_shared_deps = [
110 ":net_resources",
111 "//base",
112 "//base:prefs",
113 "//base/third_party/dynamic_annotations",
114 "//net/base/registry_controlled_domains",
115 "//sdch",
116 "//third_party/protobuf:protobuf_lite",
117 "//third_party/zlib",
118 ]
119
120 if (!use_kerberos) {
121 net_shared_sources -= [
122 "http/http_auth_gssapi_posix.cc",
123 "http/http_auth_gssapi_posix.h",
124 "http/http_auth_handler_negotiate.cc",
125 "http/http_auth_handler_negotiate.h",
126 ]
127 }
128
129 if (is_posix) {
130 if (posix_avoid_mmap) {
131 net_shared_sources -= [ "disk_cache/blockfile/mapped_file_posix.cc" ]
132 } else { 185 } else {
133 net_shared_sources -= 186 sources -= [
134 [ "disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc" ] 187 "dns/address_sorter_posix.cc",
135 } 188 "dns/address_sorter_posix.h",
136 } 189 "dns/dns_client.cc",
137 190 ]
138 if (!enable_built_in_dns) { 191 }
139 net_shared_sources -= [ 192
140 "dns/address_sorter_posix.cc", 193 if (use_openssl) {
141 "dns/address_sorter_posix.h", 194 sources -= [
142 "dns/dns_client.cc", 195 "base/nss_memio.c",
143 ] 196 "base/nss_memio.h",
144 } 197 "cert/ct_log_verifier_nss.cc",
145 198 "cert/ct_objects_extractor_nss.cc",
146 if (use_openssl) { 199 "cert/jwk_serializer_nss.cc",
147 net_shared_sources -= [ 200 "cert/scoped_nss_types.h",
148 "base/nss_memio.c", 201 "cert/x509_util_nss.cc",
149 "base/nss_memio.h", 202 "quic/crypto/aead_base_decrypter_nss.cc",
150 "cert/ct_log_verifier_nss.cc", 203 "quic/crypto/aead_base_encrypter_nss.cc",
151 "cert/ct_objects_extractor_nss.cc", 204 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc",
152 "cert/jwk_serializer_nss.cc", 205 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc",
153 "cert/scoped_nss_types.h", 206 "quic/crypto/chacha20_poly1305_decrypter_nss.cc",
154 "cert/x509_util_nss.cc", 207 "quic/crypto/chacha20_poly1305_encrypter_nss.cc",
155 "quic/crypto/aead_base_decrypter_nss.cc", 208 "quic/crypto/channel_id_nss.cc",
156 "quic/crypto/aead_base_encrypter_nss.cc", 209 "quic/crypto/p256_key_exchange_nss.cc",
157 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc", 210 "socket/nss_ssl_util.cc",
158 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc", 211 "socket/nss_ssl_util.h",
159 "quic/crypto/chacha20_poly1305_decrypter_nss.cc", 212 "socket/ssl_client_socket_nss.cc",
160 "quic/crypto/chacha20_poly1305_encrypter_nss.cc", 213 "socket/ssl_client_socket_nss.h",
161 "quic/crypto/channel_id_nss.cc", 214 "socket/ssl_server_socket_nss.cc",
162 "quic/crypto/p256_key_exchange_nss.cc", 215 "socket/ssl_server_socket_nss.h",
163 "socket/nss_ssl_util.cc", 216 ]
164 "socket/nss_ssl_util.h", 217 if (is_ios) {
165 "socket/ssl_client_socket_nss.cc", 218 # Always removed for !ios below.
166 "socket/ssl_client_socket_nss.h", 219 sources -= [
167 "socket/ssl_server_socket_nss.cc", 220 "cert/cert_verify_proc_nss.cc",
168 "socket/ssl_server_socket_nss.h", 221 "cert/cert_verify_proc_nss.h",
169 ] 222 ]
170 if (is_ios) { 223 }
171 # Always removed for !ios below. 224 if (is_win) {
172 net_shared_sources -= [ 225 sources -= [ "cert/sha256_legacy_support_nss_win.cc" ]
173 "cert/cert_verify_proc_nss.cc", 226 }
174 "cert/cert_verify_proc_nss.h", 227 if (!use_nss_certs && !is_ios) {
175 ] 228 sources -= [ "cert/x509_util_nss.h" ]
176 } 229 }
177 if (is_win) { 230 } else {
178 net_shared_sources -= [ "cert/sha256_legacy_support_nss_win.cc" ] 231 sources -= [
179 } 232 "cert/ct_log_verifier_openssl.cc",
180 if (!use_nss_certs && !is_ios) { 233 "cert/ct_objects_extractor_openssl.cc",
181 net_shared_sources -= [ "cert/x509_util_nss.h" ] 234 "cert/jwk_serializer_openssl.cc",
182 } 235 "cert/x509_util_openssl.cc",
183 } else { 236 "cert/x509_util_openssl.h",
184 net_shared_sources -= [ 237 "quic/crypto/aead_base_decrypter_openssl.cc",
185 "cert/ct_log_verifier_openssl.cc", 238 "quic/crypto/aead_base_encrypter_openssl.cc",
186 "cert/ct_objects_extractor_openssl.cc", 239 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc",
187 "cert/jwk_serializer_openssl.cc", 240 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc",
188 "cert/x509_util_openssl.cc", 241 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc",
189 "cert/x509_util_openssl.h", 242 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc",
190 "quic/crypto/aead_base_decrypter_openssl.cc", 243 "quic/crypto/channel_id_openssl.cc",
191 "quic/crypto/aead_base_encrypter_openssl.cc", 244 "quic/crypto/p256_key_exchange_openssl.cc",
192 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc", 245 "quic/crypto/scoped_evp_aead_ctx.cc",
193 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc", 246 "quic/crypto/scoped_evp_aead_ctx.h",
194 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc", 247 "socket/ssl_client_socket_openssl.cc",
195 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc", 248 "socket/ssl_client_socket_openssl.h",
196 "quic/crypto/channel_id_openssl.cc", 249 "socket/ssl_server_socket_openssl.cc",
197 "quic/crypto/p256_key_exchange_openssl.cc", 250 "socket/ssl_server_socket_openssl.h",
198 "quic/crypto/scoped_evp_aead_ctx.cc", 251 "ssl/openssl_ssl_util.cc",
199 "quic/crypto/scoped_evp_aead_ctx.h", 252 "ssl/openssl_ssl_util.h",
200 "socket/ssl_client_socket_openssl.cc", 253 "ssl/ssl_client_session_cache_openssl.cc",
201 "socket/ssl_client_socket_openssl.h", 254 "ssl/ssl_client_session_cache_openssl.h",
202 "socket/ssl_server_socket_openssl.cc", 255 "ssl/ssl_platform_key.h",
203 "socket/ssl_server_socket_openssl.h", 256 "ssl/threaded_ssl_private_key.cc",
204 "ssl/openssl_ssl_util.cc", 257 "ssl/threaded_ssl_private_key.h",
205 "ssl/openssl_ssl_util.h", 258 ]
206 "ssl/ssl_client_session_cache_openssl.cc", 259 if (is_mac) {
207 "ssl/ssl_client_session_cache_openssl.h", 260 sources -= [ "ssl/ssl_platform_key_mac.cc" ]
208 "ssl/ssl_platform_key.h", 261 }
209 "ssl/threaded_ssl_private_key.cc", 262 if (is_win) {
210 "ssl/threaded_ssl_private_key.h", 263 sources -= [
211 ] 264 "cert/sha256_legacy_support_openssl_win.cc",
212 if (is_mac) { 265 "ssl/ssl_platform_key_win.cc",
213 net_shared_sources -= [ "ssl/ssl_platform_key_mac.cc" ] 266 ]
214 } 267 }
215 if (is_win) { 268 if (use_nss_certs) {
216 net_shared_sources -= [ 269 sources -= [
217 "cert/sha256_legacy_support_openssl_win.cc", 270 "ssl/client_key_store.cc",
218 "ssl/ssl_platform_key_win.cc", 271 "ssl/client_key_store.h",
219 ] 272 "ssl/ssl_platform_key_nss.cc",
220 } 273 ]
221 if (use_nss_certs) { 274 }
222 net_shared_sources -= [ 275 }
276
277 if (!use_openssl_certs) {
278 sources -= [
279 "base/crypto_module_openssl.cc",
280 "base/keygen_handler_openssl.cc",
281 "base/openssl_private_key_store.h",
282 "base/openssl_private_key_store_memory.cc",
283 "cert/cert_database_openssl.cc",
284 "cert/cert_verify_proc_openssl.cc",
285 "cert/cert_verify_proc_openssl.h",
286 "cert/test_root_certs_openssl.cc",
287 "cert/x509_certificate_openssl.cc",
288 "ssl/openssl_client_key_store.cc",
289 "ssl/openssl_client_key_store.h",
290 ]
291 if (is_android) {
292 sources -= [ "base/openssl_private_key_store_android.cc" ]
293 }
294 } else {
295 if (is_android) {
296 # Android doesn't use these even when using OpenSSL.
297 sources -= [
298 "base/openssl_private_key_store_memory.cc",
299 "cert/cert_database_openssl.cc",
300 "cert/cert_verify_proc_openssl.cc",
301 "cert/test_root_certs_openssl.cc",
302 ]
303 }
304
305 # TODO(davidben): Remove these exclusions when use_openssl_certs builds also
306 # use the SSLPrivateKey machinery.
307 sources -= [
308 "ssl/threaded_ssl_private_key.cc",
309 "ssl/threaded_ssl_private_key.h",
310 ]
311 }
312
313 if (use_glib && !is_chromeos) {
314 configs += [ "//build/config/linux:gconf" ]
315 deps += [ "//build/config/linux:gio" ]
316 }
317
318 if (is_linux) {
319 configs += [ "//build/config/linux:libresolv" ]
320 }
321
322 if (!use_nss_certs) {
323 sources -= [
324 "base/crypto_module_nss.cc",
325 "base/keygen_handler_nss.cc",
326 "cert/cert_database_nss.cc",
327 "cert/nss_cert_database.cc",
328 "cert/nss_cert_database.h",
329 "cert/x509_certificate_nss.cc",
330 "ssl/client_cert_store_nss.cc",
331 "ssl/client_cert_store_nss.h",
332 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
333 "third_party/mozilla_security_manager/nsKeygenHandler.h",
334 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
335 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
336 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
337 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
338 ]
339 if (!is_ios) {
340 # These files are part of the partial implementation of NSS on iOS so
341 # keep them in that case (even though use_nss_certs is not set).
342 sources -= [
343 "cert/cert_verify_proc_nss.cc",
344 "cert/cert_verify_proc_nss.h",
345 "cert/test_root_certs_nss.cc",
346 "cert/x509_util_nss_certs.cc",
347 "cert_net/nss_ocsp.cc",
348 "cert_net/nss_ocsp.h",
349 ]
350 }
351 if (is_chromeos) {
352 # These were already removed on non-ChromeOS.
353 sources -= [
354 "cert/nss_cert_database_chromeos.cc",
355 "cert/nss_cert_database_chromeos.h",
356 "cert/nss_profile_filter_chromeos.cc",
357 "cert/nss_profile_filter_chromeos.h",
358 ]
359 }
360 sources -= [
223 "ssl/client_key_store.cc", 361 "ssl/client_key_store.cc",
224 "ssl/client_key_store.h", 362 "ssl/client_key_store.h",
225 "ssl/ssl_platform_key_nss.cc", 363 "ssl/ssl_platform_key_nss.cc",
226 ] 364 ]
227 } 365 } else if (use_openssl) {
228 } 366 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's
229 367 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file
230 if (!use_openssl_certs) { 368 # in directly.
231 net_shared_sources -= [ 369 sources += [ "third_party/nss/ssl/cmpcert.c" ]
232 "base/crypto_module_openssl.cc", 370 }
233 "base/keygen_handler_openssl.cc", 371
234 "base/openssl_private_key_store.h", 372 if (!enable_websockets) {
235 "base/openssl_private_key_store_memory.cc", 373 sources -= [
236 "cert/cert_database_openssl.cc", 374 "websockets/websocket_basic_handshake_stream.cc",
237 "cert/cert_verify_proc_openssl.cc", 375 "websockets/websocket_basic_handshake_stream.h",
238 "cert/cert_verify_proc_openssl.h", 376 "websockets/websocket_basic_stream.cc",
239 "cert/test_root_certs_openssl.cc", 377 "websockets/websocket_basic_stream.h",
240 "cert/x509_certificate_openssl.cc", 378 "websockets/websocket_channel.cc",
241 "ssl/openssl_client_key_store.cc", 379 "websockets/websocket_channel.h",
242 "ssl/openssl_client_key_store.h", 380 "websockets/websocket_deflate_predictor.h",
243 ] 381 "websockets/websocket_deflate_predictor_impl.cc",
244 if (is_android) { 382 "websockets/websocket_deflate_predictor_impl.h",
245 net_shared_sources -= [ "base/openssl_private_key_store_android.cc" ] 383 "websockets/websocket_deflate_stream.cc",
246 } 384 "websockets/websocket_deflate_stream.h",
247 } else { 385 "websockets/websocket_deflater.cc",
248 if (is_android) { 386 "websockets/websocket_deflater.h",
249 # Android doesn't use these even when using OpenSSL. 387 "websockets/websocket_errors.cc",
250 net_shared_sources -= [ 388 "websockets/websocket_errors.h",
251 "base/openssl_private_key_store_memory.cc", 389 "websockets/websocket_extension.cc",
252 "cert/cert_database_openssl.cc", 390 "websockets/websocket_extension.h",
253 "cert/cert_verify_proc_openssl.cc", 391 "websockets/websocket_extension_parser.cc",
254 "cert/test_root_certs_openssl.cc", 392 "websockets/websocket_extension_parser.h",
255 ] 393 "websockets/websocket_frame.cc",
256 } 394 "websockets/websocket_frame.h",
257 395 "websockets/websocket_frame_parser.cc",
258 # TODO(davidben): Remove these exclusions when use_openssl_certs builds also 396 "websockets/websocket_frame_parser.h",
259 # use the SSLPrivateKey machinery. 397 "websockets/websocket_handshake_challenge.cc",
260 net_shared_sources -= [ 398 "websockets/websocket_handshake_challenge.h",
261 "ssl/threaded_ssl_private_key.cc", 399 "websockets/websocket_handshake_constants.cc",
262 "ssl/threaded_ssl_private_key.h", 400 "websockets/websocket_handshake_constants.h",
263 ] 401 "websockets/websocket_handshake_request_info.cc",
264 } 402 "websockets/websocket_handshake_request_info.h",
265 403 "websockets/websocket_handshake_response_info.cc",
266 if (use_glib && !is_chromeos) { 404 "websockets/websocket_handshake_response_info.h",
267 net_shared_configs += [ "//build/config/linux:gconf" ] 405 "websockets/websocket_handshake_stream_base.h",
268 net_shared_deps += [ "//build/config/linux:gio" ] 406 "websockets/websocket_handshake_stream_create_helper.cc",
269 } 407 "websockets/websocket_handshake_stream_create_helper.h",
270 408 "websockets/websocket_inflater.cc",
271 if (is_linux) { 409 "websockets/websocket_inflater.h",
272 net_shared_configs += [ "//build/config/linux:libresolv" ] 410 "websockets/websocket_mux.h",
273 } 411 "websockets/websocket_stream.cc",
274 412 "websockets/websocket_stream.h",
275 if (!use_nss_certs) { 413 ]
276 net_shared_sources -= [ 414 }
277 "base/crypto_module_nss.cc", 415
278 "base/keygen_handler_nss.cc", 416 if (!enable_mdns) {
279 "cert/cert_database_nss.cc", 417 sources -= [
280 "cert/nss_cert_database.cc", 418 "dns/mdns_cache.cc",
281 "cert/nss_cert_database.h", 419 "dns/mdns_cache.h",
282 "cert/x509_certificate_nss.cc", 420 "dns/mdns_client.cc",
283 "ssl/client_cert_store_nss.cc", 421 "dns/mdns_client.h",
284 "ssl/client_cert_store_nss.h", 422 "dns/mdns_client_impl.cc",
285 "third_party/mozilla_security_manager/nsKeygenHandler.cpp", 423 "dns/mdns_client_impl.h",
286 "third_party/mozilla_security_manager/nsKeygenHandler.h", 424 "dns/record_parsed.cc",
287 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp", 425 "dns/record_parsed.h",
288 "third_party/mozilla_security_manager/nsNSSCertificateDB.h", 426 "dns/record_rdata.cc",
289 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp", 427 "dns/record_rdata.h",
290 "third_party/mozilla_security_manager/nsPKCS12Blob.h", 428 ]
291 ] 429 }
292 if (!is_ios) { 430
293 # These files are part of the partial implementation of NSS on iOS so 431 if (is_win) {
294 # keep them in that case (even though use_nss_certs is not set). 432 sources -= [
295 net_shared_sources -= [ 433 "http/http_auth_handler_ntlm_portable.cc",
296 "cert/cert_verify_proc_nss.cc", 434 "socket/socket_libevent.cc",
297 "cert/cert_verify_proc_nss.h", 435 "socket/socket_libevent.h",
298 "cert/test_root_certs_nss.cc", 436 "socket/tcp_socket_libevent.cc",
299 "cert/x509_util_nss_certs.cc", 437 "socket/tcp_socket_libevent.h",
300 "cert_net/nss_ocsp.cc", 438 "udp/udp_socket_libevent.cc",
301 "cert_net/nss_ocsp.h", 439 "udp/udp_socket_libevent.h",
302 ] 440 ]
303 } 441 } else { # !is_win
304 if (is_chromeos) { 442 sources -= [
305 # These were already removed on non-ChromeOS. 443 "base/winsock_init.cc",
306 net_shared_sources -= [ 444 "base/winsock_init.h",
307 "cert/nss_cert_database_chromeos.cc", 445 "base/winsock_util.cc",
308 "cert/nss_cert_database_chromeos.h", 446 "base/winsock_util.h",
309 "cert/nss_profile_filter_chromeos.cc", 447 "proxy/proxy_resolver_winhttp.cc",
310 "cert/nss_profile_filter_chromeos.h", 448 "proxy/proxy_resolver_winhttp.h",
311 ] 449 ]
312 } 450 }
313 net_shared_sources -= [
314 "ssl/client_key_store.cc",
315 "ssl/client_key_store.h",
316 "ssl/ssl_platform_key_nss.cc",
317 ]
318 } else if (use_openssl) {
319 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's
320 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file
321 # in directly.
322 net_shared_sources += [ "third_party/nss/ssl/cmpcert.c" ]
323 }
324
325 if (!enable_mdns) {
326 net_shared_sources -= [
327 "dns/mdns_cache.cc",
328 "dns/mdns_cache.h",
329 "dns/mdns_client.cc",
330 "dns/mdns_client.h",
331 "dns/mdns_client_impl.cc",
332 "dns/mdns_client_impl.h",
333 "dns/record_parsed.cc",
334 "dns/record_parsed.h",
335 "dns/record_rdata.cc",
336 "dns/record_rdata.h",
337 ]
338 }
339
340 if (is_win) {
341 net_shared_sources -= [
342 "http/http_auth_handler_ntlm_portable.cc",
343 "socket/socket_libevent.cc",
344 "socket/socket_libevent.h",
345 "socket/tcp_socket_libevent.cc",
346 "socket/tcp_socket_libevent.h",
347 "udp/udp_socket_libevent.cc",
348 "udp/udp_socket_libevent.h",
349 ]
350 } else { # !is_win
351 net_shared_sources -= [
352 "base/winsock_init.cc",
353 "base/winsock_init.h",
354 "base/winsock_util.cc",
355 "base/winsock_util.h",
356 "proxy/proxy_resolver_winhttp.cc",
357 "proxy/proxy_resolver_winhttp.h",
358 ]
359 }
360
361 if (is_ios) {
362 # Add back some sources that were otherwise filtered out. iOS needs some Mac
363 # files.
364 net_shared_unfiltered_sources += [
365 "base/mac/url_conversions.h",
366 "base/mac/url_conversions.mm",
367 "base/network_change_notifier_mac.cc",
368 "base/network_config_watcher_mac.cc",
369 "base/network_interfaces_mac.cc",
370 "base/network_interfaces_mac.h",
371 "base/platform_mime_util_mac.mm",
372 "proxy/proxy_resolver_mac.cc",
373 "proxy/proxy_server_mac.cc",
374 ]
375
376 net_shared_sources -= [ "disk_cache/blockfile/file_posix.cc" ]
377 net_shared_deps += [
378 "//third_party/nss:nspr",
379 "//third_party/nss",
380 "//net/third_party/nss/ssl:libssl",
381 ]
382 }
383
384 if (is_ios || is_mac) {
385 net_shared_sources += gypi_values.net_base_mac_ios_sources
386 }
387
388 if (is_android) {
389 net_shared_deps += [ ":net_jni_headers" ]
390
391 # Add some Linux sources that were excluded by the filter, but which
392 # are needed.
393 net_shared_unfiltered_sources += [
394 "base/address_tracker_linux.cc",
395 "base/address_tracker_linux.h",
396 "base/network_interfaces_linux.cc",
397 "base/network_interfaces_linux.h",
398 "base/platform_mime_util_linux.cc",
399 ]
400 }
401
402 component("net") {
403 sources = net_shared_sources
404
405 # Add back some sources that were otherwise filtered out.
406 set_sources_assignment_filter([])
407 sources += net_shared_unfiltered_sources
408 set_sources_assignment_filter(sources_assignment_filter)
409
410 cflags = []
411 configs += net_shared_configs
412 public_configs = [ ":net_config" ]
413
414 public_deps = net_shared_public_deps + [ "//url" ]
415 deps = net_shared_deps
416 451
417 if (is_mac) { 452 if (is_mac) {
418 libs = [ 453 libs = [
419 "Foundation.framework", 454 "Foundation.framework",
420 "Security.framework", 455 "Security.framework",
421 "SystemConfiguration.framework", 456 "SystemConfiguration.framework",
422 "resolv", 457 "resolv",
423 ] 458 ]
424 } 459 }
425 460
426 if (is_ios) { 461 if (is_ios) {
462 # Add back some sources that were otherwise filtered out. iOS needs some Mac
463 # files.
464 set_sources_assignment_filter([])
465 sources += [
466 "base/mac/url_conversions.h",
467 "base/mac/url_conversions.mm",
468 "base/network_change_notifier_mac.cc",
469 "base/network_config_watcher_mac.cc",
470 "base/network_interfaces_mac.cc",
471 "base/network_interfaces_mac.h",
472 "base/platform_mime_util_mac.mm",
473 "proxy/proxy_resolver_mac.cc",
474 "proxy/proxy_server_mac.cc",
475 ]
476 set_sources_assignment_filter(sources_assignment_filter)
477
478 sources -= [ "disk_cache/blockfile/file_posix.cc" ]
427 libs = [ 479 libs = [
428 "CFNetwork.framework", 480 "CFNetwork.framework",
429 "MobileCoreServices.framework", 481 "MobileCoreServices.framework",
430 "Security.framework", 482 "Security.framework",
431 "SystemConfiguration.framework", 483 "SystemConfiguration.framework",
432 "resolv", 484 "resolv",
433 ] 485 ]
486
487 deps += [
488 "//third_party/nss:nspr",
489 "//third_party/nss",
490 "//net/third_party/nss/ssl:libssl",
491 ]
434 } 492 }
435 493
436 if (!disable_file_support) { 494 if (is_ios || is_mac) {
437 sources += gypi_values.net_file_support_sources 495 sources += gypi_values.net_base_mac_ios_sources
438 } 496 }
439 497
440 if (!disable_ftp_support) { 498 if (is_android) {
441 sources += gypi_values.net_ftp_support_sources 499 # Add some Linux sources that were excluded by the filter, but which
500 # are needed.
501 set_sources_assignment_filter([])
502 sources += [
503 "base/address_tracker_linux.cc",
504 "base/address_tracker_linux.h",
505 "base/network_interfaces_linux.cc",
506 "base/network_interfaces_linux.h",
507 "base/platform_mime_util_linux.cc",
508 ]
509 set_sources_assignment_filter(sources_assignment_filter)
510 deps += [ ":net_jni_headers" ]
442 } 511 }
443 512
444 if (enable_websockets) { 513 if (use_icu_alternatives_on_android) {
445 sources += gypi_values.net_websockets_sources
446 }
447
448 # ICU support.
449 deps += [
450 "//base:i18n",
451 "//third_party/icu",
452 ]
453 sources += [
454 "base/filename_util_icu.cc",
455 "base/net_string_util_icu.cc",
456 "base/net_util_icu.cc",
457 ]
458 }
459
460 if (is_android) {
461 # Same as net, but with ICU, file, ftp, and websocket support stripped.
462 component("net_small") {
463 sources = net_shared_sources
464
465 # Add back some sources that were otherwise filtered out.
466 set_sources_assignment_filter([])
467 sources += net_shared_unfiltered_sources
468 set_sources_assignment_filter(sources_assignment_filter)
469
470 cflags = []
471 defines = []
472 configs += net_shared_configs
473 public_configs = [ ":net_config" ]
474
475 public_deps = net_shared_public_deps +
476 [ "//url:url_lib_use_icu_alternatives_on_android" ]
477 deps = net_shared_deps + [ ":net_jni_headers" ]
478
479 defines += [
480 "DISABLE_FILE_SUPPORT",
481 "DISABLE_FTP_SUPPORT",
482 "USE_ICU_ALTERNATIVES_ON_ANDROID=1",
483 ]
484
485 # Use ICU alternative on Android.
486 sources += [ 514 sources += [
487 "base/net_string_util_icu_alternatives_android.cc", 515 "base/net_string_util_icu_alternatives_android.cc",
488 "base/net_string_util_icu_alternatives_android.h", 516 "base/net_string_util_icu_alternatives_android.h",
489 ] 517 ]
518 } else {
519 deps += [
520 "//base:i18n",
521 "//third_party/icu",
522 ]
523 sources += [
524 "base/filename_util_icu.cc",
525 "base/net_string_util_icu.cc",
526 "base/net_util_icu.cc",
527 ]
490 } 528 }
491 } 529 }
492 530
493 grit("net_resources") { 531 grit("net_resources") {
494 source = "base/net_resources.grd" 532 source = "base/net_resources.grd"
495 use_qualified_include = true 533 use_qualified_include = true
496 outputs = [ 534 outputs = [
497 "grit/net_resources.h", 535 "grit/net_resources.h",
498 "net_resources.pak", 536 "net_resources.pak",
499 ] 537 ]
500 } 538 }
501 539
502 proto_library("net_quic_proto") { 540 proto_library("net_quic_proto") {
503 visibility = [ 541 visibility = [ "//net" ] # Part of the net component.
504 ":net",
505 ":net_small",
506 ]
507 542
508 sources = [ 543 sources = [
509 "quic/proto/cached_network_parameters.proto", 544 "quic/proto/cached_network_parameters.proto",
510 "quic/proto/source_address_token.proto", 545 "quic/proto/source_address_token.proto",
511 ] 546 ]
512 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:" 547 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:"
513 cc_include = "net/base/net_export.h" 548 cc_include = "net/base/net_export.h"
514 549
515 defines = [ "NET_IMPLEMENTATION" ] 550 defines = [ "NET_IMPLEMENTATION" ]
516 551
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 sources = [ 1008 sources = [
974 "tools/net_watcher/net_watcher.cc", 1009 "tools/net_watcher/net_watcher.cc",
975 ] 1010 ]
976 deps = [ 1011 deps = [
977 ":net", 1012 ":net",
978 ":net_with_v8", 1013 ":net_with_v8",
979 "//base", 1014 "//base",
980 ] 1015 ]
981 1016
982 if (is_desktop_linux) { 1017 if (is_desktop_linux) {
983 configs += [
984 "//build/config/linux:gconf",
985 "//build/config/linux:glib",
986 ]
987 deps += [ "//build/config/linux:gio" ] 1018 deps += [ "//build/config/linux:gio" ]
988 } 1019 }
1020
1021 if (use_gconf) {
1022 configs += [ "//build/config/linux:gconf" ]
1023 }
1024
1025 if (use_glib) {
1026 configs += [ "//build/config/linux:glib" ]
1027 }
989 } 1028 }
990 } 1029 }
991 1030
992 executable("run_testserver") { 1031 executable("run_testserver") {
993 testonly = true 1032 testonly = true
994 sources = [ 1033 sources = [
995 "tools/testserver/run_testserver.cc", 1034 "tools/testserver/run_testserver.cc",
996 ] 1035 ]
997 deps = [ 1036 deps = [
998 ":test_support", 1037 ":test_support",
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 1227
1189 if (is_android) { 1228 if (is_android) {
1190 generate_jni("net_jni_headers") { 1229 generate_jni("net_jni_headers") {
1191 sources = [ 1230 sources = [
1192 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java", 1231 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java",
1193 "android/java/src/org/chromium/net/AndroidKeyStore.java", 1232 "android/java/src/org/chromium/net/AndroidKeyStore.java",
1194 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java", 1233 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
1195 "android/java/src/org/chromium/net/AndroidPrivateKey.java", 1234 "android/java/src/org/chromium/net/AndroidPrivateKey.java",
1196 "android/java/src/org/chromium/net/GURLUtils.java", 1235 "android/java/src/org/chromium/net/GURLUtils.java",
1197 "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java", 1236 "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java",
1198 "android/java/src/org/chromium/net/NetStringUtil.java",
1199 "android/java/src/org/chromium/net/NetworkChangeNotifier.java", 1237 "android/java/src/org/chromium/net/NetworkChangeNotifier.java",
1200 "android/java/src/org/chromium/net/ProxyChangeListener.java", 1238 "android/java/src/org/chromium/net/ProxyChangeListener.java",
1201 "android/java/src/org/chromium/net/X509Util.java", 1239 "android/java/src/org/chromium/net/X509Util.java",
1202 ] 1240 ]
1203 jni_package = "net" 1241 jni_package = "net"
1204 } 1242 }
1205 generate_jni("net_test_jni_headers") { 1243 generate_jni("net_test_jni_headers") {
1206 sources = [ 1244 sources = [
1207 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java", 1245 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
1208 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator .java", 1246 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator .java",
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 ":simple_quic_tools", 1363 ":simple_quic_tools",
1326 ":test_support", 1364 ":test_support",
1327 "//base", 1365 "//base",
1328 "//base:i18n", 1366 "//base:i18n",
1329 "//base:prefs_test_support", 1367 "//base:prefs_test_support",
1330 "//base/allocator", 1368 "//base/allocator",
1331 "//base/third_party/dynamic_annotations", 1369 "//base/third_party/dynamic_annotations",
1332 "//crypto", 1370 "//crypto",
1333 "//crypto:platform", 1371 "//crypto:platform",
1334 "//crypto:test_support", 1372 "//crypto:test_support",
1335 "//gin",
1336 "//net/base/registry_controlled_domains", 1373 "//net/base/registry_controlled_domains",
1337 "//sql", 1374 "//sql",
1338 "//testing/gmock", 1375 "//testing/gmock",
1339 "//testing/gtest", 1376 "//testing/gtest",
1340 "//third_party/zlib", 1377 "//third_party/zlib",
1341 "//url", 1378 "//url",
1342 ] 1379 ]
1343 1380
1381 if (!is_ios) {
1382 deps += [ "//gin" ]
1383 }
1344 data = [ 1384 data = [
1345 "data/", 1385 "data/",
1346 ] 1386 ]
1347 1387
1348 if (is_linux || is_mac || is_win) { 1388 if (is_linux || is_mac || is_win) {
1349 deps += [ 1389 deps += [
1350 "//third_party/pyftpdlib/", 1390 "//third_party/pyftpdlib/",
1351 "//third_party/pywebsocket/", 1391 "//third_party/pywebsocket/",
1352 "//third_party/tlslite/", 1392 "//third_party/tlslite/",
1353 ] 1393 ]
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1494 ] 1534 ]
1495 } 1535 }
1496 1536
1497 if (!enable_built_in_dns) { 1537 if (!enable_built_in_dns) {
1498 sources -= [ 1538 sources -= [
1499 "dns/address_sorter_posix_unittest.cc", 1539 "dns/address_sorter_posix_unittest.cc",
1500 "dns/address_sorter_unittest.cc", 1540 "dns/address_sorter_unittest.cc",
1501 ] 1541 ]
1502 } 1542 }
1503 1543
1504 if (use_v8_in_net) { 1544 # Always need use_v8_in_net to be 1 to run on Android, so just remove
1545 # net_unittest's dependency on v8 when using icu alternatives instead of
1546 # setting use_v8_in_net to 0.
1547 if (use_v8_in_net && !use_icu_alternatives_on_android) {
1505 deps += [ ":net_with_v8" ] 1548 deps += [ ":net_with_v8" ]
1506 } else { 1549 } else {
1507 sources -= [ 1550 sources -= [
1508 "proxy/proxy_resolver_v8_tracing_unittest.cc", 1551 "proxy/proxy_resolver_v8_tracing_unittest.cc",
1509 "proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc", 1552 "proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc",
1510 "proxy/proxy_resolver_v8_unittest.cc", 1553 "proxy/proxy_resolver_v8_unittest.cc",
1511 ] 1554 ]
1512 } 1555 }
1513 1556
1514 if (use_v8_in_net && !is_android) { 1557 if (use_v8_in_net && !is_android) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1603 # TODO(mmenke): This depends on test_support_base, which depends on 1646 # TODO(mmenke): This depends on test_support_base, which depends on
1604 # icu. Figure out a way to remove that dependency. 1647 # icu. Figure out a way to remove that dependency.
1605 "//testing/android/native_test:native_test_native_code", 1648 "//testing/android/native_test:native_test_native_code",
1606 ] 1649 ]
1607 set_sources_assignment_filter([]) 1650 set_sources_assignment_filter([])
1608 sources += [ "base/address_tracker_linux_unittest.cc" ] 1651 sources += [ "base/address_tracker_linux_unittest.cc" ]
1609 set_sources_assignment_filter(sources_assignment_filter) 1652 set_sources_assignment_filter(sources_assignment_filter)
1610 isolate_file = "net_unittests.isolate" 1653 isolate_file = "net_unittests.isolate"
1611 } 1654 }
1612 1655
1656 if (use_icu_alternatives_on_android) {
1657 sources -= [
1658 "base/filename_util_unittest.cc",
1659 "base/net_util_icu_unittest.cc",
1660 ]
1661 deps -= [ "//base:i18n" ]
1662 }
1663
1613 # Symbols for crashes when running tests on swarming. 1664 # Symbols for crashes when running tests on swarming.
1614 if (symbol_level > 0) { 1665 if (symbol_level > 0) {
1615 if (is_win) { 1666 if (is_win) {
1616 data += [ "$root_out_dir/net_unittests.exe.pdb" ] 1667 data += [ "$root_out_dir/net_unittests.exe.pdb" ]
1617 } else if (is_mac) { 1668 } else if (is_mac) {
1618 data += [ "$root_out_dir/net_unittests.dSYM/" ] 1669 data += [ "$root_out_dir/net_unittests.dSYM/" ]
1619 } 1670 }
1620 } 1671 }
1621 } 1672 }
1622 1673
(...skipping 26 matching lines...) Expand all
1649 if (enable_websockets) { 1700 if (enable_websockets) {
1650 sources += [ "websockets/websocket_frame_perftest.cc" ] 1701 sources += [ "websockets/websocket_frame_perftest.cc" ]
1651 } 1702 }
1652 1703
1653 if (use_v8_in_net) { 1704 if (use_v8_in_net) {
1654 deps += [ ":net_with_v8" ] 1705 deps += [ ":net_with_v8" ]
1655 } else { 1706 } else {
1656 sources -= [ "proxy/proxy_resolver_perftest.cc" ] 1707 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1657 } 1708 }
1658 } 1709 }
OLDNEW
« no previous file with comments | « no previous file | net/net.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698