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

Unified Diff: net/nqe/network_quality_estimator.h

Issue 2742293004: Expose getters methods for NQE on UI thread (Closed)
Patch Set: ryansturm comments 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..5c2718a12b6df2eb8ba4763a739942f511798982 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,19 @@ class NET_EXPORT NetworkQualityEstimator
virtual void RemoveEffectiveConnectionTypeObserver(
EffectiveConnectionTypeObserver* observer) = 0;
+ // Returns the current HTTP RTT estimate. If the estimate is unavailable,
+ // the returned optional value is null.
+ virtual base::Optional<base::TimeDelta> GetHttpRTT() const;
+
+ // Returns the current transport RTT estimate. If the estimate is
+ // unavailable, the returned optional value is null.
+ virtual base::Optional<base::TimeDelta> GetTransportRTT() const;
+
+ // Returns the current downstream throughput estimate (in kilobits per
+ // second). If the estimate is unavailable, the returned optional value is
+ // null.
+ virtual base::Optional<int32_t> GetDownstreamThroughputKbps() const;
+
// 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.
« no previous file with comments | « chrome/browser/net/nqe/ui_network_quality_estimator_service_browsertest.cc ('k') | net/nqe/network_quality_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698