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

Unified Diff: net/nqe/network_quality_estimator.cc

Issue 2369673004: Wire NQE Prefs to Profile (Closed)
Patch Set: Addressed bengr 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 41947a4f325297846fc42ca5fecd3c3460af5f03..ca0afb4452f274401353cceaa75976223c351faa 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,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.ReadSize", read_prefs.size());
+ // TODO(tbansal): Incorporate the network quality into the current estimates.
bengr 2016/10/18 21:47:36 Reference a bug.
tbansal1 2016/10/19 18:34:47 Done.
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698