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