#include "services/network/network_change_manager.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/ranges/algorithm.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "net/base/network_change_notifier.h"
#include "net/base/network_change_notifier_passive.h"
namespace network {
NetworkChangeManager::NetworkChangeManager(
std::unique_ptr<net::NetworkChangeNotifier> network_change_notifier)
: … { … }
NetworkChangeManager::~NetworkChangeManager() { … }
void NetworkChangeManager::AddReceiver(
mojo::PendingReceiver<mojom::NetworkChangeManager> receiver) { … }
void NetworkChangeManager::RequestNotifications(
mojo::PendingRemote<mojom::NetworkChangeManagerClient>
client_pending_remote) { … }
#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
void NetworkChangeManager::OnNetworkChanged(
bool dns_changed,
bool ip_address_changed,
bool connection_type_changed,
mojom::ConnectionType new_connection_type,
bool connection_subtype_changed,
mojom::ConnectionSubtype new_connection_subtype) { … }
#endif
#if BUILDFLAG(IS_LINUX)
void NetworkChangeManager::BindNetworkInterfaceChangeListener(
mojo::PendingAssociatedReceiver<mojom::NetworkInterfaceChangeListener>
listener_receiver) { … }
void NetworkChangeManager::OnNetworkInterfacesChanged(
mojom::NetworkInterfaceChangeParamsPtr change_params) { … }
#endif
size_t NetworkChangeManager::GetNumClientsForTesting() const { … }
void NetworkChangeManager::NotificationPipeBroken(
mojom::NetworkChangeManagerClient* client) { … }
void NetworkChangeManager::OnNetworkChanged(
net::NetworkChangeNotifier::ConnectionType type) { … }
}