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