#include "content/browser/network/network_quality_observer_impl.h"
#include "base/metrics/histogram_macros.h"
#include "content/common/renderer.mojom.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/network_quality_observer_factory.h"
#include "content/public/browser/render_process_host.h"
namespace {
bool MetricChangedMeaningfully(int32_t past_value, int32_t current_value) { … }
}
namespace content {
NetworkQualityObserverImpl::NetworkQualityObserverImpl(
network::NetworkQualityTracker* network_quality_tracker)
: … { … }
NetworkQualityObserverImpl::~NetworkQualityObserverImpl() { … }
void NetworkQualityObserverImpl::OnEffectiveConnectionTypeChanged(
net::EffectiveConnectionType type) { … }
void NetworkQualityObserverImpl::OnRenderProcessHostCreated(
content::RenderProcessHost* rph) { … }
void NetworkQualityObserverImpl::OnRTTOrThroughputEstimatesComputed(
base::TimeDelta http_rtt,
base::TimeDelta transport_rtt,
int32_t downstream_throughput_kbps) { … }
std::unique_ptr<
network::NetworkQualityTracker::RTTAndThroughputEstimatesObserver>
CreateNetworkQualityObserver(
network::NetworkQualityTracker* network_quality_tracker) { … }
}