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

Unified Diff: net/nqe/network_quality_estimator.h

Issue 1879743002: Expose cellular signal strength on Android to native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Paul's comments Created 4 years, 6 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.h
diff --git a/net/nqe/network_quality_estimator.h b/net/nqe/network_quality_estimator.h
index c13ae601061a48b6c536a81b12f53ba7cc71ba39..20f233b450bbf720b701056485df1c382e63c68e 100644
--- a/net/nqe/network_quality_estimator.h
+++ b/net/nqe/network_quality_estimator.h
@@ -476,6 +476,11 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimator
// main frame request is observed.
void RecordAccuracyAfterMainFrame(base::TimeDelta measuring_duration) const;
+ // Obtains the current cellular signal strength value and updates
+ // |min_signal_strength_since_connection_change_| and
+ // |max_signal_strength_since_connection_change_|.
+ void UpdateSignalStrength();
+
// Returns the effective type of the current connection based on only the
// samples observed after |start_time|. Uses HTTP RTT and downstream
// throughput to compute the effective connection type, and requires both of
@@ -604,6 +609,11 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimator
// |effective_connection_type_recomputation_interval_| ago).
EffectiveConnectionType effective_connection_type_;
+ // Minimum and Maximum signal strength (in dbM) observed since last connection
+ // change. Updated on connection change and main frame requests.
+ int32_t min_signal_strength_since_connection_change_;
+ int32_t max_signal_strength_since_connection_change_;
+
base::ThreadChecker thread_checker_;
base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698