Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Unified Diff: net/nqe/network_quality_estimator.cc

Issue 2369673004: Wire NQE Prefs to Profile (Closed)
Patch Set: More fixups Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/nqe/network_quality_estimator.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/nqe/network_quality_estimator.cc
diff --git a/net/nqe/network_quality_estimator.cc b/net/nqe/network_quality_estimator.cc
index 41947a4f325297846fc42ca5fecd3c3460af5f03..2c1daaa401e68b815beb77247c1b0bb9fbbcd574 100644
--- a/net/nqe/network_quality_estimator.cc
+++ b/net/nqe/network_quality_estimator.cc
@@ -984,6 +984,12 @@ void NetworkQualityEstimator::ReportEffectiveConnectionTypeForTesting(
DCHECK(thread_checker_.CalledOnValidThread());
for (auto& observer : effective_connection_type_observer_list_)
observer.OnEffectiveConnectionTypeChanged(effective_connection_type);
+
+ network_quality_store_->Add(
+ current_network_id_,
+ nqe::internal::CachedNetworkQuality(tick_clock_->NowTicks(),
+ estimated_quality_at_last_main_frame_,
+ effective_connection_type));
}
bool NetworkQualityEstimator::RequestProvidesRTTObservation(
@@ -1787,4 +1793,13 @@ void NetworkQualityEstimator::RemoveNetworkQualitiesCacheObserver(
network_quality_store_->RemoveNetworkQualitiesCacheObserver(observer);
}
+void NetworkQualityEstimator::OnPrefsRead(
+ const std::map<nqe::internal::NetworkID,
+ nqe::internal::CachedNetworkQuality> read_prefs) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ UMA_HISTOGRAM_COUNTS("NQE.Prefs.ReadSize", read_prefs.size());
+ // TODO(tbansal): crbug.com/490870. Incorporate the network quality into the
+ // current estimates.
+}
+
} // namespace net
« no previous file with comments | « net/nqe/network_quality_estimator.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698