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

Unified Diff: chrome/browser/net/nqe/ui_network_quality_estimator_service.h

Issue 2491703003: NQE: Notify observer as soon as it is added (Closed)
Patch Set: ryansturm comments Created 4 years, 1 month 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: chrome/browser/net/nqe/ui_network_quality_estimator_service.h
diff --git a/chrome/browser/net/nqe/ui_network_quality_estimator_service.h b/chrome/browser/net/nqe/ui_network_quality_estimator_service.h
index bae6866aa0b3b896224818e4a436548c4c1b3dd8..086ba17dc1620eff498f18004d284c0c06900eda 100644
--- a/chrome/browser/net/nqe/ui_network_quality_estimator_service.h
+++ b/chrome/browser/net/nqe/ui_network_quality_estimator_service.h
@@ -37,7 +37,8 @@ class UINetworkQualityEstimatorService
// Must be called on the UI thread.
net::EffectiveConnectionType GetEffectiveConnectionType() const override;
// Must be called on the UI thread. |observer| will be notified on the UI
- // thread.
+ // thread. |observer| would be notified of the current effective connection
+ // type in the next message pump, if it is still registered as an observer.
void AddEffectiveConnectionTypeObserver(
net::NetworkQualityEstimator::EffectiveConnectionTypeObserver* observer)
override;
@@ -65,6 +66,12 @@ class UINetworkQualityEstimatorService
private:
class IONetworkQualityObserver;
+ // Notifies |observer| of the current effective connection type if |observer|
+ // is still registered as an observer.
+ void NotifyEffectiveConnectionTypeObserverIfPresent(
+ net::NetworkQualityEstimator::EffectiveConnectionTypeObserver* observer)
+ const;
+
// KeyedService implementation:
void Shutdown() override;
« no previous file with comments | « no previous file | chrome/browser/net/nqe/ui_network_quality_estimator_service.cc » ('j') | net/nqe/network_quality_estimator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698