Chromium Code Reviews| Index: net/BUILD.gn |
| diff --git a/net/BUILD.gn b/net/BUILD.gn |
| index 7f84201f66f9968830f78320ccf3238c6ddc96c2..ad2275e11c7b305034b2ed61ec2d6de86eb6a7b3 100644 |
| --- a/net/BUILD.gn |
| +++ b/net/BUILD.gn |
| @@ -6,7 +6,6 @@ import("//build/config/crypto.gni") |
| import("//build/config/features.gni") |
| import("//build/config/ui.gni") |
| import("//build/module_args/v8.gni") |
| -import("//url/config.gni") |
| import("//testing/test.gni") |
| import("//third_party/icu/config.gni") |
| import("//third_party/protobuf/proto_library.gni") |
| @@ -63,7 +62,7 @@ config("net_config") { |
| } |
| } |
| -component("net") { |
| +source_set("net_common") { |
| sources = |
| gypi_values.net_nacl_common_sources + gypi_values.net_non_nacl_sources |
| @@ -91,7 +90,6 @@ component("net") { |
| ":net_quic_proto", |
| "//crypto", |
| "//crypto:platform", |
| - "//url", |
| ] |
| deps = [ |
| ":net_resources", |
| @@ -102,7 +100,6 @@ component("net") { |
| "//sdch", |
| "//third_party/protobuf:protobuf_lite", |
| "//third_party/zlib", |
| - "//url", |
| ] |
| if (use_kerberos) { |
| @@ -178,6 +175,8 @@ component("net") { |
| "url_request/url_request_ftp_job.cc", |
| "url_request/url_request_ftp_job.h", |
| ] |
| + } else { |
| + deps += [ "//third_party/icu" ] |
| } |
| if (enable_built_in_dns) { |
| @@ -497,21 +496,46 @@ component("net") { |
| set_sources_assignment_filter(sources_assignment_filter) |
| deps += [ ":net_jni_headers" ] |
| } |
| +} |
| - if (use_icu_alternatives_on_android) { |
| - sources += [ |
| - "base/net_string_util_icu_alternatives_android.cc", |
| - "base/net_string_util_icu_alternatives_android.h", |
| +component("net") { |
| + public_deps = [ |
| + ":net_common", |
| + "//url:url", |
| + ] |
| + |
| + deps = [ |
| + "//base", |
| + ] |
| + |
| + # ICU support. |
| + deps += [ |
| + "//base:i18n", |
| + "//third_party/icu", |
| + ] |
| + sources = [ |
| + "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.
|
| + "base/filename_util_icu.cc", |
| + "base/net_string_util_icu.cc", |
| + "base/net_util_icu.cc", |
| + ] |
| +} |
| + |
| +if (is_android) { |
| + # same as net, but with ICU dependency stripped. |
| + component("net_small") { |
| + defines = [ "USE_ICU_ALTERNATIVES_ON_ANDROID=1" ] |
| + public_deps = [ |
| + ":net_common", |
| + "//url:url_lib_use_icu_alternatives_on_android", |
| ] |
| - } else { |
| - deps += [ |
| - "//base:i18n", |
| - "//third_party/icu", |
| + |
| + deps = [ |
| + ":net_jni_headers", |
| ] |
| - sources += [ |
| - "base/filename_util_icu.cc", |
| - "base/net_string_util_icu.cc", |
| - "base/net_util_icu.cc", |
| + sources = [ |
| + "base/net_string_util_icu_alternatives_android.cc", |
| + "base/net_string_util_icu_alternatives_android.h", |
| ] |
| } |
| } |
| @@ -526,7 +550,7 @@ grit("net_resources") { |
| } |
| proto_library("net_quic_proto") { |
| - visibility = [ "//net" ] # Part of the net component. |
| + visibility = [ ":net_common" ] # Part of net_common. |
| sources = [ |
| "quic/proto/cached_network_parameters.proto", |
| @@ -1218,6 +1242,7 @@ if (is_android) { |
| "android/java/src/org/chromium/net/AndroidPrivateKey.java", |
| "android/java/src/org/chromium/net/GURLUtils.java", |
| "android/java/src/org/chromium/net/HttpNegotiateAuthenticator.java", |
| + "android/java/src/org/chromium/net/NetStringUtil.java", |
| "android/java/src/org/chromium/net/NetworkChangeNotifier.java", |
| "android/java/src/org/chromium/net/ProxyChangeListener.java", |
| "android/java/src/org/chromium/net/X509Util.java", |
| @@ -1522,10 +1547,7 @@ test("net_unittests") { |
| ] |
| } |
| - # Always need use_v8_in_net to be 1 to run on Android, so just remove |
| - # net_unittest's dependency on v8 when using icu alternatives instead of |
| - # setting use_v8_in_net to 0. |
| - if (use_v8_in_net && !use_icu_alternatives_on_android) { |
| + if (use_v8_in_net) { |
| deps += [ ":net_with_v8" ] |
| } else { |
| sources -= [ |
| @@ -1634,14 +1656,6 @@ test("net_unittests") { |
| isolate_file = "net_unittests.isolate" |
| } |
| - if (use_icu_alternatives_on_android) { |
| - sources -= [ |
| - "base/filename_util_unittest.cc", |
| - "base/net_util_icu_unittest.cc", |
| - ] |
| - deps -= [ "//base:i18n" ] |
| - } |
| - |
| # Symbols for crashes when running tests on swarming. |
| if (symbol_level > 0) { |
| if (is_win) { |