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