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

Unified Diff: net/nqe/network_quality_estimator.cc

Issue 2116893002: NQE: Record how frequently NetworkID is available (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 5 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') | net/nqe/network_quality_estimator_unittest.cc » ('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 7750e2faff832b75c6063e3551e24aa924905d94..b8a0a8f70d38013b1716af6fb9d55e852cb2a80b 100644
--- a/net/nqe/network_quality_estimator.cc
+++ b/net/nqe/network_quality_estimator.cc
@@ -781,7 +781,9 @@ void NetworkQualityEstimator::OnConnectionTypeChanged(
min_signal_strength_since_connection_change_ = INT32_MAX;
max_signal_strength_since_connection_change_ = INT32_MIN;
+ // Update the local state as part of preparation for the new connection.
current_network_id_ = GetCurrentNetworkID();
+ RecordNetworkIDAvailability();
// Query the external estimate provider on certain connection types. Once the
// updated estimates are available, OnUpdatedEstimateAvailable will be called
@@ -891,6 +893,16 @@ void NetworkQualityEstimator::RecordMetricsOnConnectionTypeChanged() const {
}
}
+void NetworkQualityEstimator::RecordNetworkIDAvailability() const {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ if (current_network_id_.type ==
+ NetworkChangeNotifier::ConnectionType::CONNECTION_WIFI ||
+ NetworkChangeNotifier::IsConnectionCellular(current_network_id_.type)) {
+ UMA_HISTOGRAM_BOOLEAN("NQE.NetworkIdAvailable",
+ !current_network_id_.id.empty());
+ }
+}
+
void NetworkQualityEstimator::RecordMetricsOnMainFrameRequest() const {
DCHECK(thread_checker_.CalledOnValidThread());
« no previous file with comments | « net/nqe/network_quality_estimator.h ('k') | net/nqe/network_quality_estimator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698