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

Unified Diff: net/nqe/network_quality_estimator.h

Issue 2863973003: Expose RTT and downlink bandwidth using experimental Javascript API (Closed)
Patch Set: ps 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: net/nqe/network_quality_estimator.h
diff --git a/net/nqe/network_quality_estimator.h b/net/nqe/network_quality_estimator.h
index b68636a32525687261cc8d298c5a8beefbbf101f..e92bac4157c873d101d56583a2136fd3e99dcba0 100644
--- a/net/nqe/network_quality_estimator.h
+++ b/net/nqe/network_quality_estimator.h
@@ -341,6 +341,9 @@ class NET_EXPORT NetworkQualityEstimator
const std::map<nqe::internal::NetworkID,
nqe::internal::CachedNetworkQuality> read_prefs);
+ // Prevents |this| from sending any notifications to the observers.
+ void SuppressNotificationsForTesting();
+
protected:
// A protected constructor for testing that allows setting the value of
// |add_default_platform_observations_|.
@@ -809,6 +812,9 @@ class NET_EXPORT NetworkQualityEstimator
const std::vector<NetworkQualityObservationSource>
disallowed_observation_sources_for_transport_;
+ // If true, notifications are not sent to any of the observers.
+ bool suppress_notifications_for_testing_;
+
base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator);

Powered by Google App Engine
This is Rietveld 408576698