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

Unified Diff: content/browser/net/network_quality_observer_impl.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: content/browser/net/network_quality_observer_impl.h
diff --git a/content/browser/net/network_quality_observer_impl.h b/content/browser/net/network_quality_observer_impl.h
index 5ef0712b6fdad110e1e4d8ae83af1e606425f603..915ec17260be76c855d2be022f753e3d4a69a97b 100644
--- a/content/browser/net/network_quality_observer_impl.h
+++ b/content/browser/net/network_quality_observer_impl.h
@@ -13,6 +13,7 @@
#include "base/threading/thread_checker.h"
#include "content/common/content_export.h"
#include "content/public/browser/network_quality_observer_factory.h"
+#include "net/nqe/effective_connection_type.h"
#include "net/nqe/network_quality.h"
#include "net/nqe/network_quality_estimator.h"
@@ -21,7 +22,8 @@ namespace content {
// Listens for changes to the network quality and manages sending updates to
// each RenderProcess via mojo.
class CONTENT_EXPORT NetworkQualityObserverImpl
- : public net::NetworkQualityEstimator::RTTAndThroughputEstimatesObserver {
+ : public net::NetworkQualityEstimator::EffectiveConnectionTypeObserver,
+ public net::NetworkQualityEstimator::RTTAndThroughputEstimatesObserver {
public:
explicit NetworkQualityObserverImpl(
net::NetworkQualityEstimator* network_quality_estimator);
@@ -31,6 +33,11 @@ class CONTENT_EXPORT NetworkQualityObserverImpl
private:
class UiThreadObserver;
+ // net::NetworkQualityEstimator::EffectiveConnectionTypeObserver
+ // implementation:
+ void OnEffectiveConnectionTypeChanged(
+ net::EffectiveConnectionType type) override;
+
// net::NetworkQualityEstimator::RTTAndThroughputEstimatesObserver
// implementation:
void OnRTTOrThroughputEstimatesComputed(
@@ -49,6 +56,7 @@ class CONTENT_EXPORT NetworkQualityObserverImpl
net::NetworkQualityEstimator* network_quality_estimator_;
// The network quality when the |ui_thread_observer_| was last notified.
+ net::EffectiveConnectionType last_notified_type_;
net::nqe::internal::NetworkQuality last_notified_network_quality_;
base::ThreadChecker thread_checker_;

Powered by Google App Engine
This is Rietveld 408576698