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