#include "services/network/network_quality_estimator_manager.h"
#include <algorithm>
#include <map>
#include <string>
#include <utility>
#include "base/check_op.h"
#include "base/command_line.h"
#include "base/metrics/field_trial_params.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "net/base/features.h"
#include "net/nqe/network_quality_estimator.h"
#include "net/nqe/network_quality_estimator_params.h"
#include "services/network/public/cpp/network_switches.h"
namespace {
bool MetricChangedMeaningfully(int32_t past_value,
int32_t current_value,
int min_difference_in_metrics,
float min_ratio) { … }
bool LatencyMetricChangedMeaningfully(int32_t past_value,
int32_t current_value) { … }
bool BandwidthMetricChangedMeaningfully(int32_t past_value,
int32_t current_value) { … }
}
namespace network {
NetworkQualityEstimatorManager::NetworkQualityEstimatorManager(
net::NetLog* net_log) { … }
NetworkQualityEstimatorManager::~NetworkQualityEstimatorManager() { … }
void NetworkQualityEstimatorManager::AddReceiver(
mojo::PendingReceiver<mojom::NetworkQualityEstimatorManager> receiver) { … }
void NetworkQualityEstimatorManager::RequestNotifications(
mojo::PendingRemote<mojom::NetworkQualityEstimatorManagerClient>
pending_client) { … }
void NetworkQualityEstimatorManager::OnEffectiveConnectionTypeChanged(
net::EffectiveConnectionType effective_connection_type) { … }
void NetworkQualityEstimatorManager::OnRTTOrThroughputEstimatesComputed(
base::TimeDelta http_rtt,
base::TimeDelta transport_rtt,
int32_t downstream_throughput_kbps) { … }
net::NetworkQualityEstimator*
NetworkQualityEstimatorManager::GetNetworkQualityEstimator() const { … }
}