#include "services/network/public/cpp/network_connection_tracker.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/notreached.h"
#include "base/observer_list.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/task_runner.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/network/public/mojom/network_change_manager.mojom.h"
#include "services/network/public/mojom/network_service.mojom.h"
namespace network {
namespace {
void OnGetConnectionType(
scoped_refptr<base::TaskRunner> task_runner,
NetworkConnectionTracker::ConnectionTypeCallback user_callback,
network::mojom::ConnectionType connection_type) { … }
static const int32_t kConnectionTypeInvalid = …;
}
NetworkConnectionTracker::NetworkConnectionTracker(BindingCallback callback)
: … { … }
NetworkConnectionTracker::~NetworkConnectionTracker() { … }
bool NetworkConnectionTracker::GetConnectionType(
network::mojom::ConnectionType* const type,
ConnectionTypeCallback callback) { … }
bool NetworkConnectionTracker::IsOffline() const { … }
bool NetworkConnectionTracker::IsConnectionCellular(
const network::mojom::ConnectionType type) { … }
void NetworkConnectionTracker::AddNetworkConnectionObserver(
NetworkConnectionObserver* observer) { … }
void NetworkConnectionTracker::AddLeakyNetworkConnectionObserver(
NetworkConnectionObserver* observer) { … }
void NetworkConnectionTracker::RemoveNetworkConnectionObserver(
NetworkConnectionObserver* observer) { … }
NetworkConnectionTracker::NetworkConnectionTracker()
: … { … }
void NetworkConnectionTracker::OnInitialConnectionType(
network::mojom::ConnectionType type) { … }
void NetworkConnectionTracker::OnNetworkChanged(
network::mojom::ConnectionType type) { … }
void NetworkConnectionTracker::Initialize() { … }
void NetworkConnectionTracker::HandleNetworkServicePipeBroken() { … }
}