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