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