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

Unified Diff: net/nqe/network_quality_estimator.h

Issue 2742293004: Expose getters methods for NQE on UI thread (Closed)
Patch Set: ps Created 3 years, 9 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 d44c1a5537a171aeda6ac9bd541fb27041973f39..c71f09d2bd848b33eb6cfc97e45888c4823b6dee 100644
--- a/net/nqe/network_quality_estimator.h
+++ b/net/nqe/network_quality_estimator.h
@@ -157,11 +157,11 @@ class NET_EXPORT NetworkQualityEstimator
// Provides simple interface to obtain the effective connection type.
class NET_EXPORT NetworkQualityProvider {
public:
+ virtual ~NetworkQualityProvider() {}
+
// Returns the current effective connection type.
virtual EffectiveConnectionType GetEffectiveConnectionType() const = 0;
- virtual ~NetworkQualityProvider() {}
-
// Adds |observer| to a list of effective connection type observers.
virtual void AddEffectiveConnectionTypeObserver(
EffectiveConnectionTypeObserver* observer) = 0;
@@ -170,6 +170,22 @@ class NET_EXPORT NetworkQualityEstimator
virtual void RemoveEffectiveConnectionTypeObserver(
EffectiveConnectionTypeObserver* observer) = 0;
+ // Sets |http_rtt| to the current HTTP RTT estimate. |http_rtt| should not
+ // be null. Returns true only if a valid value is available.
+ virtual bool GetHttpRTT(base::TimeDelta* http_rtt) const WARN_UNUSED_RESULT;
+
+ // Sets |transport_rtt| to the current transport RTT estimate.
+ // |transport_rtt| should not be null. Returns true only if a valid value is
+ // available.
+ virtual bool GetTransportRTT(base::TimeDelta* transport_rtt) const
+ WARN_UNUSED_RESULT;
+
+ // Sets |downstream_throughput_kbps| to the current downstream throughput
+ // estimate (in kilobits per second). |downstream_throughput_kbps| should
+ // not be null. Returns true only if a valid value is available.
+ virtual bool GetDownstreamThroughputKbps(
+ int32_t* downstream_throughput_kbps) const WARN_UNUSED_RESULT;
+
// Adds |observer| to the list of RTT and throughput estimate observers.
// |observer| would be notified of the current RTT and throughput estimates
// in the next message pump.

Powered by Google App Engine
This is Rietveld 408576698