Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/crypto.gni") | 5 import("//build/config/crypto.gni") |
| 6 import("//build/config/features.gni") | 6 import("//build/config/features.gni") |
| 7 import("//build/config/ui.gni") | 7 import("//build/config/ui.gni") |
| 8 import("//build/module_args/v8.gni") | 8 import("//build/module_args/v8.gni") |
| 9 import("//url/config.gni") | |
| 10 import("//testing/test.gni") | 9 import("//testing/test.gni") |
| 11 import("//third_party/icu/config.gni") | 10 import("//third_party/icu/config.gni") |
| 12 import("//third_party/protobuf/proto_library.gni") | 11 import("//third_party/protobuf/proto_library.gni") |
| 13 | 12 |
| 14 # TODO(cjhopman): //build/config/android/rules.gni also imports grit_rule.gni. | 13 # TODO(cjhopman): //build/config/android/rules.gni also imports grit_rule.gni. |
| 15 # Currently, that file can't be imported multiple times. Make this always | 14 # Currently, that file can't be imported multiple times. Make this always |
| 16 # imported when http://crbug.com/393704 is fixed. | 15 # imported when http://crbug.com/393704 is fixed. |
| 17 if (!is_android) { | 16 if (!is_android) { |
| 18 import("//tools/grit/grit_rule.gni") | 17 import("//tools/grit/grit_rule.gni") |
| 19 } | 18 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 config("net_config") { | 55 config("net_config") { |
| 57 defines = [] | 56 defines = [] |
| 58 if (posix_avoid_mmap) { | 57 if (posix_avoid_mmap) { |
| 59 defines += [ "POSIX_AVOID_MMAP" ] | 58 defines += [ "POSIX_AVOID_MMAP" ] |
| 60 } | 59 } |
| 61 if (disable_file_support) { | 60 if (disable_file_support) { |
| 62 defines += [ "DISABLE_FILE_SUPPORT" ] | 61 defines += [ "DISABLE_FILE_SUPPORT" ] |
| 63 } | 62 } |
| 64 } | 63 } |
| 65 | 64 |
| 66 component("net") { | 65 source_set("net_common") { |
| 67 sources = | 66 sources = |
| 68 gypi_values.net_nacl_common_sources + gypi_values.net_non_nacl_sources | 67 gypi_values.net_nacl_common_sources + gypi_values.net_non_nacl_sources |
| 69 | 68 |
| 70 cflags = [] | 69 cflags = [] |
| 71 defines = [ | 70 defines = [ |
| 72 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to | 71 # TODO(GYP) Note that the GYP file supports linux_link_kerberos (defaults to |
| 73 # 0) which implies that we run pkg_config on kerberos and link to that | 72 # 0) which implies that we run pkg_config on kerberos and link to that |
| 74 # rather than setting this define which will dynamically open it. That | 73 # rather than setting this define which will dynamically open it. That |
| 75 # doesn't seem to be set in the regular builds, so we're skipping this | 74 # doesn't seem to be set in the regular builds, so we're skipping this |
| 76 # capability here. | 75 # capability here. |
| 77 "DLOPEN_KERBEROS", | 76 "DLOPEN_KERBEROS", |
| 78 "NET_IMPLEMENTATION", | 77 "NET_IMPLEMENTATION", |
| 79 ] | 78 ] |
| 80 | 79 |
| 81 configs += [ | 80 configs += [ |
| 82 "//build/config:precompiled_headers", | 81 "//build/config:precompiled_headers", |
| 83 | 82 |
| 84 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 83 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 85 "//build/config/compiler:no_size_t_to_int_warning", | 84 "//build/config/compiler:no_size_t_to_int_warning", |
| 86 ] | 85 ] |
| 87 public_configs = [ ":net_config" ] | 86 public_configs = [ ":net_config" ] |
| 88 include_dirs = [] | 87 include_dirs = [] |
| 89 | 88 |
| 90 public_deps = [ | 89 public_deps = [ |
| 91 ":net_quic_proto", | 90 ":net_quic_proto", |
| 92 "//crypto", | 91 "//crypto", |
| 93 "//crypto:platform", | 92 "//crypto:platform", |
| 94 "//url", | |
| 95 ] | 93 ] |
| 96 deps = [ | 94 deps = [ |
| 97 ":net_resources", | 95 ":net_resources", |
| 98 "//base", | 96 "//base", |
| 99 "//base:prefs", | 97 "//base:prefs", |
| 100 "//base/third_party/dynamic_annotations", | 98 "//base/third_party/dynamic_annotations", |
| 101 "//net/base/registry_controlled_domains", | 99 "//net/base/registry_controlled_domains", |
| 102 "//sdch", | 100 "//sdch", |
| 103 "//third_party/protobuf:protobuf_lite", | 101 "//third_party/protobuf:protobuf_lite", |
| 104 "//third_party/zlib", | 102 "//third_party/zlib", |
| 105 "//url", | |
| 106 ] | 103 ] |
| 107 | 104 |
| 108 if (use_kerberos) { | 105 if (use_kerberos) { |
| 109 defines += [ "USE_KERBEROS" ] | 106 defines += [ "USE_KERBEROS" ] |
| 110 if (is_android) { | 107 if (is_android) { |
| 111 include_dirs += [ "/usr/include/kerberosV" ] | 108 include_dirs += [ "/usr/include/kerberosV" ] |
| 112 } | 109 } |
| 113 } else { | 110 } else { |
| 114 sources -= [ | 111 sources -= [ |
| 115 "http/http_auth_gssapi_posix.cc", | 112 "http/http_auth_gssapi_posix.cc", |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 171 "ftp/ftp_server_type_histograms.h", | 168 "ftp/ftp_server_type_histograms.h", |
| 172 "ftp/ftp_transaction.h", | 169 "ftp/ftp_transaction.h", |
| 173 "ftp/ftp_transaction_factory.h", | 170 "ftp/ftp_transaction_factory.h", |
| 174 "ftp/ftp_util.cc", | 171 "ftp/ftp_util.cc", |
| 175 "ftp/ftp_util.h", | 172 "ftp/ftp_util.h", |
| 176 "url_request/ftp_protocol_handler.cc", | 173 "url_request/ftp_protocol_handler.cc", |
| 177 "url_request/ftp_protocol_handler.h", | 174 "url_request/ftp_protocol_handler.h", |
| 178 "url_request/url_request_ftp_job.cc", | 175 "url_request/url_request_ftp_job.cc", |
| 179 "url_request/url_request_ftp_job.h", | 176 "url_request/url_request_ftp_job.h", |
| 180 ] | 177 ] |
| 178 } else { | |
| 179 deps += [ "//third_party/icu" ] | |
| 181 } | 180 } |
| 182 | 181 |
| 183 if (enable_built_in_dns) { | 182 if (enable_built_in_dns) { |
| 184 defines += [ "ENABLE_BUILT_IN_DNS" ] | 183 defines += [ "ENABLE_BUILT_IN_DNS" ] |
| 185 } else { | 184 } else { |
| 186 sources -= [ | 185 sources -= [ |
| 187 "dns/address_sorter_posix.cc", | 186 "dns/address_sorter_posix.cc", |
| 188 "dns/address_sorter_posix.h", | 187 "dns/address_sorter_posix.h", |
| 189 "dns/dns_client.cc", | 188 "dns/dns_client.cc", |
| 190 ] | 189 ] |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 490 sources += [ | 489 sources += [ |
| 491 "base/address_tracker_linux.cc", | 490 "base/address_tracker_linux.cc", |
| 492 "base/address_tracker_linux.h", | 491 "base/address_tracker_linux.h", |
| 493 "base/network_interfaces_linux.cc", | 492 "base/network_interfaces_linux.cc", |
| 494 "base/network_interfaces_linux.h", | 493 "base/network_interfaces_linux.h", |
| 495 "base/platform_mime_util_linux.cc", | 494 "base/platform_mime_util_linux.cc", |
| 496 ] | 495 ] |
| 497 set_sources_assignment_filter(sources_assignment_filter) | 496 set_sources_assignment_filter(sources_assignment_filter) |
| 498 deps += [ ":net_jni_headers" ] | 497 deps += [ ":net_jni_headers" ] |
| 499 } | 498 } |
| 499 } | |
| 500 | 500 |
| 501 if (use_icu_alternatives_on_android) { | 501 component("net") { |
| 502 sources += [ | 502 public_deps = [ |
| 503 ":net_common", | |
| 504 "//url:url", | |
| 505 ] | |
| 506 | |
| 507 deps = [ | |
| 508 "//base", | |
| 509 ] | |
| 510 | |
| 511 # ICU support. | |
| 512 deps += [ | |
| 513 "//base:i18n", | |
| 514 "//third_party/icu", | |
| 515 ] | |
| 516 sources = [ | |
| 517 "base/filename_util.h", | |
|
mmenke
2015/08/19 21:37:27
Don't need the header file, it's included in the c
xunjieli
2015/08/19 22:37:03
Done.
| |
| 518 "base/filename_util_icu.cc", | |
| 519 "base/net_string_util_icu.cc", | |
| 520 "base/net_util_icu.cc", | |
| 521 ] | |
| 522 } | |
| 523 | |
| 524 if (is_android) { | |
| 525 # same as net, but with ICU dependency stripped. | |
| 526 component("net_small") { | |
| 527 defines = [ "USE_ICU_ALTERNATIVES_ON_ANDROID=1" ] | |
| 528 public_deps = [ | |
| 529 ":net_common", | |
| 530 "//url:url_lib_use_icu_alternatives_on_android", | |
| 531 ] | |
| 532 | |
| 533 deps = [ | |
| 534 ":net_jni_headers", | |
| 535 ] | |
| 536 sources = [ | |
| 503 "base/net_string_util_icu_alternatives_android.cc", | 537 "base/net_string_util_icu_alternatives_android.cc", |
| 504 "base/net_string_util_icu_alternatives_android.h", | 538 "base/net_string_util_icu_alternatives_android.h", |
| 505 ] | 539 ] |
| 506 } else { | |
| 507 deps += [ | |
| 508 "//base:i18n", | |
| 509 "//third_party/icu", | |
| 510 ] | |
| 511 sources += [ | |
| 512 "base/filename_util_icu.cc", | |
| 513 "base/net_string_util_icu.cc", | |
| 514 "base/net_util_icu.cc", | |
| 515 ] | |
| 516 } | 540 } |
| 517 } | 541 } |
| 518 | 542 |
| 519 grit("net_resources") { | 543 grit("net_resources") { |
| 520 source = "base/net_resources.grd" | 544 source = "base/net_resources.grd" |
| 521 use_qualified_include = true | 545 use_qualified_include = true |
| 522 outputs = [ | 546 outputs = [ |
| 523 "grit/net_resources.h", | 547 "grit/net_resources.h", |
| 524 "net_resources.pak", | 548 "net_resources.pak", |
| 525 ] | 549 ] |
| 526 } | 550 } |
| 527 | 551 |
| 528 proto_library("net_quic_proto") { | 552 proto_library("net_quic_proto") { |
| 529 visibility = [ "//net" ] # Part of the net component. | 553 visibility = [ ":net_common" ] # Part of net_common. |
| 530 | 554 |
| 531 sources = [ | 555 sources = [ |
| 532 "quic/proto/cached_network_parameters.proto", | 556 "quic/proto/cached_network_parameters.proto", |
| 533 "quic/proto/source_address_token.proto", | 557 "quic/proto/source_address_token.proto", |
| 534 ] | 558 ] |
| 535 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:" | 559 cc_generator_options = "dllexport_decl=NET_EXPORT_PRIVATE:" |
| 536 cc_include = "net/base/net_export.h" | 560 cc_include = "net/base/net_export.h" |
| 537 | 561 |
| 538 defines = [ "NET_IMPLEMENTATION" ] | 562 defines = [ "NET_IMPLEMENTATION" ] |
| 539 | 563 |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1211 | 1235 |
| 1212 if (is_android) { | 1236 if (is_android) { |
| 1213 generate_jni("net_jni_headers") { | 1237 generate_jni("net_jni_headers") { |
| 1214 sources = [ | 1238 sources = [ |
| 1215 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java", | 1239 "android/java/src/org/chromium/net/AndroidCertVerifyResult.java", |
| 1216 "android/java/src/org/chromium/net/AndroidKeyStore.java", | 1240 "android/java/src/org/chromium/net/AndroidKeyStore.java", |
| 1217 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java", | 1241 "android/java/src/org/chromium/net/AndroidNetworkLibrary.java", |
| 1218 "android/java/src/org/chromium/net/AndroidPrivateKey.java", | 1242 "android/java/src/org/chromium/net/AndroidPrivateKey.java", |
| 1219 "android/java/src/org/chromium/net/GURLUtils.java", | 1243 "android/java/src/org/chromium/net/GURLUtils.java", |
| 1220 "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java", | 1244 "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java", |
| 1245 "android/java/src/org/chromium/net/NetStringUtil.java", | |
| 1221 "android/java/src/org/chromium/net/NetworkChangeNotifier.java", | 1246 "android/java/src/org/chromium/net/NetworkChangeNotifier.java", |
| 1222 "android/java/src/org/chromium/net/ProxyChangeListener.java", | 1247 "android/java/src/org/chromium/net/ProxyChangeListener.java", |
| 1223 "android/java/src/org/chromium/net/X509Util.java", | 1248 "android/java/src/org/chromium/net/X509Util.java", |
| 1224 ] | 1249 ] |
| 1225 jni_package = "net" | 1250 jni_package = "net" |
| 1226 } | 1251 } |
| 1227 generate_jni("net_test_jni_headers") { | 1252 generate_jni("net_test_jni_headers") { |
| 1228 sources = [ | 1253 sources = [ |
| 1229 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java", | 1254 "android/javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java", |
| 1230 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator .java", | 1255 "test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator .java", |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1515 ] | 1540 ] |
| 1516 } | 1541 } |
| 1517 | 1542 |
| 1518 if (!enable_built_in_dns) { | 1543 if (!enable_built_in_dns) { |
| 1519 sources -= [ | 1544 sources -= [ |
| 1520 "dns/address_sorter_posix_unittest.cc", | 1545 "dns/address_sorter_posix_unittest.cc", |
| 1521 "dns/address_sorter_unittest.cc", | 1546 "dns/address_sorter_unittest.cc", |
| 1522 ] | 1547 ] |
| 1523 } | 1548 } |
| 1524 | 1549 |
| 1525 # Always need use_v8_in_net to be 1 to run on Android, so just remove | 1550 if (use_v8_in_net) { |
| 1526 # net_unittest's dependency on v8 when using icu alternatives instead of | |
| 1527 # setting use_v8_in_net to 0. | |
| 1528 if (use_v8_in_net && !use_icu_alternatives_on_android) { | |
| 1529 deps += [ ":net_with_v8" ] | 1551 deps += [ ":net_with_v8" ] |
| 1530 } else { | 1552 } else { |
| 1531 sources -= [ | 1553 sources -= [ |
| 1532 "proxy/proxy_resolver_v8_tracing_unittest.cc", | 1554 "proxy/proxy_resolver_v8_tracing_unittest.cc", |
| 1533 "proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc", | 1555 "proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc", |
| 1534 "proxy/proxy_resolver_v8_unittest.cc", | 1556 "proxy/proxy_resolver_v8_unittest.cc", |
| 1535 ] | 1557 ] |
| 1536 } | 1558 } |
| 1537 | 1559 |
| 1538 if (use_v8_in_net && !is_android) { | 1560 if (use_v8_in_net && !is_android) { |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1627 # TODO(mmenke): This depends on test_support_base, which depends on | 1649 # TODO(mmenke): This depends on test_support_base, which depends on |
| 1628 # icu. Figure out a way to remove that dependency. | 1650 # icu. Figure out a way to remove that dependency. |
| 1629 "//testing/android/native_test:native_test_native_code", | 1651 "//testing/android/native_test:native_test_native_code", |
| 1630 ] | 1652 ] |
| 1631 set_sources_assignment_filter([]) | 1653 set_sources_assignment_filter([]) |
| 1632 sources += [ "base/address_tracker_linux_unittest.cc" ] | 1654 sources += [ "base/address_tracker_linux_unittest.cc" ] |
| 1633 set_sources_assignment_filter(sources_assignment_filter) | 1655 set_sources_assignment_filter(sources_assignment_filter) |
| 1634 isolate_file = "net_unittests.isolate" | 1656 isolate_file = "net_unittests.isolate" |
| 1635 } | 1657 } |
| 1636 | 1658 |
| 1637 if (use_icu_alternatives_on_android) { | |
| 1638 sources -= [ | |
| 1639 "base/filename_util_unittest.cc", | |
| 1640 "base/net_util_icu_unittest.cc", | |
| 1641 ] | |
| 1642 deps -= [ "//base:i18n" ] | |
| 1643 } | |
| 1644 | |
| 1645 # Symbols for crashes when running tests on swarming. | 1659 # Symbols for crashes when running tests on swarming. |
| 1646 if (symbol_level > 0) { | 1660 if (symbol_level > 0) { |
| 1647 if (is_win) { | 1661 if (is_win) { |
| 1648 data += [ "$root_out_dir/net_unittests.exe.pdb" ] | 1662 data += [ "$root_out_dir/net_unittests.exe.pdb" ] |
| 1649 } else if (is_mac) { | 1663 } else if (is_mac) { |
| 1650 data += [ "$root_out_dir/net_unittests.dSYM/" ] | 1664 data += [ "$root_out_dir/net_unittests.dSYM/" ] |
| 1651 } | 1665 } |
| 1652 } | 1666 } |
| 1653 } | 1667 } |
| 1654 | 1668 |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 1681 if (enable_websockets) { | 1695 if (enable_websockets) { |
| 1682 sources += [ "websockets/websocket_frame_perftest.cc" ] | 1696 sources += [ "websockets/websocket_frame_perftest.cc" ] |
| 1683 } | 1697 } |
| 1684 | 1698 |
| 1685 if (use_v8_in_net) { | 1699 if (use_v8_in_net) { |
| 1686 deps += [ ":net_with_v8" ] | 1700 deps += [ ":net_with_v8" ] |
| 1687 } else { | 1701 } else { |
| 1688 sources -= [ "proxy/proxy_resolver_perftest.cc" ] | 1702 sources -= [ "proxy/proxy_resolver_perftest.cc" ] |
| 1689 } | 1703 } |
| 1690 } | 1704 } |
| OLD | NEW |