Commit 21dea15b authored by Sergey Ulanov's avatar Sergey Ulanov Committed by Commit Bot

Disable UnixDomain[Client|Server]Socket on Fuchsia.

Previously the classes for Unix domain sockets were compiled on all
POSIX platforms, except NaCl, but the tests were disabled on iOS and
filtered on Fuchsia. This change disabled compilation of these classes
and unittests on all platforms on which they are not supported (iOS,
Fuchsia and NaCl).

Bug: 731302
Change-Id: I1da281845fd282d0f791cc4a324ef3d233f8a598
Reviewed-on: https://chromium-review.googlesource.com/664157
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: default avatarEric Roman <eroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501490}
parent 4e1bce74
...@@ -38,6 +38,9 @@ use_v8_in_net = !is_ios && !is_proto_quic ...@@ -38,6 +38,9 @@ use_v8_in_net = !is_ios && !is_proto_quic
enable_built_in_dns = !is_ios && !is_proto_quic enable_built_in_dns = !is_ios && !is_proto_quic
enable_net_mojo = !is_ios && !is_proto_quic enable_net_mojo = !is_ios && !is_proto_quic
# Unix sockets are not supported on iOS, Fuchsia or NaCl.
enable_unix_sockets = is_posix && !is_ios && !is_fuchsia && !is_nacl
# True if certificates are represented with DER byte buffers. This can be true # True if certificates are represented with DER byte buffers. This can be true
# in addition to use_nss_certs, in that case byte certs are used internally but # in addition to use_nss_certs, in that case byte certs are used internally but
# NSS is used for certificate verification. # NSS is used for certificate verification.
...@@ -1520,10 +1523,6 @@ component("net") { ...@@ -1520,10 +1523,6 @@ component("net") {
"socket/udp_socket_posix.h", "socket/udp_socket_posix.h",
"socket/udp_socket_win.cc", "socket/udp_socket_win.cc",
"socket/udp_socket_win.h", "socket/udp_socket_win.h",
"socket/unix_domain_client_socket_posix.cc",
"socket/unix_domain_client_socket_posix.h",
"socket/unix_domain_server_socket_posix.cc",
"socket/unix_domain_server_socket_posix.h",
"socket/websocket_endpoint_lock_manager.cc", "socket/websocket_endpoint_lock_manager.cc",
"socket/websocket_endpoint_lock_manager.h", "socket/websocket_endpoint_lock_manager.h",
"socket/websocket_transport_client_socket_pool.cc", "socket/websocket_transport_client_socket_pool.cc",
...@@ -1985,6 +1984,15 @@ component("net") { ...@@ -1985,6 +1984,15 @@ component("net") {
public_deps += [ "//native_client_sdk/src/libraries/nacl_io" ] public_deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
} }
if (enable_unix_sockets) {
sources += [
"socket/unix_domain_client_socket_posix.cc",
"socket/unix_domain_client_socket_posix.h",
"socket/unix_domain_server_socket_posix.cc",
"socket/unix_domain_server_socket_posix.h",
]
}
# Add back some sources that were otherwise filtered out. # Add back some sources that were otherwise filtered out.
set_sources_assignment_filter([]) set_sources_assignment_filter([])
sources += net_unfiltered_sources sources += net_unfiltered_sources
...@@ -5084,8 +5092,6 @@ test("net_unittests") { ...@@ -5084,8 +5092,6 @@ test("net_unittests") {
"socket/transport_client_socket_pool_unittest.cc", "socket/transport_client_socket_pool_unittest.cc",
"socket/transport_client_socket_unittest.cc", "socket/transport_client_socket_unittest.cc",
"socket/udp_socket_unittest.cc", "socket/udp_socket_unittest.cc",
"socket/unix_domain_client_socket_posix_unittest.cc",
"socket/unix_domain_server_socket_posix_unittest.cc",
"socket/websocket_endpoint_lock_manager_unittest.cc", "socket/websocket_endpoint_lock_manager_unittest.cc",
"socket/websocket_transport_client_socket_pool_unittest.cc", "socket/websocket_transport_client_socket_pool_unittest.cc",
"spdy/chromium/bidirectional_stream_spdy_impl_unittest.cc", "spdy/chromium/bidirectional_stream_spdy_impl_unittest.cc",
...@@ -5506,18 +5512,19 @@ test("net_unittests") { ...@@ -5506,18 +5512,19 @@ test("net_unittests") {
# Needs GetAppOutput(). # Needs GetAppOutput().
"test/python_utils_unittest.cc", "test/python_utils_unittest.cc",
# The following tests are disabled because they don't apply to
# iOS.
# OS is not "linux" or "freebsd" or "openbsd".
"socket/unix_domain_client_socket_posix_unittest.cc",
"socket/unix_domain_server_socket_posix_unittest.cc",
] ]
net_unfiltered_sources += [ "cert/x509_util_ios_and_mac_unittest.cc" ] net_unfiltered_sources += [ "cert/x509_util_ios_and_mac_unittest.cc" ]
bundle_deps = [ ":net_unittests_bundle_data" ] bundle_deps = [ ":net_unittests_bundle_data" ]
} }
if (enable_unix_sockets) {
sources += [
"socket/unix_domain_client_socket_posix_unittest.cc",
"socket/unix_domain_server_socket_posix_unittest.cc",
]
}
# Use getifaddrs() on POSIX platforms, except Linux and Android. # Use getifaddrs() on POSIX platforms, except Linux and Android.
if (!is_posix || is_linux || is_android) { if (!is_posix || is_linux || is_android) {
sources -= [ "base/network_interfaces_getifaddrs_unittest.cc" ] sources -= [ "base/network_interfaces_getifaddrs_unittest.cc" ]
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
-ProxyScriptFetcherImplTest.Priority -ProxyScriptFetcherImplTest.Priority
-PythonUtils* -PythonUtils*
-UDPSocketTest.PartialRecv -UDPSocketTest.PartialRecv
-UnixDomain*Socket*
-URLRequest*FTP* -URLRequest*FTP*
-URLRequestQuic* -URLRequestQuic*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment