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