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