Compute can_use_lcd_text using property trees.
[chromium-blink-merge.git] / net / net.gyp
blobc450f47ad20d47de18c162d2836e55ec8f8b442c
1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6   'variables': {
7     'chromium_code': 1,
8     # Defines an extra set of libs with an alternate copy of org.apache.http.
9     # TODO(yfriedman): Remove this when crbug.com/488192 is fixed.
10     'net_test_extra_libs': [],
11     'linux_link_kerberos%': 0,
12     'conditions': [
13       ['chromeos==1 or embedded==1 or OS=="android" or OS=="ios"', {
14         # Disable Kerberos on ChromeOS, Android and iOS, at least for now.
15         # It needs configuration (krb5.conf and so on).
16         'use_kerberos%': 0,
17       }, {  # chromeos == 0 and embedded==0 and OS!="android" and OS!="ios"
18         'use_kerberos%': 1,
19       }],
20       ['OS=="android" and target_arch != "ia32"', {
21         # The way the cache uses mmap() is inefficient on some Android devices.
22         # If this flag is set, we hackily avoid using mmap() in the disk cache.
23         # We are pretty confident that mmap-ing the index would not hurt any
24         # existing x86 android devices, but we cannot be so sure about the
25         # variety of ARM devices. So enable it for x86 only for now.
26         'posix_avoid_mmap%': 1,
27       }, {
28         'posix_avoid_mmap%': 0,
29       }],
30       ['OS=="ios"', {
31         # Websockets and socket stream are not used on iOS.
32         'enable_websockets%': 0,
33         # iOS does not use V8.
34         'use_v8_in_net%': 0,
35         'enable_built_in_dns%': 0,
36       }, {
37         'enable_websockets%': 1,
38         'use_v8_in_net%': 1,
39         'enable_built_in_dns%': 1,
40       }],
41     ],
42   },
43   'includes': [
44     '../build/win_precompile.gypi',
45     'net.gypi',
46   ],
47   'targets': [
48     {
49       'target_name': 'net_derived_sources',
50       'type': 'none',
51       'sources': [
52         'base/registry_controlled_domains/effective_tld_names.gperf',
53         'base/registry_controlled_domains/effective_tld_names_unittest1.gperf',
54         'base/registry_controlled_domains/effective_tld_names_unittest2.gperf',
55         'base/registry_controlled_domains/effective_tld_names_unittest3.gperf',
56         'base/registry_controlled_domains/effective_tld_names_unittest4.gperf',
57         'base/registry_controlled_domains/effective_tld_names_unittest5.gperf',
58         'base/registry_controlled_domains/effective_tld_names_unittest6.gperf',
59       ],
60       'rules': [
61         {
62           'rule_name': 'dafsa',
63           'extension': 'gperf',
64           'outputs': [
65             '<(SHARED_INTERMEDIATE_DIR)/net/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-inc.cc',
66           ],
67           'inputs': [
68             'tools/tld_cleanup/make_dafsa.py',
69           ],
70           'action': [
71             'python',
72             'tools/tld_cleanup/make_dafsa.py',
73             '<(RULE_INPUT_PATH)',
74             '<(SHARED_INTERMEDIATE_DIR)/net/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-inc.cc',
75           ],
76         },
77       ],
78       'direct_dependent_settings': {
79         'include_dirs': [
80           '<(SHARED_INTERMEDIATE_DIR)'
81         ],
82       },
83     },
84     {
85       # Protobuf compiler / generator for QUIC crypto protocol buffer.
86       # GN version: //net/quic/proto
87       'target_name': 'net_quic_proto',
88       'type': 'static_library',
89       'sources': [
90         'quic/proto/cached_network_parameters.proto',
91         'quic/proto/source_address_token.proto',
92       ],
93       'variables': {
94         'enable_wexit_time_destructors': 1,
95         'proto_in_dir': 'quic/proto',
96         'proto_out_dir': 'net/quic/proto',
97         'cc_generator_options': 'dllexport_decl=NET_EXPORT_PRIVATE:',
98         'cc_include': 'net/base/net_export.h',
99       },
100       'includes': [
101         '../build/protoc.gypi',
102       ],
103       'defines': [
104         'NET_IMPLEMENTATION',
105       ],
106     },
107     {
108       # GN version: //net
109       'target_name': 'net',
110       'dependencies': [
111         '../base/base.gyp:base_i18n',
112         '../third_party/icu/icu.gyp:icui18n',
113         '../third_party/icu/icu.gyp:icuuc',
114         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
115         '../url/url.gyp:url_lib',
116         'net_quic_proto',
117       ],
118       'sources': [
119         'base/filename_util_icu.cc',
120         'base/net_string_util_icu.cc',
121         'base/net_util_icu.cc',
122       ],
123       'includes': [ 'net_common.gypi' ],
124     },
125     {
126       # GN version: //net:net_unittests
127       'target_name': 'net_unittests',
128       'type': '<(gtest_target_type)',
129       'dependencies': [
130         '../base/base.gyp:base',
131         '../base/base.gyp:base_i18n',
132         '../base/base.gyp:base_prefs_test_support',
133         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
134         '../crypto/crypto.gyp:crypto',
135         '../crypto/crypto.gyp:crypto_test_support',
136         '../testing/gmock.gyp:gmock',
137         '../testing/gtest.gyp:gtest',
138         '../third_party/zlib/zlib.gyp:zlib',
139         '../url/url.gyp:url_lib',
140         'balsa',
141         'http_server',
142         'net',
143         'net_quic_proto',
144         'net_derived_sources',
145         'net_extras',
146         'net_test_support',
147         'simple_quic_tools',
148       ],
149       'sources': [
150         '<@(net_test_sources)',
151       ],
152       'conditions': [
153         ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
154           'dependencies': [
155             'epoll_quic_tools',
156             'epoll_server',
157             'flip_in_mem_edsm_server_base',
158           ],
159           'sources': [
160             '<@(net_linux_test_sources)',
161           ],
162         }],
163         ['OS == "mac" or OS == "ios"', {
164           'sources': [
165             '<@(net_base_test_mac_ios_sources)',
166           ],
167         }],
168         ['chromeos==1', {
169           'sources!': [
170             'proxy/proxy_config_service_linux_unittest.cc',
171           ],
172         }],
173         [ 'OS == "android"', {
174           'sources!': [
175             # See bug http://crbug.com/344533.
176             'disk_cache/blockfile/index_table_v3_unittest.cc',
177           ],
178           'dependencies': [
179             'net_javatests',
180           ],
181         }],
182         [ 'use_nss_certs != 1', {
183           'sources!': [
184             'cert/nss_cert_database_unittest.cc',
185             'cert/nss_cert_database_chromeos_unittest.cc',
186             'cert/nss_profile_filter_chromeos_unittest.cc',
187             'ssl/client_cert_store_chromeos_unittest.cc',
188             'ssl/client_cert_store_nss_unittest.cc',
189           ],
190         }],
191         [ 'use_openssl == 1', {
192           # Avoid compiling/linking with the system library.
193           'dependencies': [
194             '../third_party/boringssl/boringssl.gyp:boringssl',
195           ],
196         }],
197         [ 'use_nss_certs == 1 or OS == "ios" or use_openssl == 0', {
198           'conditions': [
199             [ 'desktop_linux == 1 or chromeos == 1', {
200               'dependencies': [
201                 '../build/linux/system.gyp:ssl',
202               ],
203             }, {  # desktop_linux == 0 and chromeos == 0
204               'dependencies': [
205                 '../third_party/nss/nss.gyp:nspr',
206                 '../third_party/nss/nss.gyp:nss',
207                 'third_party/nss/ssl.gyp:libssl',
208               ],
209             }],
210           ],
211         }],
212         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
213           'conditions': [
214             ['use_allocator!="none"', {
215               'dependencies': [
216                 '../base/allocator/allocator.gyp:allocator',
217               ],
218             }],
219           ],
220         }],
221         [ 'use_kerberos==1', {
222           'defines': [
223             'USE_KERBEROS',
224           ],
225         }, { # use_kerberos == 0
226           'sources!': [
227             'http/http_auth_gssapi_posix_unittest.cc',
228             'http/http_auth_handler_negotiate_unittest.cc',
229             'http/mock_gssapi_library_posix.cc',
230             'http/mock_gssapi_library_posix.h',
231           ],
232         }],
233         [ 'use_openssl == 1 or (desktop_linux == 0 and chromeos == 0 and OS != "ios")', {
234           # Only include this test when on Posix and using NSS for
235           # cert verification or on iOS (which also uses NSS for certs).
236           'sources!': [
237             'cert_net/nss_ocsp_unittest.cc',
238           ],
239         }],
240         [ 'use_openssl==1', {
241             # When building for OpenSSL, we need to exclude NSS specific tests
242             # or functionality not supported by OpenSSL yet.
243             # TODO(bulach): Add equivalent tests when the underlying
244             #               functionality is ported to OpenSSL.
245             'sources!': [
246               'cert/x509_util_nss_unittest.cc',
247               'quic/test_tools/crypto_test_utils_nss.cc',
248             ],
249           }, {  # else !use_openssl: remove the unneeded files and pull in NSS.
250             'sources!': [
251               'cert/x509_util_openssl_unittest.cc',
252               'quic/test_tools/crypto_test_utils_openssl.cc',
253               'socket/ssl_client_socket_openssl_unittest.cc',
254               'ssl/ssl_client_session_cache_openssl_unittest.cc',
255             ],
256           },
257         ],
258         [ 'use_openssl_certs == 0', {
259             'sources!': [
260               'ssl/openssl_client_key_store_unittest.cc',
261             ],
262         }],
263         [ 'enable_websockets != 1', {
264             'sources/': [
265               ['exclude', '^websockets/'],
266               ['exclude', '^server/'],
267             ],
268             'dependencies!': [
269               'http_server',
270             ],
271         }],
272         ['disable_file_support==1', {
273           'sources!': [
274             'base/directory_lister_unittest.cc',
275             'url_request/url_request_file_job_unittest.cc',
276           ],
277         }],
278         [ 'disable_ftp_support==1', {
279             'sources/': [
280               ['exclude', '^ftp/'],
281             ],
282             'sources!': [
283               'url_request/url_request_ftp_job_unittest.cc',
284             ],
285           },
286         ],
287         [ 'enable_built_in_dns!=1', {
288             'sources!': [
289               'dns/address_sorter_posix_unittest.cc',
290               'dns/address_sorter_unittest.cc',
291             ],
292           },
293         ],
294         # Always need use_v8_in_net to be 1 to run gyp on Android, so just
295         # remove net_unittest's dependency on v8 when using icu alternatives
296         # instead of setting use_v8_in_net to 0.
297         [ 'use_v8_in_net==1 and use_icu_alternatives_on_android==0', {
298             'dependencies': [
299               'net_with_v8',
300             ],
301           }, {  # else: !use_v8_in_net
302             'sources!': [
303               'proxy/proxy_resolver_v8_tracing_unittest.cc',
304               'proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc',
305               'proxy/proxy_resolver_v8_unittest.cc',
306             ],
307           },
308         ],
310         [ 'use_v8_in_net==1 and OS != "android"', {
311             'dependencies': [
312               'net_with_v8',
313               'net_browser_services',
314               'net_utility_services',
315               '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
316             ],
317           }, {  # else
318             'sources!': [
319               'dns/host_resolver_mojo_unittest.cc',
320               'dns/mojo_host_resolver_impl_unittest.cc',
321               'proxy/mojo_proxy_resolver_factory_impl_unittest.cc',
322               'proxy/mojo_proxy_resolver_impl_unittest.cc',
323               'proxy/proxy_resolver_error_observer_mojo_unittest.cc',
324               'proxy/proxy_resolver_factory_mojo_unittest.cc',
325               'proxy/proxy_service_mojo_unittest.cc',
326             ],
327           },
328         ],
330         [ 'enable_mdns != 1', {
331             'sources!' : [
332               'dns/mdns_cache_unittest.cc',
333               'dns/mdns_client_unittest.cc',
334               'dns/mdns_query_unittest.cc',
335               'dns/record_parsed_unittest.cc',
336               'dns/record_rdata_unittest.cc',
337             ],
338         }],
339         [ 'OS == "win"', {
340             'sources!': [
341               'dns/dns_config_service_posix_unittest.cc',
342               'http/http_auth_gssapi_posix_unittest.cc',
343             ],
344             # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
345             'msvs_disabled_warnings': [4267, ],
346             'conditions': [
347               [ 'icu_use_data_file_flag == 0', {
348                 # This is needed to trigger the dll copy step on windows.
349                 # TODO(mark): Specifying this here shouldn't be necessary.
350                 'dependencies': [
351                   '../third_party/icu/icu.gyp:icudata',
352                 ],
353               }],
354             ],
355           },
356         ],
357         [ 'OS == "ios"', {
358             'actions': [
359               {
360                 'action_name': 'copy_test_data',
361                 'variables': {
362                   'test_data_files': [
363                     'data/ssl/certificates/',
364                     'data/test.html',
365                     'data/url_request_unittest/',
366                   ],
367                   'test_data_prefix': 'net',
368                 },
369                 'includes': [ '../build/copy_test_data_ios.gypi' ],
370               },
371             ],
372             'sources!': [
373               # TODO(droger): The following tests are disabled because the
374               # implementation is missing or incomplete.
375               # KeygenHandler::GenKeyAndSignChallenge() is not ported to iOS.
376               'base/keygen_handler_unittest.cc',
377               'disk_cache/backend_unittest.cc',
378               'disk_cache/blockfile/block_files_unittest.cc',
379               # Need to read input data files.
380               'filter/gzip_filter_unittest.cc',
381               # Need TestServer.
382               "cert_net/cert_net_fetcher_impl_unittest.cc",
383               'proxy/proxy_script_fetcher_impl_unittest.cc',
384               'socket/ssl_client_socket_unittest.cc',
385               'socket/ssl_server_socket_unittest.cc',
386               'spdy/fuzzing/hpack_fuzz_util_test.cc',
387               # Needs GetAppOutput().
388               'test/python_utils_unittest.cc',
389               'url_request/url_fetcher_impl_unittest.cc',
390               'url_request/url_request_context_builder_unittest.cc',
392               # The following tests are disabled because they don't apply to
393               # iOS.
394               # OS is not "linux" or "freebsd" or "openbsd".
395               'socket/unix_domain_client_socket_posix_unittest.cc',
396               'socket/unix_domain_server_socket_posix_unittest.cc',
398               # See bug http://crbug.com/344533.
399               'disk_cache/blockfile/index_table_v3_unittest.cc',
400             ],
401         }],
402         ['OS == "android"', {
403           # TODO(mmenke):  This depends on test_support_base, which depends on
404           #                icu.  Figure out a way to remove that dependency.
405           'dependencies': [
406             '../testing/android/native_test.gyp:native_test_native_code',
407           ]
408         }],
409         [ 'use_icu_alternatives_on_android == 1', {
410             'dependencies!': [
411               '../base/base.gyp:base_i18n',
412             ],
413             'sources!': [
414               'base/filename_util_unittest.cc',
415               'base/net_util_icu_unittest.cc',
416             ],
417           },
418         ],
419         ['use_v8_in_net==1 and v8_use_external_startup_data==1', {
420           'dependencies': [
421             '../gin/gin.gyp:gin',
422           ]
423         }],
424       ],
425       'target_conditions': [
426         # These source files are excluded by default platform rules, but they
427         # are needed in specific cases on other platforms. Re-including them can
428         # only be done in target_conditions as it is evaluated after the
429         # platform rules.
430         ['OS == "android"', {
431           'sources/': [
432             ['include', '^base/address_tracker_linux_unittest\\.cc$'],
433           ],
434         }],
435         ['OS == "ios"', {
436           'sources/': [
437             ['include', '^base/mac/url_conversions_unittest\\.mm$'],
438           ],
439         }],
440       ],
441     },
442     {
443       'target_name': 'net_perftests',
444       'type': 'executable',
445       'dependencies': [
446         '../base/base.gyp:base',
447         '../base/base.gyp:base_i18n',
448         '../base/base.gyp:test_support_perf',
449         '../testing/gtest.gyp:gtest',
450         '../url/url.gyp:url_lib',
451         'net',
452         'net_extras',
453         'net_test_support',
454       ],
455       'sources': [
456         'base/mime_sniffer_perftest.cc',
457         'cookies/cookie_monster_perftest.cc',
458         'disk_cache/blockfile/disk_cache_perftest.cc',
459         'extras/sqlite/sqlite_persistent_cookie_store_perftest.cc',
460         'proxy/proxy_resolver_perftest.cc',
461         'udp/udp_socket_perftest.cc',
462         'websockets/websocket_frame_perftest.cc',
463       ],
464       'conditions': [
465         [ 'use_v8_in_net==1', {
466             'dependencies': [
467               'net_with_v8',
468             ],
469           }, {  # else: !use_v8_in_net
470             'sources!': [
471               'proxy/proxy_resolver_perftest.cc',
472             ],
473           },
474         ],
475         [ 'OS == "win"', {
476             'conditions': [
477               [ 'icu_use_data_file_flag == 0', {
478                 # This is needed to trigger the dll copy step on windows.
479                 # TODO(mark): Specifying this here shouldn't be necessary.
480                 'dependencies': [
481                   '../third_party/icu/icu.gyp:icudata',
482                 ],
483               }],
484             ],
485             # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
486             'msvs_disabled_warnings': [4267, ],
487         }],
488         [ 'enable_websockets != 1', {
489           'sources!': [
490             'websockets/websocket_frame_perftest.cc',
491           ],
492         }],
493       ],
494     },
495     {
496       'target_name': 'net_test_support',
497       'type': 'static_library',
498       'dependencies': [
499         '../base/base.gyp:base',
500         '../base/base.gyp:test_support_base',
501         '../crypto/crypto.gyp:crypto',
502         '../net/tools/tld_cleanup/tld_cleanup.gyp:tld_cleanup_util',
503         '../testing/gtest.gyp:gtest',
504         '../testing/gmock.gyp:gmock',
505         '../url/url.gyp:url_lib',
506         'net',
507       ],
508       'export_dependent_settings': [
509         '../base/base.gyp:base',
510         # TODO(mmenke):  This depends on icu, figure out a way to build tests
511         #                without icu.
512         '../base/base.gyp:test_support_base',
513         '../crypto/crypto.gyp:crypto',
514         '../testing/gtest.gyp:gtest',
515         '../testing/gmock.gyp:gmock',
516       ],
517       'sources': [
518         'base/load_timing_info_test_util.cc',
519         'base/load_timing_info_test_util.h',
520         'base/mock_file_stream.cc',
521         'base/mock_file_stream.h',
522         'base/test_completion_callback.cc',
523         'base/test_completion_callback.h',
524         'base/test_data_directory.cc',
525         'base/test_data_directory.h',
526         'cert/mock_cert_verifier.cc',
527         'cert/mock_cert_verifier.h',
528         'cookies/cookie_monster_store_test.cc',
529         'cookies/cookie_monster_store_test.h',
530         'cookies/cookie_store_test_callbacks.cc',
531         'cookies/cookie_store_test_callbacks.h',
532         'cookies/cookie_store_test_helpers.cc',
533         'cookies/cookie_store_test_helpers.h',
534         'disk_cache/disk_cache_test_base.cc',
535         'disk_cache/disk_cache_test_base.h',
536         'disk_cache/disk_cache_test_util.cc',
537         'disk_cache/disk_cache_test_util.h',
538         'dns/dns_test_util.cc',
539         'dns/dns_test_util.h',
540         'dns/mock_host_resolver.cc',
541         'dns/mock_host_resolver.h',
542         'dns/mock_mdns_socket_factory.cc',
543         'dns/mock_mdns_socket_factory.h',
544         'http/http_transaction_test_util.cc',
545         'http/http_transaction_test_util.h',
546         'log/test_net_log.cc',
547         'log/test_net_log.h',
548         'log/test_net_log_entry.cc',
549         'log/test_net_log_entry.h',
550         'log/test_net_log_util.cc',
551         'log/test_net_log_util.h',
552         'proxy/mock_proxy_resolver.cc',
553         'proxy/mock_proxy_resolver.h',
554         'proxy/mock_proxy_script_fetcher.cc',
555         'proxy/mock_proxy_script_fetcher.h',
556         'proxy/proxy_config_service_common_unittest.cc',
557         'proxy/proxy_config_service_common_unittest.h',
558         'socket/socket_test_util.cc',
559         'socket/socket_test_util.h',
560         'test/cert_test_util.cc',
561         'test/cert_test_util.h',
562         'test/cert_test_util_nss.cc',
563         'test/channel_id_test_util.cc',
564         'test/channel_id_test_util.h',
565         'test/ct_test_util.cc',
566         'test/ct_test_util.h',
567         'test/embedded_test_server/embedded_test_server.cc',
568         'test/embedded_test_server/embedded_test_server.h',
569         'test/embedded_test_server/http_connection.cc',
570         'test/embedded_test_server/http_connection.h',
571         'test/embedded_test_server/http_request.cc',
572         'test/embedded_test_server/http_request.h',
573         'test/embedded_test_server/http_response.cc',
574         'test/embedded_test_server/http_response.h',
575         'test/embedded_test_server/stream_listen_socket.cc',
576         'test/embedded_test_server/stream_listen_socket.h',
577         'test/embedded_test_server/tcp_listen_socket.cc',
578         'test/embedded_test_server/tcp_listen_socket.h',
579         'test/event_waiter.h',
580         'test/net_test_suite.cc',
581         'test/net_test_suite.h',
582         'test/python_utils.cc',
583         'test/python_utils.h',
584         'test/spawned_test_server/base_test_server.cc',
585         'test/spawned_test_server/base_test_server.h',
586         'test/spawned_test_server/local_test_server.cc',
587         'test/spawned_test_server/local_test_server.h',
588         'test/spawned_test_server/local_test_server_posix.cc',
589         'test/spawned_test_server/local_test_server_win.cc',
590         'test/spawned_test_server/spawned_test_server.h',
591         'test/url_request/url_request_failed_job.cc',
592         'test/url_request/url_request_failed_job.h',
593         'test/url_request/url_request_mock_data_job.cc',
594         'test/url_request/url_request_mock_data_job.h',
595         'test/url_request/url_request_slow_download_job.cc',
596         'test/url_request/url_request_slow_download_job.h',
597         'url_request/test_url_fetcher_factory.cc',
598         'url_request/test_url_fetcher_factory.h',
599         'url_request/url_request_test_util.cc',
600         'url_request/url_request_test_util.h',
601       ],
602       'conditions': [
603         ['OS != "ios"', {
604           'dependencies': [
605             '../third_party/protobuf/protobuf.gyp:py_proto',
606           ],
607         }],
608         ['use_openssl == 0 and (use_nss_certs == 1 or OS == "ios")', {
609           'conditions': [
610             [ 'desktop_linux == 1 or chromeos == 1', {
611               'dependencies': [
612                 '../build/linux/system.gyp:ssl',
613               ],
614             }, {  # desktop_linux == 0 and chromeos == 0
615               'dependencies': [
616                 '../third_party/nss/nss.gyp:nspr',
617                 '../third_party/nss/nss.gyp:nss',
618                 'third_party/nss/ssl.gyp:libssl',
619               ],
620             }],
621           ],
622         }],
623         ['os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
624           'conditions': [
625             ['use_allocator!="none"', {
626               'dependencies': [
627                 '../base/allocator/allocator.gyp:allocator',
628               ],
629             }],
630           ],
631         }],
632         ['OS == "android"', {
633           'dependencies': [
634             'net_test_jni_headers',
635           ],
636           'sources': [
637             'test/android/net_test_jni_onload.cc',
638             'test/android/net_test_jni_onload.h',
639             'test/embedded_test_server/android/embedded_test_server_android.cc',
640             'test/embedded_test_server/android/embedded_test_server_android.h',
641             'test/spawned_test_server/remote_test_server.cc',
642             'test/spawned_test_server/remote_test_server.h',
643             'test/spawned_test_server/spawner_communicator.cc',
644             'test/spawned_test_server/spawner_communicator.h',
645           ],
646         }],
647         [ 'use_v8_in_net==1', {
648             'dependencies': [
649               'net_with_v8',
650             ],
651           },
652         ],
653         [ 'enable_mdns != 1', {
654             'sources!' : [
655               'dns/mock_mdns_socket_factory.cc',
656               'dns/mock_mdns_socket_factory.h'
657             ]
658         }],
659         [ 'use_nss_certs != 1', {
660             'sources!': [
661               'test/cert_test_util_nss.cc',
662             ],
663         }],
664         ['disable_file_support != 1', {
665           'sources': [
666             'test/url_request/url_request_mock_http_job.cc',
667             'test/url_request/url_request_mock_http_job.h',
668             'url_request/test_url_request_interceptor.cc',
669             'url_request/test_url_request_interceptor.h',
670           ],
671         }],
672       ],
673       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
674       'msvs_disabled_warnings': [4267, ],
675     },
676     {
677       'target_name': 'net_resources',
678       'type': 'none',
679       'variables': {
680         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/net',
681       },
682       'actions': [
683         {
684           'action_name': 'net_resources',
685           'variables': {
686             'grit_grd_file': 'base/net_resources.grd',
687           },
688           'includes': [ '../build/grit_action.gypi' ],
689         },
690       ],
691     },
692     {
693       'target_name': 'net_extras',
694       'type': 'static_library',
695       'variables': { 'enable_wexit_time_destructors': 1, },
696       'dependencies': [
697         '../base/base.gyp:base',
698         '../sql/sql.gyp:sql',
699         'net',
700       ],
701       'sources': [
702         '<@(net_extras_sources)',
703       ],
704     },
705     {
706       'target_name': 'net_docs',
707       'type': 'none',
708       'actions': [
709         {
710           'action_name': 'net_docs',
711           'variables': {
712             'net_docs_input_dir': '.',
713           },
714           'inputs': [
715             '<@(net_docs_sources)',
716           ],
717           'outputs': [
718             '<(net_docs_output_dir)',
719           ],
720           'action': [
721             'python',
722             '<(net_docs_script)',
723             '--input_path',
724             '<(net_docs_input_dir)',
725             '--output_path',
726             '<(net_docs_output_dir)',
727             '<@(net_docs_sources)',
728           ],
729           'message': 'Rendering network stack documentation',
730         }
731       ],
732     },
733     {
734       'target_name': 'http_server',
735       'type': 'static_library',
736       'variables': { 'enable_wexit_time_destructors': 1, },
737       'dependencies': [
738         '../base/base.gyp:base',
739         'net',
740       ],
741       'sources': [
742         'server/http_connection.cc',
743         'server/http_connection.h',
744         'server/http_server.cc',
745         'server/http_server.h',
746         'server/http_server_request_info.cc',
747         'server/http_server_request_info.h',
748         'server/http_server_response_info.cc',
749         'server/http_server_response_info.h',
750         'server/web_socket.cc',
751         'server/web_socket.h',
752         'server/web_socket_encoder.cc',
753         'server/web_socket_encoder.h',
754       ],
755       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
756       'msvs_disabled_warnings': [4267, ],
757     },
758     { # GN version: //net:balsa
759       'target_name': 'balsa',
760       'type': 'static_library',
761       'dependencies': [
762         '../base/base.gyp:base',
763         'net',
764       ],
765       'sources': [
766         'tools/balsa/balsa_enums.h',
767         'tools/balsa/balsa_frame.cc',
768         'tools/balsa/balsa_frame.h',
769         'tools/balsa/balsa_headers.cc',
770         'tools/balsa/balsa_headers.h',
771         'tools/balsa/balsa_headers_token_utils.cc',
772         'tools/balsa/balsa_headers_token_utils.h',
773         'tools/balsa/balsa_visitor_interface.h',
774         'tools/balsa/http_message_constants.cc',
775         'tools/balsa/http_message_constants.h',
776         'tools/balsa/noop_balsa_visitor.h',
777         'tools/balsa/simple_buffer.cc',
778         'tools/balsa/simple_buffer.h',
779         'tools/balsa/split.cc',
780         'tools/balsa/split.h',
781         'tools/balsa/string_piece_utils.h',
782         'tools/quic/spdy_balsa_utils.cc',
783         'tools/quic/spdy_balsa_utils.h',
784       ],
785     },
786     {
787       'target_name': 'dump_cache',
788       'type': 'executable',
789       'dependencies': [
790         '../base/base.gyp:base',
791         'net',
792         'net_test_support',
793       ],
794       'sources': [
795         'tools/dump_cache/cache_dumper.cc',
796         'tools/dump_cache/cache_dumper.h',
797         'tools/dump_cache/dump_cache.cc',
798         'tools/dump_cache/dump_files.cc',
799         'tools/dump_cache/dump_files.h',
800         'tools/dump_cache/simple_cache_dumper.cc',
801         'tools/dump_cache/simple_cache_dumper.h',
802         'tools/dump_cache/url_to_filename_encoder.cc',
803         'tools/dump_cache/url_to_filename_encoder.h',
804         'tools/dump_cache/url_utilities.cc',
805         'tools/dump_cache/url_utilities.h',
806       ],
807       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
808       'msvs_disabled_warnings': [4267, ],
809     },
810     {
811       'target_name': 'simple_quic_tools',
812       'type': 'static_library',
813       'dependencies': [
814         '../base/base.gyp:base',
815         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
816         '../url/url.gyp:url_lib',
817         'net',
818         'net_quic_proto',
819       ],
820       'sources': [
821         'tools/quic/quic_client_session.cc',
822         'tools/quic/quic_client_session.h',
823         'tools/quic/quic_dispatcher.cc',
824         'tools/quic/quic_dispatcher.h',
825         'tools/quic/quic_in_memory_cache.cc',
826         'tools/quic/quic_in_memory_cache.h',
827         'tools/quic/quic_per_connection_packet_writer.cc',
828         'tools/quic/quic_per_connection_packet_writer.h',
829         'tools/quic/quic_server_session.cc',
830         'tools/quic/quic_server_session.h',
831         'tools/quic/quic_simple_client.cc',
832         'tools/quic/quic_simple_client.h',
833         'tools/quic/quic_simple_per_connection_packet_writer.cc',
834         'tools/quic/quic_simple_per_connection_packet_writer.h',
835         'tools/quic/quic_simple_server.cc',
836         'tools/quic/quic_simple_server.h',
837         'tools/quic/quic_simple_server_packet_writer.cc',
838         'tools/quic/quic_simple_server_packet_writer.h',
839         'tools/quic/quic_spdy_client_stream.cc',
840         'tools/quic/quic_spdy_client_stream.h',
841         'tools/quic/quic_spdy_server_stream.cc',
842         'tools/quic/quic_spdy_server_stream.h',
843         'tools/quic/quic_time_wait_list_manager.cc',
844         'tools/quic/quic_time_wait_list_manager.h',
845         'tools/quic/synchronous_host_resolver.cc',
846         'tools/quic/synchronous_host_resolver.h',
847       ],
848     },
849   ],
850   'conditions': [
851     ['use_v8_in_net == 1', {
852       'targets': [
853         {
854           'target_name': 'net_with_v8',
855           'type': '<(component)',
856           'variables': { 'enable_wexit_time_destructors': 1, },
857           'dependencies': [
858             '../base/base.gyp:base',
859             '../gin/gin.gyp:gin',
860             '../url/url.gyp:url_lib',
861             '../v8/tools/gyp/v8.gyp:v8',
862             'net'
863           ],
864           'defines': [
865             'NET_IMPLEMENTATION',
866           ],
867           'sources': [
868             'proxy/proxy_resolver_v8.cc',
869             'proxy/proxy_resolver_v8.h',
870             'proxy/proxy_resolver_v8_tracing.cc',
871             'proxy/proxy_resolver_v8_tracing.h',
872             'proxy/proxy_resolver_v8_tracing_wrapper.cc',
873             'proxy/proxy_resolver_v8_tracing_wrapper.h',
874             'proxy/proxy_service_v8.cc',
875             'proxy/proxy_service_v8.h',
876           ],
877           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
878           'msvs_disabled_warnings': [4267, ],
879         },
880       ],
881     }],
882     ['use_v8_in_net == 1 and OS != "android"', {
883       'targets': [
884         {
885           # GN version: //net/interfaces
886           'target_name': 'net_interfaces',
887           'type': 'static_library',
888           'sources': [
889             'interfaces/host_resolver_service.mojom',
890             'interfaces/proxy_resolver_service.mojom',
891           ],
892           'includes': [
893             '../third_party/mojo/mojom_bindings_generator.gypi',
894           ],
895         },
896         {
897           # GN version: //net:net_browser_services
898           'target_name': 'net_browser_services',
899           'type': 'static_library',
900           'sources': [
901             'dns/mojo_host_resolver_impl.cc',
902             'dns/mojo_host_resolver_impl.h',
903             'proxy/in_process_mojo_proxy_resolver_factory.cc',
904             'proxy/in_process_mojo_proxy_resolver_factory.h',
905             'proxy/mojo_proxy_resolver_factory.h',
906             'proxy/proxy_resolver_factory_mojo.cc',
907             'proxy/proxy_resolver_factory_mojo.h',
908             'proxy/proxy_service_mojo.cc',
909             'proxy/proxy_service_mojo.h',
910           ],
911           'dependencies': [
912             'mojo_type_converters',
913             'net',
914             'net_interfaces',
915             '../mojo/mojo_base.gyp:mojo_common_lib',
916             '../mojo/mojo_base.gyp:mojo_environment_chromium',
917             '../mojo/mojo_base.gyp:mojo_url_type_converters',
918             '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
920             # NOTE(amistry): As long as we support in-process Mojo v8 PAC, we
921             # need this dependency since in_process_mojo_proxy_resolver_factory
922             # creates the utility process side Mojo services in the browser
923             # process.  Ultimately, this will go away when we only support
924             # out-of-process.
925             'net_utility_services',
926           ],
927         },
928         {
929           # GN version: //net:net_utility_services
930           'target_name': 'net_utility_services',
931           'type': 'static_library',
932           'sources': [
933             'dns/host_resolver_mojo.cc',
934             'dns/host_resolver_mojo.h',
935             'proxy/mojo_proxy_resolver_factory_impl.cc',
936             'proxy/mojo_proxy_resolver_factory_impl.h',
937             'proxy/mojo_proxy_resolver_impl.cc',
938             'proxy/mojo_proxy_resolver_impl.h',
939             'proxy/proxy_resolver_error_observer_mojo.cc',
940             'proxy/proxy_resolver_error_observer_mojo.h',
941           ],
942           'dependencies': [
943             'mojo_type_converters',
944             'net_interfaces',
945             'net_with_v8',
946             '../mojo/mojo_base.gyp:mojo_url_type_converters',
947             '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
948           ],
949         },
950         {
951           # GN version: //net:mojo_type_converters
952           'target_name': 'mojo_type_converters',
953           'type': 'static_library',
954           'sources': [
955             'dns/mojo_host_type_converters.cc',
956             'dns/mojo_host_type_converters.h',
957             'proxy/mojo_proxy_type_converters.cc',
958             'proxy/mojo_proxy_type_converters.h',
959           ],
960           'dependencies': [
961             'net',
962             'net_interfaces',
963             '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
964           ],
965         },
966       ],
967     }],
968     ['OS != "ios" and OS != "android"', {
969       'targets': [
970         # iOS doesn't have the concept of simple executables, these targets
971         # can't be compiled on the platform.
972         {
973           'target_name': 'crash_cache',
974           'type': 'executable',
975           'dependencies': [
976             '../base/base.gyp:base',
977             'net',
978             'net_test_support',
979           ],
980           'sources': [
981             'tools/crash_cache/crash_cache.cc',
982           ],
983           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
984           'msvs_disabled_warnings': [4267, ],
985         },
986         {
987           'target_name': 'crl_set_dump',
988           'type': 'executable',
989           'dependencies': [
990             '../base/base.gyp:base',
991             'net',
992           ],
993           'sources': [
994             'tools/crl_set_dump/crl_set_dump.cc',
995           ],
996           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
997           'msvs_disabled_warnings': [4267, ],
998         },
999         {
1000           'target_name': 'dns_fuzz_stub',
1001           'type': 'executable',
1002           'dependencies': [
1003             '../base/base.gyp:base',
1004             'net',
1005           ],
1006           'sources': [
1007             'tools/dns_fuzz_stub/dns_fuzz_stub.cc',
1008           ],
1009           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1010           'msvs_disabled_warnings': [4267, ],
1011         },
1012         {
1013           'target_name': 'gdig',
1014           'type': 'executable',
1015           'dependencies': [
1016             '../base/base.gyp:base',
1017             'net',
1018           ],
1019           'sources': [
1020             'tools/gdig/file_net_log.cc',
1021             'tools/gdig/gdig.cc',
1022           ],
1023         },
1024         {
1025           'target_name': 'get_server_time',
1026           'type': 'executable',
1027           'dependencies': [
1028             '../base/base.gyp:base',
1029             '../base/base.gyp:base_i18n',
1030             '../url/url.gyp:url_lib',
1031             'net',
1032           ],
1033           'sources': [
1034             'tools/get_server_time/get_server_time.cc',
1035           ],
1036           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1037           'msvs_disabled_warnings': [4267, ],
1038         },
1039         {
1040           'target_name': 'hpack_example_generator',
1041           'type': 'executable',
1042           'dependencies': [
1043             '../base/base.gyp:base',
1044             'net',
1045           ],
1046           'sources': [
1047             'spdy/fuzzing/hpack_example_generator.cc',
1048           ],
1049           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1050           'msvs_disabled_warnings': [4267, ],
1051         },
1052         {
1053           'target_name': 'hpack_fuzz_mutator',
1054           'type': 'executable',
1055           'dependencies': [
1056             '../base/base.gyp:base',
1057             'net',
1058           ],
1059           'sources': [
1060             'spdy/fuzzing/hpack_fuzz_mutator.cc',
1061           ],
1062           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1063           'msvs_disabled_warnings': [4267, ],
1064         },
1065         {
1066           'target_name': 'hpack_fuzz_wrapper',
1067           'type': 'executable',
1068           'dependencies': [
1069             '../base/base.gyp:base',
1070             'net',
1071           ],
1072           'sources': [
1073             'spdy/fuzzing/hpack_fuzz_wrapper.cc',
1074           ],
1075           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1076           'msvs_disabled_warnings': [4267, ],
1077         },
1078         {
1079           'target_name': 'net_watcher',
1080           'type': 'executable',
1081           'dependencies': [
1082             '../base/base.gyp:base',
1083             'net',
1084             'net_with_v8',
1085           ],
1086           'conditions': [
1087             [ 'use_glib == 1', {
1088                 'dependencies': [
1089                   '../build/linux/system.gyp:gconf',
1090                   '../build/linux/system.gyp:gio',
1091                 ],
1092               },
1093             ],
1094           ],
1095           'sources': [
1096             'tools/net_watcher/net_watcher.cc',
1097           ],
1098         },
1099         {
1100           'target_name': 'run_testserver',
1101           'type': 'executable',
1102           'dependencies': [
1103             '../base/base.gyp:base',
1104             '../base/base.gyp:test_support_base',
1105             '../testing/gtest.gyp:gtest',
1106             'net_test_support',
1107           ],
1108           'sources': [
1109             'tools/testserver/run_testserver.cc',
1110           ],
1111         },
1112         {
1113           'target_name': 'quic_client',
1114           'type': 'executable',
1115           'dependencies': [
1116             '../base/base.gyp:base',
1117             '../url/url.gyp:url_lib',
1118             'net',
1119             'simple_quic_tools',
1120           ],
1121           'sources': [
1122             'tools/quic/quic_simple_client_bin.cc',
1123           ],
1124         },
1125         {
1126           'target_name': 'quic_server',
1127           'type': 'executable',
1128           'dependencies': [
1129             '../base/base.gyp:base',
1130             'net',
1131             'net_quic_proto',
1132             'simple_quic_tools',
1133           ],
1134           'sources': [
1135             'tools/quic/quic_simple_server_bin.cc',
1136           ],
1137         },
1138         {
1139           'target_name': 'stress_cache',
1140           'type': 'executable',
1141           'dependencies': [
1142             '../base/base.gyp:base',
1143             'net',
1144             'net_test_support',
1145           ],
1146           'sources': [
1147             'tools/stress_cache/stress_cache.cc',
1148           ],
1149           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1150           'msvs_disabled_warnings': [4267, ],
1151         },
1152         {
1153           'target_name': 'tld_cleanup',
1154           'type': 'executable',
1155           'dependencies': [
1156             '../base/base.gyp:base',
1157             '../base/base.gyp:base_i18n',
1158             '../net/tools/tld_cleanup/tld_cleanup.gyp:tld_cleanup_util',
1159           ],
1160           'sources': [
1161             'tools/tld_cleanup/tld_cleanup.cc',
1162           ],
1163           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1164           'msvs_disabled_warnings': [4267, ],
1165         },
1166       ],
1167     }],
1168     ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
1169       'targets': [
1170         {
1171           'target_name': 'epoll_server',
1172           'type': 'static_library',
1173           'dependencies': [
1174             '../base/base.gyp:base',
1175             'net',
1176           ],
1177           'sources': [
1178             'tools/epoll_server/epoll_server.cc',
1179             'tools/epoll_server/epoll_server.h',
1180           ],
1181         },
1182         {
1183           'target_name': 'flip_in_mem_edsm_server_base',
1184           'type': 'static_library',
1185           'cflags': [
1186             '-Wno-deprecated',
1187           ],
1188           'dependencies': [
1189             '../base/base.gyp:base',
1190             '../third_party/boringssl/boringssl.gyp:boringssl',
1191             'balsa',
1192             'epoll_server',
1193             'net',
1194           ],
1195           'sources': [
1196             'tools/dump_cache/url_to_filename_encoder.cc',
1197             'tools/dump_cache/url_to_filename_encoder.h',
1198             'tools/dump_cache/url_utilities.cc',
1199             'tools/dump_cache/url_utilities.h',
1200             'tools/flip_server/acceptor_thread.cc',
1201             'tools/flip_server/acceptor_thread.h',
1202             'tools/flip_server/constants.h',
1203             'tools/flip_server/create_listener.cc',
1204             'tools/flip_server/create_listener.h',
1205             'tools/flip_server/flip_config.cc',
1206             'tools/flip_server/flip_config.h',
1207             'tools/flip_server/http_interface.cc',
1208             'tools/flip_server/http_interface.h',
1209             'tools/flip_server/loadtime_measurement.h',
1210             'tools/flip_server/mem_cache.cc',
1211             'tools/flip_server/mem_cache.h',
1212             'tools/flip_server/output_ordering.cc',
1213             'tools/flip_server/output_ordering.h',
1214             'tools/flip_server/ring_buffer.cc',
1215             'tools/flip_server/ring_buffer.h',
1216             'tools/flip_server/sm_connection.cc',
1217             'tools/flip_server/sm_connection.h',
1218             'tools/flip_server/sm_interface.h',
1219             'tools/flip_server/spdy_interface.cc',
1220             'tools/flip_server/spdy_interface.h',
1221             'tools/flip_server/spdy_ssl.cc',
1222             'tools/flip_server/spdy_ssl.h',
1223             'tools/flip_server/spdy_util.cc',
1224             'tools/flip_server/spdy_util.h',
1225             'tools/flip_server/streamer_interface.cc',
1226             'tools/flip_server/streamer_interface.h',
1227           ],
1228         },
1229         {
1230           'target_name': 'flip_in_mem_edsm_server_unittests',
1231           'type': 'executable',
1232           'dependencies': [
1233               '../testing/gtest.gyp:gtest',
1234               '../testing/gmock.gyp:gmock',
1235               '../third_party/boringssl/boringssl.gyp:boringssl',
1236               'flip_in_mem_edsm_server_base',
1237               'net',
1238               'net_test_support',
1239           ],
1240           'sources': [
1241             'tools/flip_server/flip_test_utils.cc',
1242             'tools/flip_server/flip_test_utils.h',
1243             'tools/flip_server/http_interface_test.cc',
1244             'tools/flip_server/mem_cache_test.cc',
1245             'tools/flip_server/run_all_tests.cc',
1246             'tools/flip_server/spdy_interface_test.cc',
1247           ],
1248         },
1249         {
1250           'target_name': 'flip_in_mem_edsm_server',
1251           'type': 'executable',
1252           'cflags': [
1253             '-Wno-deprecated',
1254           ],
1255           'dependencies': [
1256             '../base/base.gyp:base',
1257             'flip_in_mem_edsm_server_base',
1258             'net',
1259           ],
1260           'sources': [
1261             'tools/flip_server/flip_in_mem_edsm_server.cc',
1262           ],
1263         },
1264         {
1265           'target_name': 'epoll_quic_tools',
1266           'type': 'static_library',
1267           'dependencies': [
1268             '../base/base.gyp:base',
1269             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
1270             '../url/url.gyp:url_lib',
1271             'balsa',
1272             'epoll_server',
1273             'net',
1274             'net_quic_proto',
1275           ],
1276           'sources': [
1277             'tools/quic/quic_client.cc',
1278             'tools/quic/quic_client.h',
1279             'tools/quic/quic_default_packet_writer.cc',
1280             'tools/quic/quic_default_packet_writer.h',
1281             'tools/quic/quic_epoll_clock.cc',
1282             'tools/quic/quic_epoll_clock.h',
1283             'tools/quic/quic_epoll_connection_helper.cc',
1284             'tools/quic/quic_epoll_connection_helper.h',
1285             'tools/quic/quic_packet_reader.cc',
1286             'tools/quic/quic_packet_reader.h',
1287             'tools/quic/quic_packet_writer_wrapper.cc',
1288             'tools/quic/quic_packet_writer_wrapper.h',
1289             'tools/quic/quic_server.cc',
1290             'tools/quic/quic_server.h',
1291             'tools/quic/quic_socket_utils.cc',
1292             'tools/quic/quic_socket_utils.h',
1293           ],
1294         },
1295         {
1296           'target_name': 'epoll_quic_client',
1297           'type': 'executable',
1298           'dependencies': [
1299             '../base/base.gyp:base',
1300             'net',
1301             'epoll_quic_tools',
1302             'simple_quic_tools',
1303           ],
1304           'sources': [
1305             'tools/quic/quic_client_bin.cc',
1306           ],
1307         },
1308         {
1309           'target_name': 'epoll_quic_server',
1310           'type': 'executable',
1311           'dependencies': [
1312             '../base/base.gyp:base',
1313             'net',
1314             'net_quic_proto',
1315             'epoll_quic_tools',
1316             'simple_quic_tools',
1317           ],
1318           'sources': [
1319             'tools/quic/quic_server_bin.cc',
1320           ],
1321         },
1322       ]
1323     }],
1324     ['OS=="android"', {
1325       'targets': [
1326         { # The same target as 'net', but with smaller binary size due to
1327           # exclusion of ICU, FTP, FILE and WebSockets support.
1328           'target_name': 'net_small',
1329           'variables': {
1330             'disable_ftp_support': 1,
1331             'disable_file_support': 1,
1332             'enable_websockets': 0,
1333             'use_icu_alternatives_on_android': 1,
1334           },
1335           'dependencies': [
1336             '../url/url.gyp:url_lib_use_icu_alternatives_on_android',
1337           ],
1338           'defines': [
1339             'USE_ICU_ALTERNATIVES_ON_ANDROID=1',
1340             'DISABLE_FILE_SUPPORT=1',
1341             'DISABLE_FTP_SUPPORT=1',
1342           ],
1343           'sources': [
1344             'base/net_string_util_icu_alternatives_android.cc',
1345             'base/net_string_util_icu_alternatives_android.h',
1346           ],
1347           'includes': [ 'net_common.gypi' ],
1348         },
1349         {
1350           'target_name': 'net_jni_headers',
1351           'type': 'none',
1352           'sources': [
1353             'android/java/src/org/chromium/net/AndroidCertVerifyResult.java',
1354             'android/java/src/org/chromium/net/AndroidKeyStore.java',
1355             'android/java/src/org/chromium/net/AndroidNetworkLibrary.java',
1356             'android/java/src/org/chromium/net/AndroidPrivateKey.java',
1357             'android/java/src/org/chromium/net/GURLUtils.java',
1358             'android/java/src/org/chromium/net/NetStringUtil.java',
1359             'android/java/src/org/chromium/net/NetworkChangeNotifier.java',
1360             'android/java/src/org/chromium/net/ProxyChangeListener.java',
1361             'android/java/src/org/chromium/net/X509Util.java',
1362           ],
1363           'variables': {
1364             'jni_gen_package': 'net',
1365           },
1366           'includes': [ '../build/jni_generator.gypi' ],
1367         },
1368         {
1369           'target_name': 'net_test_jni_headers',
1370           'type': 'none',
1371           'sources': [
1372             'android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java',
1373             'test/android/javatests/src/org/chromium/net/test/EmbeddedTestServer.java',
1374           ],
1375           'variables': {
1376             'jni_gen_package': 'net/test',
1377           },
1378           'includes': [ '../build/jni_generator.gypi' ],
1379         },
1380         {
1381           'target_name': 'net_java',
1382           'type': 'none',
1383           'variables': {
1384             'java_in_dir': '../net/android/java',
1385           },
1386           'dependencies': [
1387             '../base/base.gyp:base',
1388             'cert_verify_status_android_java',
1389             'certificate_mime_types_java',
1390             'network_change_notifier_types_java',
1391             'net_errors_java',
1392             'private_key_types_java',
1393             'remote_android_keystore_aidl',
1394           ],
1395           'includes': [ '../build/java.gypi' ],
1396         },
1397         {
1398           # Processes the interface files for communication with an Android KeyStore
1399           # running in a separate process.
1400           'target_name': 'remote_android_keystore_aidl',
1401           'type': 'none',
1402           'variables': {
1403             'aidl_interface_file': '../net/android/java/src/org/chromium/net/IRemoteAndroidKeyStoreInterface.aidl',
1404           },
1405           'sources': [
1406             '../net/android/java/src/org/chromium/net/IRemoteAndroidKeyStore.aidl',
1407             '../net/android/java/src/org/chromium/net/IRemoteAndroidKeyStoreCallbacks.aidl',
1408           ],
1409           'includes': [ '../build/java_aidl.gypi' ],
1410         },
1411         {
1412           'target_name': 'net_java_test_support',
1413           'type': 'none',
1414           'variables': {
1415             'java_in_dir': '../net/test/android/javatests',
1416           },
1417           'dependencies': [
1418             'net_test_support',
1419             'url_request_failed_job_java',
1420             '../base/base.gyp:base_java',
1421             '<@(net_test_extra_libs)',
1422           ],
1423           'includes': [ '../build/java.gypi' ],
1424         },
1425         {
1426           'target_name': 'url_request_failed_job_java',
1427           'type': 'none',
1428           'variables': {
1429             'source_file': 'test/url_request/url_request_failed_job.h',
1430           },
1431           'includes': [ '../build/android/java_cpp_enum.gypi' ],
1432         },
1433         {
1434           'target_name': 'net_javatests',
1435           'type': 'none',
1436           'variables': {
1437             'java_in_dir': '../net/android/javatests',
1438           },
1439           'dependencies': [
1440             '../base/base.gyp:base',
1441             '../base/base.gyp:base_java_test_support',
1442             'net_java',
1443           ],
1444           'includes': [ '../build/java.gypi' ],
1445         },
1446         {
1447           'target_name': 'net_errors_java',
1448           'type': 'none',
1449           'sources': [
1450             'android/java/NetError.template',
1451           ],
1452           'variables': {
1453             'package_name': 'org/chromium/net',
1454             'template_deps': ['base/net_error_list.h'],
1455           },
1456           'includes': [ '../build/android/java_cpp_template.gypi' ],
1457         },
1458         {
1459           'target_name': 'certificate_mime_types_java',
1460           'type': 'none',
1461           'variables': {
1462             'source_file': 'base/mime_util.h',
1463           },
1464           'includes': [ '../build/android/java_cpp_enum.gypi' ],
1465         },
1466         {
1467           'target_name': 'cert_verify_status_android_java',
1468           'type': 'none',
1469           'variables': {
1470             'source_file': 'android/cert_verify_result_android.h',
1471           },
1472           'includes': [ '../build/android/java_cpp_enum.gypi' ],
1473         },
1474         {
1475           'target_name': 'network_change_notifier_types_java',
1476           'type': 'none',
1477           'variables': {
1478             'source_file': 'base/network_change_notifier.h',
1479           },
1480           'includes': [ '../build/android/java_cpp_enum.gypi' ],
1481         },
1482         {
1483           'target_name': 'private_key_types_java',
1484           'type': 'none',
1485           'variables': {
1486             'source_file': 'android/keystore.h',
1487           },
1488           'includes': [ '../build/android/java_cpp_enum.gypi' ],
1489         },
1490         {
1491           'target_name': 'net_unittests_apk',
1492           'type': 'none',
1493           'dependencies': [
1494             'net_java',
1495             'net_javatests',
1496             'net_unittests',
1497           ],
1498           'conditions': [
1499             ['v8_use_external_startup_data==1', {
1500               'dependencies': [
1501                 '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
1502               ],
1503               'copies': [
1504                 {
1505                 'destination': '<(asset_location)',
1506                   'files': [
1507                     '<(PRODUCT_DIR)/natives_blob.bin',
1508                     '<(PRODUCT_DIR)/snapshot_blob.bin',
1509                   ],
1510                 },
1511               ],
1512             }],
1513           ],
1514           'variables': {
1515             'test_suite_name': 'net_unittests',
1516             'isolate_file': 'net_unittests.isolate',
1517             'conditions': [
1518               ['v8_use_external_startup_data==1', {
1519                 'asset_location': '<(PRODUCT_DIR)/net_unittests_apk/assets',
1520                 'additional_input_paths': [
1521                   '<(PRODUCT_DIR)/net_unittests_apk/assets/natives_blob.bin',
1522                   '<(PRODUCT_DIR)/net_unittests_apk/assets/snapshot_blob.bin',
1523                 ],
1524                 'inputs': [
1525                   '<(PRODUCT_DIR)/natives_blob.bin',
1526                   '<(PRODUCT_DIR)/snapshot_blob.bin',
1527                 ],
1528               }],
1529             ],
1530           },
1531           'includes': [ '../build/apk_test.gypi' ],
1532         },
1533       ],
1534     }],
1535     ['OS == "android" or OS == "linux"', {
1536       'targets': [
1537         {
1538           'target_name': 'disk_cache_memory_test',
1539           'type': 'executable',
1540           'dependencies': [
1541             '../base/base.gyp:base',
1542             'net',
1543           ],
1544           'sources': [
1545             'tools/disk_cache_memory_test/disk_cache_memory_test.cc',
1546           ],
1547         },
1548       ],
1549     }],
1550     ['test_isolation_mode != "noop"', {
1551       'targets': [
1552         {
1553           'target_name': 'net_unittests_run',
1554           'type': 'none',
1555           'dependencies': [
1556             'net_unittests',
1557           ],
1558           'includes': [
1559             '../build/isolate.gypi',
1560           ],
1561           'sources': [
1562             'net_unittests.isolate',
1563           ],
1564         },
1565       ],
1566     }],
1567   ],