Commit 3c482e1e authored by Trent Begin's avatar Trent Begin Committed by Commit Bot

network_diagnostics: move mojom to chromeos/services/network_health

This change moves the mojom file to chromeos/services/network_health to
be inline with the network_health.mojom file. It also creates an
intstance of network_diagnostics_impl in the network_health_singleton.

Bug: chromium:1098405
Change-Id: I48bde033494fefc2ac1769421711cc401ef4527c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2261184Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Trent Begin <tbegin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782159}
parent 9a21303f
......@@ -61,7 +61,6 @@ source_set("chromeos") {
":user_activity_event_proto",
":user_charging_event_proto",
"crostini:crostini_installer_types_mojom",
"net/network_diagnostics:network_diagnostics_mojom",
"//apps",
"//ash",
"//ash/public/cpp",
......
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//mojo/public/tools/bindings/mojom.gni")
mojom("network_diagnostics_mojom") {
sources = [ "network_diagnostics.mojom" ]
deps = [ "//mojo/public/mojom/base" ]
}
......@@ -7,7 +7,6 @@
#include <utility>
#include "base/bind.h"
#include "chrome/browser/chromeos/net/network_diagnostics/network_diagnostics.mojom.h"
#include "chromeos/services/network_config/in_process_instance.h"
#include "chromeos/services/network_config/public/cpp/cros_network_config_util.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
......
......@@ -6,7 +6,7 @@
#define CHROME_BROWSER_CHROMEOS_NET_NETWORK_DIAGNOSTICS_NETWORK_DIAGNOSTICS_IMPL_H_
#include "base/memory/weak_ptr.h"
#include "chrome/browser/chromeos/net/network_diagnostics/network_diagnostics.mojom.h"
#include "chromeos/services/network_health/public/mojom/network_diagnostics.mojom.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
......
......@@ -9,7 +9,7 @@
#include <utility>
#include "base/bind.h"
#include "chrome/browser/chromeos/net/network_diagnostics/network_diagnostics.mojom.h"
#include "chromeos/services/network_health/public/mojom/network_diagnostics.mojom.h"
namespace chromeos {
namespace network_diagnostics {
......
......@@ -6,9 +6,6 @@
#include "base/no_destructor.h"
#include "chrome/browser/chromeos/net/network_health/network_health.h"
#include "chromeos/services/network_config/public/mojom/cros_network_config.mojom.h"
namespace chromeos {
namespace network_health {
......@@ -19,6 +16,12 @@ void NetworkHealthService::BindRemote(
network_health_.BindRemote(std::move(receiver));
}
void NetworkHealthService::BindDiagnosticsRemote(
mojo::PendingReceiver<
network_diagnostics::mojom::NetworkDiagnosticsRoutines> receiver) {
network_diagnostics_.BindReceiver(std::move(receiver));
}
NetworkHealthService* NetworkHealthService::GetInstance() {
static base::NoDestructor<NetworkHealthService> instance;
return instance.get();
......
......@@ -5,8 +5,8 @@
#ifndef CHROME_BROWSER_CHROMEOS_NET_NETWORK_HEALTH_NETWORK_HEALTH_SERVICE_H_
#define CHROME_BROWSER_CHROMEOS_NET_NETWORK_HEALTH_NETWORK_HEALTH_SERVICE_H_
#include "chrome/browser/chromeos/net/network_diagnostics/network_diagnostics_impl.h"
#include "chrome/browser/chromeos/net/network_health/network_health.h"
#include "chromeos/services/network_config/public/mojom/cros_network_config.mojom.h"
namespace chromeos {
namespace network_health {
......@@ -19,9 +19,13 @@ class NetworkHealthService {
~NetworkHealthService() = delete;
void BindRemote(mojo::PendingReceiver<mojom::NetworkHealthService> receiver);
void BindDiagnosticsRemote(
mojo::PendingReceiver<
network_diagnostics::mojom::NetworkDiagnosticsRoutines> receiver);
private:
NetworkHealth network_health_;
network_diagnostics::NetworkDiagnosticsImpl network_diagnostics_;
};
} // namespace network_health
......
......@@ -10,4 +10,14 @@
use_base_dir="false"
type="BINDATA"
compress="gzip" />
<include name="IDR_NETWORK_DIAGNOSTICS_MOJOM_HTML"
file="${mojom_root}/chromeos/services/network_health/public/mojom/network_diagnostics.mojom.html"
use_base_dir="false"
type="BINDATA"
compress="gzip" />
<include name="IDR_NETWORK_DIAGNOSTICS_MOJOM_LITE_JS"
file="${mojom_root}/chromeos/services/network_health/public/mojom/network_diagnostics.mojom-lite.js"
use_base_dir="false"
type="BINDATA"
compress="gzip" />
</grit-part>
stevenjb@chromium.org
tbegin@chromium.org
khegde@chromium.org
......@@ -5,7 +5,10 @@
import("//mojo/public/tools/bindings/mojom.gni")
mojom("mojom") {
sources = [ "network_health.mojom" ]
sources = [
"network_diagnostics.mojom",
"network_health.mojom",
]
public_deps = [
"//chromeos/services/network_config/public/mojom:network_types",
......
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