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

Unified Diff: third_party/WebKit/Source/modules/netinfo/NetworkInformation.h

Issue 2883763002: Expose ECT to render frames, Blink and NetInfo (Closed)
Patch Set: rebased Created 3 years, 7 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: third_party/WebKit/Source/modules/netinfo/NetworkInformation.h
diff --git a/third_party/WebKit/Source/modules/netinfo/NetworkInformation.h b/third_party/WebKit/Source/modules/netinfo/NetworkInformation.h
index 01626ab1e02c6b7b0c599dce8ad2346e2223ae08..af476b7d904da84bec6e825d15342f6d6665c7b4 100644
--- a/third_party/WebKit/Source/modules/netinfo/NetworkInformation.h
+++ b/third_party/WebKit/Source/modules/netinfo/NetworkInformation.h
@@ -12,6 +12,7 @@
#include "platform/wtf/Optional.h"
#include "platform/wtf/Time.h"
#include "public/platform/WebConnectionType.h"
+#include "public/platform/WebEffectiveConnectionType.h"
namespace blink {
@@ -31,12 +32,14 @@ class NetworkInformation final
String type() const;
double downlinkMax() const;
+ String effectiveType() const;
unsigned long rtt() const;
double downlink() const;
// NetworkStateObserver overrides.
void ConnectionChange(WebConnectionType,
double downlink_max_mbps,
+ WebEffectiveConnectionType effective_type,
const Optional<TimeDelta>& http_rtt,
const Optional<TimeDelta>& transport_rtt,
const Optional<double>& downlink_mbps) override;
@@ -75,6 +78,11 @@ class NetworkInformation final
// Touched only on context thread.
double downlink_max_mbps_;
+ // Current effective connection type, which is the connection type whose
+ // typical performance is most similar to the measured performance of the
+ // network in use.
+ WebEffectiveConnectionType effective_type_;
+
// Transport RTT estimate. Rounded off to the nearest 25 msec. Touched only on
// context thread.
unsigned long transport_rtt_msec_;

Powered by Google App Engine
This is Rietveld 408576698