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