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

Unified Diff: net/nqe/network_quality_estimator.cc

Issue 2369673004: Wire NQE Prefs to Profile (Closed)
Patch Set: Added functionality for reading and writing multiple network IDs, Rebased, Addressed Ryan's comments 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
Index: net/nqe/network_quality_estimator.cc
diff --git a/net/nqe/network_quality_estimator.cc b/net/nqe/network_quality_estimator.cc
index f97084a10be1834054d93fc892c10683857ee44a..dffa1cf3a72da762ee5f7d974f8d881a571bac7e 100644
--- a/net/nqe/network_quality_estimator.cc
+++ b/net/nqe/network_quality_estimator.cc
@@ -982,6 +982,12 @@ void NetworkQualityEstimator::ReportEffectiveConnectionTypeForTesting(
FOR_EACH_OBSERVER(
EffectiveConnectionTypeObserver, effective_connection_type_observer_list_,
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(
@@ -1735,4 +1741,12 @@ 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.ReadSizeAtStartUp", read_prefs.size());
+ // TODO(tbansal): Incorporate the network quality into the current estimates.
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698