Roll src/third_party/WebKit 0ba31e2:698efc0 (svn 192483:192500)
[chromium-blink-merge.git] / net / net.gyp
blob551dabd7fcbc857eb7dde1372047a4acdb0ad36b
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       ],
786       'sources': [
787         'quic/quic_dispatcher.cc',
788         'quic/quic_dispatcher.h',
789         'quic/quic_in_memory_cache.cc',
790         'quic/quic_in_memory_cache.h',
791         'quic/quic_per_connection_packet_writer.cc',
792         'quic/quic_per_connection_packet_writer.h',
793         'quic/quic_server.cc',
794         'quic/quic_server.h',
795         'quic/quic_server_packet_writer.cc',
796         'quic/quic_server_packet_writer.h',
797         'quic/quic_server_session.cc',
798         'quic/quic_server_session.h',
799         'quic/quic_spdy_server_stream.cc',
800         'quic/quic_spdy_server_stream.h',
801         'quic/quic_time_wait_list_manager.cc',
802         'quic/quic_time_wait_list_manager.h',
803       ],
804     },
805     {
806       'target_name': 'simple_quic_tools',
807       'type': 'static_library',
808       'dependencies': [
809         '../base/base.gyp:base',
810         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
811         '../url/url.gyp:url_lib',
812         'net',
813       ],
814       'sources': [
815         'tools/quic/quic_simple_client.cc',
816         'tools/quic/quic_simple_client.h',
817         'tools/quic/quic_simple_client_session.cc',
818         'tools/quic/quic_simple_client_session.h',
819         'tools/quic/quic_simple_client_stream.cc',
820         'tools/quic/quic_simple_client_stream.h',
821         'tools/quic/synchronous_host_resolver.cc',
822         'tools/quic/synchronous_host_resolver.h',
823       ],
824     },
825   ],
826   'conditions': [
827     ['use_v8_in_net == 1', {
828       'targets': [
829         {
830           'target_name': 'net_with_v8',
831           'type': '<(component)',
832           'variables': { 'enable_wexit_time_destructors': 1, },
833           'dependencies': [
834             '../base/base.gyp:base',
835             '../gin/gin.gyp:gin',
836             '../url/url.gyp:url_lib',
837             '../v8/tools/gyp/v8.gyp:v8',
838             'net'
839           ],
840           'defines': [
841             'NET_IMPLEMENTATION',
842           ],
843           'sources': [
844             'proxy/proxy_resolver_v8.cc',
845             'proxy/proxy_resolver_v8.h',
846             'proxy/proxy_resolver_v8_tracing.cc',
847             'proxy/proxy_resolver_v8_tracing.h',
848             'proxy/proxy_service_v8.cc',
849             'proxy/proxy_service_v8.h',
850           ],
851           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
852           'msvs_disabled_warnings': [4267, ],
853         },
854       ],
855     }],
856     ['use_v8_in_net == 1 and OS != "android"', {
857       'targets': [
858         {
859           # GN version: //net/interfaces
860           'target_name': 'net_interfaces',
861           'type': 'static_library',
862           'sources': [
863             'interfaces/host_resolver_service.mojom',
864             'interfaces/proxy_resolver_service.mojom',
865           ],
866           'includes': [
867             '../third_party/mojo/mojom_bindings_generator.gypi',
868           ],
869         },
870         {
871           # GN version: //net:net_browser_services
872           'target_name': 'net_browser_services',
873           'type': 'static_library',
874           'sources': [
875             'dns/mojo_host_resolver_impl.cc',
876             'dns/mojo_host_resolver_impl.h',
877             'proxy/in_process_mojo_proxy_resolver_factory.cc',
878             'proxy/in_process_mojo_proxy_resolver_factory.h',
879             'proxy/mojo_proxy_resolver_factory.h',
880             'proxy/proxy_resolver_mojo.cc',
881             'proxy/proxy_resolver_mojo.h',
882             'proxy/proxy_service_mojo.cc',
883             'proxy/proxy_service_mojo.h',
884           ],
885           'dependencies': [
886             'mojo_type_converters',
887             'net',
888             'net_interfaces',
889             '../mojo/mojo_base.gyp:mojo_common_lib',
890             '../mojo/mojo_base.gyp:mojo_environment_chromium',
891             '../mojo/mojo_base.gyp:mojo_url_type_converters',
892             '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
894             # NOTE(amistry): As long as we support in-process Mojo v8 PAC, we
895             # need this dependency since in_process_mojo_proxy_resolver_factory
896             # creates the utility process side Mojo services in the browser
897             # process.  Ultimately, this will go away when we only support
898             # out-of-process.
899             'net_utility_services',
900           ],
901         },
902         {
903           # GN version: //net:net_utility_services
904           'target_name': 'net_utility_services',
905           'type': 'static_library',
906           'sources': [
907             'dns/host_resolver_mojo.cc',
908             'dns/host_resolver_mojo.h',
909             'proxy/load_state_change_coalescer.cc',
910             'proxy/load_state_change_coalescer.h',
911             'proxy/mojo_proxy_resolver_factory_impl.cc',
912             'proxy/mojo_proxy_resolver_factory_impl.h',
913             'proxy/mojo_proxy_resolver_impl.cc',
914             'proxy/mojo_proxy_resolver_impl.h',
915           ],
916           'dependencies': [
917             'mojo_type_converters',
918             'net_interfaces',
919             'net_with_v8',
920             '../mojo/mojo_base.gyp:mojo_url_type_converters',
921             '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
922           ],
923         },
924         {
925           # GN version: //net:mojo_type_converters
926           'target_name': 'mojo_type_converters',
927           'type': 'static_library',
928           'sources': [
929             'dns/mojo_host_type_converters.cc',
930             'dns/mojo_host_type_converters.h',
931             'proxy/mojo_proxy_type_converters.cc',
932             'proxy/mojo_proxy_type_converters.h',
933           ],
934           'dependencies': [
935             'net',
936             'net_interfaces',
937             '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
938           ],
939         },
940       ],
941     }],
942     ['OS != "ios" and OS != "android"', {
943       'targets': [
944         # iOS doesn't have the concept of simple executables, these targets
945         # can't be compiled on the platform.
946         {
947           'target_name': 'crash_cache',
948           'type': 'executable',
949           'dependencies': [
950             '../base/base.gyp:base',
951             'net',
952             'net_test_support',
953           ],
954           'sources': [
955             'tools/crash_cache/crash_cache.cc',
956           ],
957           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
958           'msvs_disabled_warnings': [4267, ],
959         },
960         {
961           'target_name': 'crl_set_dump',
962           'type': 'executable',
963           'dependencies': [
964             '../base/base.gyp:base',
965             'net',
966           ],
967           'sources': [
968             'tools/crl_set_dump/crl_set_dump.cc',
969           ],
970           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
971           'msvs_disabled_warnings': [4267, ],
972         },
973         {
974           'target_name': 'dns_fuzz_stub',
975           'type': 'executable',
976           'dependencies': [
977             '../base/base.gyp:base',
978             'net',
979           ],
980           'sources': [
981             'tools/dns_fuzz_stub/dns_fuzz_stub.cc',
982           ],
983           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
984           'msvs_disabled_warnings': [4267, ],
985         },
986         {
987           'target_name': 'gdig',
988           'type': 'executable',
989           'dependencies': [
990             '../base/base.gyp:base',
991             'net',
992           ],
993           'sources': [
994             'tools/gdig/file_net_log.cc',
995             'tools/gdig/gdig.cc',
996           ],
997         },
998         {
999           'target_name': 'get_server_time',
1000           'type': 'executable',
1001           'dependencies': [
1002             '../base/base.gyp:base',
1003             '../base/base.gyp:base_i18n',
1004             '../url/url.gyp:url_lib',
1005             'net',
1006           ],
1007           'sources': [
1008             'tools/get_server_time/get_server_time.cc',
1009           ],
1010           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1011           'msvs_disabled_warnings': [4267, ],
1012         },
1013         {
1014           'target_name': 'hpack_example_generator',
1015           'type': 'executable',
1016           'dependencies': [
1017             '../base/base.gyp:base',
1018             'net',
1019           ],
1020           'sources': [
1021             'spdy/fuzzing/hpack_example_generator.cc',
1022           ],
1023           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1024           'msvs_disabled_warnings': [4267, ],
1025         },
1026         {
1027           'target_name': 'hpack_fuzz_mutator',
1028           'type': 'executable',
1029           'dependencies': [
1030             '../base/base.gyp:base',
1031             'net',
1032           ],
1033           'sources': [
1034             'spdy/fuzzing/hpack_fuzz_mutator.cc',
1035           ],
1036           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1037           'msvs_disabled_warnings': [4267, ],
1038         },
1039         {
1040           'target_name': 'hpack_fuzz_wrapper',
1041           'type': 'executable',
1042           'dependencies': [
1043             '../base/base.gyp:base',
1044             'net',
1045           ],
1046           'sources': [
1047             'spdy/fuzzing/hpack_fuzz_wrapper.cc',
1048           ],
1049           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1050           'msvs_disabled_warnings': [4267, ],
1051         },
1052         {
1053           'target_name': 'net_watcher',
1054           'type': 'executable',
1055           'dependencies': [
1056             '../base/base.gyp:base',
1057             'net',
1058             'net_with_v8',
1059           ],
1060           'conditions': [
1061             [ 'use_glib == 1', {
1062                 'dependencies': [
1063                   '../build/linux/system.gyp:gconf',
1064                   '../build/linux/system.gyp:gio',
1065                 ],
1066               },
1067             ],
1068           ],
1069           'sources': [
1070             'tools/net_watcher/net_watcher.cc',
1071           ],
1072         },
1073         {
1074           'target_name': 'run_testserver',
1075           'type': 'executable',
1076           'dependencies': [
1077             '../base/base.gyp:base',
1078             '../base/base.gyp:test_support_base',
1079             '../testing/gtest.gyp:gtest',
1080             'net_test_support',
1081           ],
1082           'sources': [
1083             'tools/testserver/run_testserver.cc',
1084           ],
1085         },
1086         {
1087           'target_name': 'simple_quic_client',
1088           'type': 'executable',
1089           'dependencies': [
1090             '../base/base.gyp:base',
1091             '../url/url.gyp:url_lib',
1092             'net',
1093             'simple_quic_tools',
1094           ],
1095           'sources': [
1096             'tools/quic/quic_simple_client_bin.cc',
1097           ],
1098         },
1099         {
1100           'target_name': 'stress_cache',
1101           'type': 'executable',
1102           'dependencies': [
1103             '../base/base.gyp:base',
1104             'net',
1105             'net_test_support',
1106           ],
1107           'sources': [
1108             'tools/stress_cache/stress_cache.cc',
1109           ],
1110           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1111           'msvs_disabled_warnings': [4267, ],
1112         },
1113         {
1114           'target_name': 'tld_cleanup',
1115           'type': 'executable',
1116           'dependencies': [
1117             '../base/base.gyp:base',
1118             '../base/base.gyp:base_i18n',
1119             '../net/tools/tld_cleanup/tld_cleanup.gyp:tld_cleanup_util',
1120           ],
1121           'sources': [
1122             'tools/tld_cleanup/tld_cleanup.cc',
1123           ],
1124           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1125           'msvs_disabled_warnings': [4267, ],
1126         },
1127       ],
1128     }],
1129     ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
1130       'targets': [
1131         {
1132           'target_name': 'epoll_server',
1133           'type': 'static_library',
1134           'dependencies': [
1135             '../base/base.gyp:base',
1136             'net',
1137           ],
1138           'sources': [
1139             'tools/epoll_server/epoll_server.cc',
1140             'tools/epoll_server/linux_epoll_server.cc',
1141             'tools/epoll_server/epoll_server.h',
1142           ],
1143         },
1144         {
1145           'target_name': 'flip_in_mem_edsm_server_base',
1146           'type': 'static_library',
1147           'cflags': [
1148             '-Wno-deprecated',
1149           ],
1150           'dependencies': [
1151             '../base/base.gyp:base',
1152             '../third_party/boringssl/boringssl.gyp:boringssl',
1153             'balsa',
1154             'epoll_server',
1155             'net',
1156           ],
1157           'sources': [
1158             'tools/dump_cache/url_to_filename_encoder.cc',
1159             'tools/dump_cache/url_to_filename_encoder.h',
1160             'tools/dump_cache/url_utilities.cc',
1161             'tools/dump_cache/url_utilities.h',
1162             'tools/flip_server/acceptor_thread.cc',
1163             'tools/flip_server/acceptor_thread.h',
1164             'tools/flip_server/constants.h',
1165             'tools/flip_server/create_listener.cc',
1166             'tools/flip_server/create_listener.h',
1167             'tools/flip_server/flip_config.cc',
1168             'tools/flip_server/flip_config.h',
1169             'tools/flip_server/http_interface.cc',
1170             'tools/flip_server/http_interface.h',
1171             'tools/flip_server/loadtime_measurement.h',
1172             'tools/flip_server/mem_cache.cc',
1173             'tools/flip_server/mem_cache.h',
1174             'tools/flip_server/output_ordering.cc',
1175             'tools/flip_server/output_ordering.h',
1176             'tools/flip_server/ring_buffer.cc',
1177             'tools/flip_server/ring_buffer.h',
1178             'tools/flip_server/sm_connection.cc',
1179             'tools/flip_server/sm_connection.h',
1180             'tools/flip_server/sm_interface.h',
1181             'tools/flip_server/spdy_interface.cc',
1182             'tools/flip_server/spdy_interface.h',
1183             'tools/flip_server/spdy_ssl.cc',
1184             'tools/flip_server/spdy_ssl.h',
1185             'tools/flip_server/spdy_util.cc',
1186             'tools/flip_server/spdy_util.h',
1187             'tools/flip_server/streamer_interface.cc',
1188             'tools/flip_server/streamer_interface.h',
1189           ],
1190         },
1191         {
1192           'target_name': 'flip_in_mem_edsm_server_unittests',
1193           'type': 'executable',
1194           'dependencies': [
1195               '../testing/gtest.gyp:gtest',
1196               '../testing/gmock.gyp:gmock',
1197               '../third_party/boringssl/boringssl.gyp:boringssl',
1198               'flip_in_mem_edsm_server_base',
1199               'net',
1200               'net_test_support',
1201           ],
1202           'sources': [
1203             'tools/flip_server/flip_test_utils.cc',
1204             'tools/flip_server/flip_test_utils.h',
1205             'tools/flip_server/http_interface_test.cc',
1206             'tools/flip_server/mem_cache_test.cc',
1207             'tools/flip_server/run_all_tests.cc',
1208             'tools/flip_server/spdy_interface_test.cc',
1209           ],
1210         },
1211         {
1212           'target_name': 'flip_in_mem_edsm_server',
1213           'type': 'executable',
1214           'cflags': [
1215             '-Wno-deprecated',
1216           ],
1217           'dependencies': [
1218             '../base/base.gyp:base',
1219             'flip_in_mem_edsm_server_base',
1220             'net',
1221           ],
1222           'sources': [
1223             'tools/flip_server/flip_in_mem_edsm_server.cc',
1224           ],
1225         },
1226         {
1227           'target_name': 'quic_base',
1228           'type': 'static_library',
1229           'dependencies': [
1230             '../base/base.gyp:base',
1231             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
1232             '../url/url.gyp:url_lib',
1233             'balsa',
1234             'epoll_server',
1235             'net',
1236           ],
1237           'sources': [
1238             'tools/quic/quic_client.cc',
1239             'tools/quic/quic_client.h',
1240             'tools/quic/quic_client_session.cc',
1241             'tools/quic/quic_client_session.h',
1242             'tools/quic/quic_default_packet_writer.cc',
1243             'tools/quic/quic_default_packet_writer.h',
1244             'tools/quic/quic_dispatcher.cc',
1245             'tools/quic/quic_dispatcher.h',
1246             'tools/quic/quic_epoll_clock.cc',
1247             'tools/quic/quic_epoll_clock.h',
1248             'tools/quic/quic_epoll_connection_helper.cc',
1249             'tools/quic/quic_epoll_connection_helper.h',
1250             'tools/quic/quic_in_memory_cache.cc',
1251             'tools/quic/quic_in_memory_cache.h',
1252             'tools/quic/quic_packet_reader.cc',
1253             'tools/quic/quic_packet_reader.h',
1254             'tools/quic/quic_packet_writer_wrapper.cc',
1255             'tools/quic/quic_packet_writer_wrapper.h',
1256             'tools/quic/quic_per_connection_packet_writer.cc',
1257             'tools/quic/quic_per_connection_packet_writer.h',
1258             'tools/quic/quic_server.cc',
1259             'tools/quic/quic_server.h',
1260             'tools/quic/quic_server_session.cc',
1261             'tools/quic/quic_server_session.h',
1262             'tools/quic/quic_socket_utils.cc',
1263             'tools/quic/quic_socket_utils.h',
1264             'tools/quic/quic_spdy_client_stream.cc',
1265             'tools/quic/quic_spdy_client_stream.h',
1266             'tools/quic/quic_spdy_server_stream.cc',
1267             'tools/quic/quic_spdy_server_stream.h',
1268             'tools/quic/quic_time_wait_list_manager.cc',
1269             'tools/quic/quic_time_wait_list_manager.h',
1270           ],
1271         },
1272         {
1273           'target_name': 'quic_client',
1274           'type': 'executable',
1275           'dependencies': [
1276             '../base/base.gyp:base',
1277             'net',
1278             'quic_base',
1279             'simple_quic_tools',
1280           ],
1281           'sources': [
1282             'tools/quic/quic_client_bin.cc',
1283           ],
1284         },
1285       ]
1286     }],
1287     ['os_posix == 1 and OS != "ios" and OS != "android"', {
1288       'targets': [
1289         {
1290           'target_name': 'quic_server',
1291           'type': 'executable',
1292           'dependencies': [
1293             '../base/base.gyp:base',
1294             'net',
1295             'quic_tools',
1296           ],
1297           'sources': [
1298             'quic/quic_server_bin.cc',
1299           ],
1300         },
1301       ]
1302     }],
1303     ['OS=="android"', {
1304       'targets': [
1305         { # The same target as 'net', but with smaller binary size due to
1306           # exclusion of ICU, FTP, FILE and WebSockets support.
1307           'target_name': 'net_small',
1308           'variables': {
1309             'disable_ftp_support': 1,
1310             'disable_file_support': 1,
1311             'enable_websockets': 0,
1312           },
1313           'dependencies': [
1314             '../url/url.gyp:url_lib_use_icu_alternatives_on_android',
1315           ],
1316           'defines': [
1317             'USE_ICU_ALTERNATIVES_ON_ANDROID=1',
1318             'DISABLE_FILE_SUPPORT=1',
1319             'DISABLE_FTP_SUPPORT=1',
1320           ],
1321           'sources': [
1322             'base/net_string_util_icu_alternatives_android.cc',
1323             'base/net_string_util_icu_alternatives_android.h',
1324           ],
1325           'includes': [ 'net_common.gypi' ],
1326         },
1327         {
1328           'target_name': 'net_jni_headers',
1329           'type': 'none',
1330           'sources': [
1331             'android/java/src/org/chromium/net/AndroidCertVerifyResult.java',
1332             'android/java/src/org/chromium/net/AndroidKeyStore.java',
1333             'android/java/src/org/chromium/net/AndroidNetworkLibrary.java',
1334             'android/java/src/org/chromium/net/AndroidPrivateKey.java',
1335             'android/java/src/org/chromium/net/GURLUtils.java',
1336             'android/java/src/org/chromium/net/NetStringUtil.java',
1337             'android/java/src/org/chromium/net/NetworkChangeNotifier.java',
1338             'android/java/src/org/chromium/net/ProxyChangeListener.java',
1339             'android/java/src/org/chromium/net/X509Util.java',
1340           ],
1341           'variables': {
1342             'jni_gen_package': 'net',
1343           },
1344           'includes': [ '../build/jni_generator.gypi' ],
1345         },
1346         {
1347           'target_name': 'net_test_jni_headers',
1348           'type': 'none',
1349           'sources': [
1350             'android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java',
1351           ],
1352           'variables': {
1353             'jni_gen_package': 'net',
1354           },
1355           'includes': [ '../build/jni_generator.gypi' ],
1356         },
1357         {
1358           'target_name': 'net_java',
1359           'type': 'none',
1360           'variables': {
1361             'java_in_dir': '../net/android/java',
1362           },
1363           'dependencies': [
1364             '../base/base.gyp:base',
1365             'cert_verify_status_android_java',
1366             'certificate_mime_types_java',
1367             'network_change_notifier_types_java',
1368             'net_errors_java',
1369             'private_key_types_java',
1370             'remote_android_keystore_aidl',
1371           ],
1372           'includes': [ '../build/java.gypi' ],
1373         },
1374         {
1375           # Processes the interface files for communication with an Android KeyStore
1376           # running in a separate process.
1377           'target_name': 'remote_android_keystore_aidl',
1378           'type': 'none',
1379           'variables': {
1380             'aidl_interface_file': '../net/android/java/src/org/chromium/net/IRemoteAndroidKeyStoreInterface.aidl',
1381           },
1382           'sources': [
1383             '../net/android/java/src/org/chromium/net/IRemoteAndroidKeyStore.aidl',
1384             '../net/android/java/src/org/chromium/net/IRemoteAndroidKeyStoreCallbacks.aidl',
1385           ],
1386           'includes': [ '../build/java_aidl.gypi' ],
1387         },
1388         {
1389           'target_name': 'net_java_test_support',
1390           'type': 'none',
1391           'variables': {
1392             'java_in_dir': '../net/test/android/javatests',
1393           },
1394           'includes': [ '../build/java.gypi' ],
1395         },
1396         {
1397           'target_name': 'net_javatests',
1398           'type': 'none',
1399           'variables': {
1400             'java_in_dir': '../net/android/javatests',
1401           },
1402           'dependencies': [
1403             '../base/base.gyp:base',
1404             '../base/base.gyp:base_java_test_support',
1405             'net_java',
1406           ],
1407           'includes': [ '../build/java.gypi' ],
1408         },
1409         {
1410           'target_name': 'net_errors_java',
1411           'type': 'none',
1412           'sources': [
1413             'android/java/NetError.template',
1414           ],
1415           'variables': {
1416             'package_name': 'org/chromium/net',
1417             'template_deps': ['base/net_error_list.h'],
1418           },
1419           'includes': [ '../build/android/java_cpp_template.gypi' ],
1420         },
1421         {
1422           'target_name': 'certificate_mime_types_java',
1423           'type': 'none',
1424           'variables': {
1425             'source_file': 'base/mime_util.h',
1426           },
1427           'includes': [ '../build/android/java_cpp_enum.gypi' ],
1428         },
1429         {
1430           'target_name': 'cert_verify_status_android_java',
1431           'type': 'none',
1432           'variables': {
1433             'source_file': 'android/cert_verify_result_android.h',
1434           },
1435           'includes': [ '../build/android/java_cpp_enum.gypi' ],
1436         },
1437         {
1438           'target_name': 'network_change_notifier_types_java',
1439           'type': 'none',
1440           'variables': {
1441             'source_file': 'base/network_change_notifier.h',
1442           },
1443           'includes': [ '../build/android/java_cpp_enum.gypi' ],
1444         },
1445         {
1446           'target_name': 'private_key_types_java',
1447           'type': 'none',
1448           'variables': {
1449             'source_file': 'android/keystore.h',
1450           },
1451           'includes': [ '../build/android/java_cpp_enum.gypi' ],
1452         },
1453         {
1454           'target_name': 'net_unittests_apk',
1455           'type': 'none',
1456           'dependencies': [
1457             'net_java',
1458             'net_javatests',
1459             'net_unittests',
1460           ],
1461           'conditions': [
1462             ['v8_use_external_startup_data==1', {
1463               'dependencies': [
1464                 '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
1465               ],
1466               'copies': [
1467                 {
1468                 'destination': '<(asset_location)',
1469                   'files': [
1470                     '<(PRODUCT_DIR)/natives_blob.bin',
1471                     '<(PRODUCT_DIR)/snapshot_blob.bin',
1472                   ],
1473                 },
1474               ],
1475             }],
1476           ],
1477           'variables': {
1478             'test_suite_name': 'net_unittests',
1479             'conditions': [
1480               ['v8_use_external_startup_data==1', {
1481                 'asset_location': '<(PRODUCT_DIR)/net_unittests_apk/assets',
1482                 'additional_input_paths': [
1483                   '<(PRODUCT_DIR)/net_unittests_apk/assets/natives_blob.bin',
1484                   '<(PRODUCT_DIR)/net_unittests_apk/assets/snapshot_blob.bin',
1485                 ],
1486                 'inputs': [
1487                   '<(PRODUCT_DIR)/natives_blob.bin',
1488                   '<(PRODUCT_DIR)/snapshot_blob.bin',
1489                 ],
1490               }],
1491             ],
1492           },
1493           'includes': [ '../build/apk_test.gypi' ],
1494         },
1495       ],
1496     }],
1497     ['OS == "android" or OS == "linux"', {
1498       'targets': [
1499         {
1500           'target_name': 'disk_cache_memory_test',
1501           'type': 'executable',
1502           'dependencies': [
1503             '../base/base.gyp:base',
1504             'net',
1505           ],
1506           'sources': [
1507             'tools/disk_cache_memory_test/disk_cache_memory_test.cc',
1508           ],
1509         },
1510       ],
1511     }],
1512     ['test_isolation_mode != "noop"', {
1513       'targets': [
1514         {
1515           'target_name': 'net_unittests_run',
1516           'type': 'none',
1517           'dependencies': [
1518             'net_unittests',
1519           ],
1520           'includes': [
1521             '../build/isolate.gypi',
1522           ],
1523           'sources': [
1524             'net_unittests.isolate',
1525           ],
1526         },
1527       ],
1528     }],
1529   ],