Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(390)

Unified Diff: net/net.gyp

Issue 1839803002: Remove net & url small, iOS ICU alternatives, unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code cleaning Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/net.gyp
diff --git a/net/net.gyp b/net/net.gyp
index 1f30e79cc32e34d5004e56361dccc67e88b19ac6..4b9321261d640757edd1a83a4630b31d661c3396 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -106,20 +106,57 @@
# GN version: //net
'target_name': 'net',
'dependencies': [
- '../base/base.gyp:base_i18n',
- '../third_party/brotli/brotli.gyp:brotli',
- '../third_party/icu/icu.gyp:icui18n',
- '../third_party/icu/icu.gyp:icuuc',
- '../third_party/protobuf/protobuf.gyp:protobuf_lite',
'../url/url.gyp:url_lib',
- 'net_quic_proto',
- ],
- 'sources': [
- 'base/filename_util_icu.cc',
- 'base/net_string_util_icu.cc',
- 'filter/brotli_filter.cc',
],
'includes': [ 'net_common.gypi' ],
+
+ 'conditions': [
+ # ICU Alternatives
+ ['use_platform_icu_alternatives == 1', {
+ 'conditions': [
+ ['OS == "android"', {
+ 'sources': [
+ 'base/net_string_util_icu_alternatives_android.cc',
+ 'base/net_string_util_icu_alternatives_android.h',
+ ],
+ }],
+ ['OS == "ios"', {
+ 'sources': [
+ 'base/net_string_util_icu_alternatives_ios.mm',
+ ],
+ }],
+ ],
+ },
+ # 'use_platform_icu_alternatives != 1'
+ {
+ 'sources': [
+ 'base/filename_util_icu.cc',
+ 'base/net_string_util_icu.cc',
+ ],
+ 'dependencies': [
+ '../base/base.gyp:base_i18n',
+ '../third_party/icu/icu.gyp:icui18n',
+ '../third_party/icu/icu.gyp:icuuc',
+ '../third_party/protobuf/protobuf.gyp:protobuf_lite',
+ 'net_quic_proto',
+ ],
+ }],
+ # Brotli support.
+ ['disable_brotli_filter == 1', {
+ 'sources': [
+ 'filter/brotli_filter_disabled.cc',
+ ],
+ },
+ # 'disable_brotli_filter != 1'
+ {
+ 'sources': [
+ 'filter/brotli_filter.cc',
+ ],
+ 'dependencies': [
+ '../third_party/brotli/brotli.gyp:brotli',
+ ],
+ }],
+ ],
},
{
# GN version: //net:net_unittests
@@ -220,7 +257,7 @@
'http/mock_gssapi_library_posix.h',
],
}],
- [ 'use_kerberos==0', {
+ [ 'use_kerberos==0', {
'sources!': [
'http/http_auth_handler_negotiate_unittest.cc',
],
@@ -419,6 +456,39 @@
'../gin/gin.gyp:gin',
]
}],
+ # Unit tests that are not supported by the current ICU alternatives on Android.
+ ['OS == "android" and use_platform_icu_alternatives == 1', {
+ 'sources!': [
+ 'base/filename_util_unittest.cc',
+ 'url_request/url_request_job_unittest.cc',
+ ],
+ }],
+ # Unit tests that are not supported by the current ICU alternatives on iOS.
+ ['OS == "ios" and use_platform_icu_alternatives == 1', {
+ 'sources!': [
+ 'base/filename_util_unittest.cc',
+ 'base/url_util_unittest.cc',
+ 'cert/x509_certificate_unittest.cc',
+ 'socket/ssl_client_socket_pool_unittest.cc',
+ 'http/http_auth_handler_basic_unittest.cc',
+ 'http/http_auth_handler_digest_unittest.cc',
+ 'http/http_auth_handler_factory_unittest.cc',
+ 'http/http_auth_unittest.cc',
+ 'http/http_content_disposition_unittest.cc',
+ 'http/http_network_transaction_unittest.cc',
+ 'http/http_proxy_client_socket_pool_unittest.cc',
+ 'spdy/spdy_network_transaction_unittest.cc',
+ 'spdy/spdy_proxy_client_socket_unittest.cc',
+ 'url_request/url_request_job_unittest.cc',
+ 'url_request/url_request_unittest.cc',
+ ],
+ }],
+ # Exclude brotli test if the support for brotli is disabled.
+ ['disable_brotli_filter == 1', {
+ 'sources!': [
+ 'filter/brotli_filter_unittest.cc',
+ ],
+ }],
],
'target_conditions': [
# These source files are excluded by default platform rules, but they
@@ -858,6 +928,17 @@
'base/stale_while_revalidate_experiment_domains.h',
],
},
+ {
+ # GN version: //net:features
+ 'target_name': 'net_features',
+ 'includes': [ '../build/buildflag_header.gypi' ],
+ 'variables': {
+ 'buildflag_header_path': 'net/features.h',
+ 'buildflag_flags': [
+ 'USE_PLATFORM_ICU_ALTERNATIVES=<(use_platform_icu_alternatives)',
+ ],
+ },
+ }
],
'conditions': [
['use_v8_in_net == 1', {
@@ -1334,29 +1415,6 @@
}],
['OS=="android"', {
'targets': [
- { # The same target as 'net', but with smaller binary size due to
- # exclusion of ICU, FTP, FILE and WebSockets support.
- 'target_name': 'net_small',
- 'variables': {
- 'disable_ftp_support': 1,
- 'disable_file_support': 1,
- 'enable_websockets': 0,
- },
- 'dependencies': [
- '../url/url.gyp:url_lib_use_icu_alternatives_on_android',
- ],
- 'defines': [
- 'USE_ICU_ALTERNATIVES_ON_ANDROID=1',
- 'DISABLE_FILE_SUPPORT=1',
- 'DISABLE_FTP_SUPPORT=1',
- ],
- 'sources': [
- 'filter/brotli_filter_disabled.cc',
- 'base/net_string_util_icu_alternatives_android.cc',
- 'base/net_string_util_icu_alternatives_android.h',
- ],
- 'includes': [ 'net_common.gypi' ],
- },
{
'target_name': 'net_jni_headers',
'type': 'none',

Powered by Google App Engine
This is Rietveld 408576698