chromium/services/network/network_quality_estimator_manager.h

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SERVICES_NETWORK_NETWORK_QUALITY_ESTIMATOR_MANAGER_H_
#define SERVICES_NETWORK_NETWORK_QUALITY_ESTIMATOR_MANAGER_H_

#include <memory>

#include "base/component_export.h"
#include "base/sequence_checker.h"
#include "base/time/time.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "mojo/public/cpp/bindings/remote_set.h"
#include "net/nqe/effective_connection_type.h"
#include "net/nqe/effective_connection_type_observer.h"
#include "net/nqe/rtt_throughput_estimates_observer.h"
#include "services/network/public/mojom/network_quality_estimator_manager.mojom.h"

namespace net {
class NetworkQualityEstimator;
class NetLog;
}  // namespace net

namespace network {

// Implementation of mojom::NetworkQualityEstimatorManager. All accesses to this
// class are done through mojo on the main thread. This registers itself to
// receive broadcasts from net::EffectiveConnectionTypeObserver and
// net::RTTAndThroughputEstimatesObserver. NetworkQualityEstimatorManager then
// rebroadcasts the notifications to
// mojom::NetworkQualityEstimatorManagerClients through mojo pipes.
class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkQualityEstimatorManager
    : public mojom::NetworkQualityEstimatorManager,
      public net::EffectiveConnectionTypeObserver,
      public net::RTTAndThroughputEstimatesObserver {};

}  // namespace network

#endif  // SERVICES_NETWORK_NETWORK_QUALITY_ESTIMATOR_MANAGER_H_