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

Unified Diff: net/base/network_change_notifier.h

Issue 1047103002: Avoid initial NetworkChangeNotifier OnDNSChanged() signal on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert an accidental test enabling Created 5 years, 8 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
« no previous file with comments | « net/android/network_change_notifier_factory_android.cc ('k') | net/base/network_change_notifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_change_notifier.h
diff --git a/net/base/network_change_notifier.h b/net/base/network_change_notifier.h
index bce73733c9ff47bdeffade60a66b2e2bd9487911..b2e54f52321810b97e03bdcc2670a10fb35324dd 100644
--- a/net/base/network_change_notifier.h
+++ b/net/base/network_change_notifier.h
@@ -135,6 +135,9 @@ class NET_EXPORT NetworkChangeNotifier {
// Will be called when the DNS settings of the system may have changed.
// Use GetDnsConfig to obtain the current settings.
virtual void OnDNSChanged() = 0;
+ // Will be called when DNS settings of the system have been loaded.
+ // Use GetDnsConfig to obtain the current settings.
+ virtual void OnInitialDNSConfigRead();
protected:
DNSObserver() {}
@@ -305,6 +308,7 @@ class NET_EXPORT NetworkChangeNotifier {
static void NotifyObserversOfConnectionTypeChangeForTests(
ConnectionType type);
static void NotifyObserversOfNetworkChangeForTests(ConnectionType type);
+ static void NotifyObserversOfInitialDNSConfigReadForTests();
// Enable or disable notifications from the host. After setting to true, be
// sure to pump the RunLoop until idle to finish any preexisting
@@ -400,11 +404,15 @@ class NET_EXPORT NetworkChangeNotifier {
static void NotifyObserversOfIPAddressChange();
static void NotifyObserversOfConnectionTypeChange();
static void NotifyObserversOfDNSChange();
+ static void NotifyObserversOfInitialDNSConfigRead();
static void NotifyObserversOfNetworkChange(ConnectionType type);
static void NotifyObserversOfMaxBandwidthChange(double max_bandwidth_mbps);
- // Stores |config| in NetworkState and notifies observers.
+ // Stores |config| in NetworkState and notifies OnDNSChanged observers.
static void SetDnsConfig(const DnsConfig& config);
+ // Stores |config| in NetworkState and notifies OnInitialDNSConfigRead
+ // observers.
+ static void SetInitialDnsConfig(const DnsConfig& config);
private:
friend class HostResolverImplDnsTest;
@@ -418,6 +426,7 @@ class NET_EXPORT NetworkChangeNotifier {
void NotifyObserversOfIPAddressChangeImpl();
void NotifyObserversOfConnectionTypeChangeImpl(ConnectionType type);
void NotifyObserversOfDNSChangeImpl();
+ void NotifyObserversOfInitialDNSConfigReadImpl();
void NotifyObserversOfNetworkChangeImpl(ConnectionType type);
void NotifyObserversOfMaxBandwidthChangeImpl(double max_bandwidth_mbps);
« no previous file with comments | « net/android/network_change_notifier_factory_android.cc ('k') | net/base/network_change_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698