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