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

Unified Diff: net/nqe/network_quality_estimator.h

Issue 2763853002: Use Android callback API to obtain cellular signal strength (Closed)
Patch Set: comments Created 3 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 c0f709d01e12f31580544e1954964ff090e0d088..75e74abc8b53950b778b41e516a2bbe19694a865 100644
--- a/net/nqe/network_quality_estimator.h
+++ b/net/nqe/network_quality_estimator.h
@@ -609,15 +609,15 @@ class NET_EXPORT NetworkQualityEstimator
// |effective_connection_type_recomputation_interval_| ago).
EffectiveConnectionType effective_connection_type_;
- // Last known value of the wireless signal strength. Set to INT32_MIN if
- // unavailable. |signal_strength_dbm_| is reset to INT32_MIN on connection
- // change events.
- int32_t signal_strength_dbm_;
+ // Last known value of the wireless signal strength level. If the signal
+ // strength level is available, the value is set to between 0 and 4, both
+ // inclusive. If the value is unavailable, |signal_strength_| has null value.
+ base::Optional<int32_t> signal_strength_;
- // Minimum and maximum signal strength (in dBm) observed since last connection
+ // Minimum and maximum signal strength level 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::Optional<int32_t> min_signal_strength_since_connection_change_;
+ base::Optional<int32_t> max_signal_strength_since_connection_change_;
// Stores the qualities of different networks.
std::unique_ptr<nqe::internal::NetworkQualityStore> network_quality_store_;
« no previous file with comments | « net/android/java/src/org/chromium/net/AndroidCellularSignalStrength.java ('k') | net/nqe/network_quality_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698