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