Skip to content

Commit

Permalink
Revert "[fuchsia] Migrate to fuchsia.net.interfaces/State"
Browse files Browse the repository at this point in the history
This reverts commit 022c5b0.

Retained fuchsia/http/OWNERS from the original CL as it is required
for a chromium_presubmit security check.

Reason for revert: This CL breaks out-of-tree WebEngine clients
(http://fxbug.dev/64893).

Original change's description:
> [fuchsia] Migrate to fuchsia.net.interfaces/State
>
> Fixed: fuchsia:21155
> Change-Id: I85b388be33d4c9697ba866cf11a143493b2b3239
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2380329
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Reviewed-by: Adam Langley <agl@chromium.org>
> Reviewed-by: Sergey Volk <servolk@chromium.org>
> Reviewed-by: Wez <wez@chromium.org>
> Commit-Queue: Marina Ciocea <marinaciocea@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#828229}

TBR=wez@chromium.org,agl@chromium.org,servolk@chromium.org,rsesek@chromium.org,marinaciocea@chromium.org,tamird@google.com,brunodalbo@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I0c6bc348a06200713411c924e4a788b16b8566ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2551536
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Commit-Queue: David Dorwin <ddorwin@chromium.org>
Commit-Queue: Stephen Roe <steveroe@google.com>
Cr-Commit-Position: refs/heads/master@{#829513}
  • Loading branch information
Stephen Roe authored and Commit Bot committed Nov 20, 2020
1 parent f8d36fd commit b9b9702
Show file tree
Hide file tree
Showing 20 changed files with 502 additions and 719 deletions.
10 changes: 5 additions & 5 deletions build/config/fuchsia/tests-with-exec.cmx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"sandbox": {
"dev": [
"null",
"zero"
],
"features": [
"deprecated-ambient-replace-as-executable",
"isolated-cache-storage",
Expand All @@ -12,6 +8,10 @@
"root-ssl-certificates",
"vulkan"
],
"dev": [
"null",
"zero"
],
"services": [
"fuchsia.accessibility.semantics.SemanticsManager",
"fuchsia.camera3.DeviceWatcher",
Expand All @@ -26,7 +26,7 @@
"fuchsia.mediacodec.CodecFactory",
"fuchsia.memorypressure.Provider",
"fuchsia.net.NameLookup",
"fuchsia.net.interfaces.State",
"fuchsia.netstack.Netstack",
"fuchsia.posix.socket.Provider",
"fuchsia.process.Launcher",
"fuchsia.sys.Environment",
Expand Down
10 changes: 5 additions & 5 deletions build/config/fuchsia/tests.cmx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"sandbox": {
"dev": [
"null",
"zero"
],
"features": [
"config-data",
"isolated-cache-storage",
Expand All @@ -12,6 +8,10 @@
"root-ssl-certificates",
"vulkan"
],
"dev": [
"null",
"zero"
],
"services": [
"fuchsia.accessibility.semantics.SemanticsManager",
"fuchsia.camera3.DeviceWatcher",
Expand All @@ -26,7 +26,7 @@
"fuchsia.mediacodec.CodecFactory",
"fuchsia.memorypressure.Provider",
"fuchsia.net.NameLookup",
"fuchsia.net.interfaces.State",
"fuchsia.netstack.Netstack",
"fuchsia.posix.socket.Provider",
"fuchsia.process.Launcher",
"fuchsia.sys.Environment",
Expand Down
9 changes: 7 additions & 2 deletions chromecast/net/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ cast_source_set("net") {
"network_change_notifier_factory_fuchsia.h",
]

deps += [ "//chromecast/base:chromecast_switches" ]
deps += [
"//chromecast/base:chromecast_switches",
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.hardware.ethernet",
]
}
}

Expand All @@ -48,7 +51,9 @@ cast_source_set("time_sync_tracker") {
"time_sync_tracker.cc",
"time_sync_tracker.h",
]
deps = [ "//base" ]
deps = [
"//base",
]

if (is_fuchsia) {
sources += [
Expand Down
8 changes: 6 additions & 2 deletions chromecast/net/network_change_notifier_factory_fuchsia.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "chromecast/net/network_change_notifier_factory_fuchsia.h"

#include <fuchsia/hardware/ethernet/cpp/fidl.h>

#include "base/command_line.h"
#include "chromecast/base/chromecast_switches.h"
#include "net/base/network_change_notifier_fuchsia.h"
Expand All @@ -12,10 +14,12 @@ namespace chromecast {

std::unique_ptr<net::NetworkChangeNotifier>
NetworkChangeNotifierFactoryFuchsia::CreateInstance() {
auto require_wlan = GetSwitchValueBoolean(switches::kRequireWlan, false);
auto required_features = GetSwitchValueBoolean(switches::kRequireWlan, false)
? fuchsia::hardware::ethernet::Features::WLAN
: fuchsia::hardware::ethernet::Features();

// Caller assumes ownership.
return std::make_unique<net::NetworkChangeNotifierFuchsia>(require_wlan);
return std::make_unique<net::NetworkChangeNotifierFuchsia>(required_features);
}

NetworkChangeNotifierFactoryFuchsia::NetworkChangeNotifierFactoryFuchsia() =
Expand Down
4 changes: 2 additions & 2 deletions content/shell/fuchsia/content_shell.cmx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"fuchsia.mediacodec.CodecFactory",
"fuchsia.memorypressure.Provider",
"fuchsia.net.NameLookup",
"fuchsia.net.interfaces.State",
"fuchsia.netstack.Netstack",
"fuchsia.posix.socket.Provider",
"fuchsia.process.Launcher",
"fuchsia.sys.Launcher",
Expand All @@ -31,4 +31,4 @@
"fuchsia.vulkan.loader.Loader"
]
}
}
}
6 changes: 3 additions & 3 deletions fuchsia/engine/test/web_engine_shell.cmx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"sandbox": {
"features": [
"deprecated-ambient-replace-as-executable",
"isolated-persistent-storage"
"isolated-persistent-storage",
"deprecated-ambient-replace-as-executable"
],
"services": [
"fuchsia.accessibility.semantics.SemanticsManager",
Expand All @@ -17,7 +17,7 @@
"fuchsia.mediacodec.CodecFactory",
"fuchsia.memorypressure.Provider",
"fuchsia.net.NameLookup",
"fuchsia.net.interfaces.State",
"fuchsia.netstack.Netstack",
"fuchsia.posix.socket.Provider",
"fuchsia.process.Launcher",
"fuchsia.sys.Launcher",
Expand Down
2 changes: 1 addition & 1 deletion fuchsia/engine/web_engine_integration_tests.cmx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"fuchsia.media.SessionAudioConsumerFactory",
"fuchsia.memorypressure.Provider",
"fuchsia.net.NameLookup",
"fuchsia.net.interfaces.State",
"fuchsia.netstack.Netstack",
"fuchsia.posix.socket.Provider",
"fuchsia.process.Launcher",
"fuchsia.sys.Launcher",
Expand Down
6 changes: 3 additions & 3 deletions fuchsia/http/http.cmx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"sandbox": {
"features": [
"deprecated-ambient-replace-as-executable",
"root-ssl-certificates"
"root-ssl-certificates",
"deprecated-ambient-replace-as-executable"
],
"services": [
"fuchsia.device.NameProvider",
"fuchsia.intl.PropertyProvider",
"fuchsia.logger.LogSink",
"fuchsia.net.NameLookup",
"fuchsia.net.interfaces.State",
"fuchsia.netstack.Netstack",
"fuchsia.posix.socket.Provider"
]
}
Expand Down
2 changes: 1 addition & 1 deletion fuchsia/runners/cast/cast_runner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static constexpr const char* kServices[] = {
"fuchsia.mediacodec.CodecFactory",
"fuchsia.memorypressure.Provider",
"fuchsia.net.NameLookup",
"fuchsia.net.interfaces.State",
"fuchsia.netstack.Netstack",
"fuchsia.posix.socket.Provider",
"fuchsia.process.Launcher",
"fuchsia.settings.Display",
Expand Down
2 changes: 1 addition & 1 deletion fuchsia/runners/cast/cast_runner.cmx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"fuchsia.mediacodec.CodecFactory",
"fuchsia.memorypressure.Provider",
"fuchsia.net.NameLookup",
"fuchsia.net.interfaces.State",
"fuchsia.netstack.Netstack",
"fuchsia.posix.socket.Provider",
"fuchsia.process.Launcher",
"fuchsia.settings.Display",
Expand Down
4 changes: 2 additions & 2 deletions fuchsia/runners/web/web_runner.cmx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
],
"services": [
"fuchsia.accessibility.semantics.SemanticsManager",
"fuchsia.camera3.DeviceWatcher",
"fuchsia.device.NameProvider",
"fuchsia.camera3.DeviceWatcher",
"fuchsia.fonts.Provider",
"fuchsia.intl.PropertyProvider",
"fuchsia.logger.LogSink",
Expand All @@ -16,7 +16,7 @@
"fuchsia.mediacodec.CodecFactory",
"fuchsia.memorypressure.Provider",
"fuchsia.net.NameLookup",
"fuchsia.net.interfaces.State",
"fuchsia.netstack.Netstack",
"fuchsia.posix.socket.Provider",
"fuchsia.process.Launcher",
"fuchsia.sysmem.Allocator",
Expand Down
9 changes: 4 additions & 5 deletions net/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -1458,8 +1458,7 @@ component("net") {

if (is_fuchsia) {
deps += [ "//third_party/fuchsia-sdk/sdk/pkg/async-loop-cpp" ]
public_deps +=
[ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.net.interfaces" ]
public_deps += [ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.netstack" ]
sources += [
"base/network_change_notifier_fuchsia.cc",
"base/network_change_notifier_fuchsia.h",
Expand Down Expand Up @@ -1711,8 +1710,8 @@ source_set("net_deps") {

if (is_fuchsia) {
public_deps += [
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.hardware.network",
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.net.interfaces",
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.hardware.ethernet",
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.netstack",
"//third_party/fuchsia-sdk/sdk/pkg/sys_cpp",
]
}
Expand Down Expand Up @@ -4630,7 +4629,7 @@ test("net_unittests") {
if (is_fuchsia) {
use_test_server = true
deps += [
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.net.interfaces",
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.netstack",
"//third_party/fuchsia-sdk/sdk/pkg/fidl_cpp",
]
sources += [ "base/network_change_notifier_fuchsia_unittest.cc" ]
Expand Down
2 changes: 1 addition & 1 deletion net/base/network_change_notifier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ std::unique_ptr<NetworkChangeNotifier> NetworkChangeNotifier::CreateIfNeeded(
return std::make_unique<NetworkChangeNotifierMac>();
#elif defined(OS_FUCHSIA)
return std::make_unique<NetworkChangeNotifierFuchsia>(
/*require_wlan=*/false);
fuchsia::hardware::ethernet::Features());
#else
NOTIMPLEMENTED();
return NULL;
Expand Down
Loading

0 comments on commit b9b9702

Please sign in to comment.