From 6994c48e7cd5b1cab1c76b1fea1b5f67afc45e4d Mon Sep 17 00:00:00 2001 From: Sergey Ulanov Date: Sat, 2 Jun 2018 07:05:42 +0000 Subject: [PATCH] Roll Fuchsia SDK from 398c4ca33f to dcd092a967 netstack interfaces were moved to the fuchsia namespace, so automatic roll would fail. Updated BUILD.gn for the SDK and all dependencies under //net TBR=eroman@chromium.org Change-Id: Ia0eb530ea4ec64100e579b6bca328ee4c68c474c Reviewed-on: https://chromium-review.googlesource.com/1083884 Commit-Queue: Sergey Ulanov Reviewed-by: Kevin Marshall Cr-Commit-Position: refs/heads/master@{#563934} --- build/fuchsia/sdk.sha1 | 2 +- net/base/network_interfaces_fuchsia.cc | 16 ++++++++-------- third_party/fuchsia-sdk/BUILD.gn | 3 +++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/build/fuchsia/sdk.sha1 b/build/fuchsia/sdk.sha1 index edaf712c52246b..9a24dac5a20e6f 100644 --- a/build/fuchsia/sdk.sha1 +++ b/build/fuchsia/sdk.sha1 @@ -1 +1 @@ -da9c6cf50659326df8c39d1f53ab7d2b1eab2df6 \ No newline at end of file +dcd092a967d3bc8e2e233063ce2e439bbb9ec5a6 \ No newline at end of file diff --git a/net/base/network_interfaces_fuchsia.cc b/net/base/network_interfaces_fuchsia.cc index 4c4c20b1a594fa..1c03e9685974b8 100644 --- a/net/base/network_interfaces_fuchsia.cc +++ b/net/base/network_interfaces_fuchsia.cc @@ -4,14 +4,14 @@ #include "net/base/network_interfaces.h" -#include +#include #include "base/fuchsia/component_context.h" #include "net/base/ip_endpoint.h" namespace net { -IPAddress NetAddressToIPAddress(const netstack::NetAddress& addr) { +IPAddress NetAddressToIPAddress(const fuchsia::netstack::NetAddress& addr) { if (addr.ipv4) { return IPAddress(addr.ipv4->addr.data(), addr.ipv4->addr.count()); } @@ -22,25 +22,25 @@ IPAddress NetAddressToIPAddress(const netstack::NetAddress& addr) { } bool GetNetworkList(NetworkInterfaceList* networks, int policy) { - netstack::NetstackSyncPtr netstack = + fuchsia::netstack::NetstackSyncPtr netstack = base::fuchsia::ComponentContext::GetDefault() - ->ConnectToServiceSync(); + ->ConnectToServiceSync(); - fidl::VectorPtr interfaces; + fidl::VectorPtr interfaces; if (!netstack->GetInterfaces(&interfaces)) return false; for (auto& interface : interfaces.get()) { // Check if the interface is up. - if (!(interface.flags & netstack::NetInterfaceFlagUp)) + if (!(interface.flags & fuchsia::netstack::NetInterfaceFlagUp)) continue; // Skip loopback. - if (interface.features & netstack::interfaceFeatureLoopback) + if (interface.features & fuchsia::netstack::interfaceFeatureLoopback) continue; NetworkChangeNotifier::ConnectionType connection_type = - (interface.features & netstack::interfaceFeatureWlan) + (interface.features & fuchsia::netstack::interfaceFeatureWlan) ? NetworkChangeNotifier::CONNECTION_WIFI : NetworkChangeNotifier::CONNECTION_UNKNOWN; diff --git a/third_party/fuchsia-sdk/BUILD.gn b/third_party/fuchsia-sdk/BUILD.gn index 2ad624f8f96961..009421756c9aa5 100644 --- a/third_party/fuchsia-sdk/BUILD.gn +++ b/third_party/fuchsia-sdk/BUILD.gn @@ -250,6 +250,9 @@ fuchsia_sdk_fidl_pkg("mem") { } fuchsia_sdk_fidl_pkg("netstack") { + namespace = "fuchsia" + namespace_path = "fuchsia" + sources = [ "net_address.fidl", "netstack.fidl",