Chromium Code Reviews| Index: net/base/network_change_notifier.h |
| diff --git a/net/base/network_change_notifier.h b/net/base/network_change_notifier.h |
| index f4875015e48532b15d71bd94da6c8d00d9f36da7..23a4e858b04799b228c48bdc3345faca8d85aef0 100644 |
| --- a/net/base/network_change_notifier.h |
| +++ b/net/base/network_change_notifier.h |
| @@ -84,6 +84,12 @@ class NET_EXPORT NetworkChangeNotifier { |
| // cheap as this could be called (repeatedly) from the IO thread. |
| virtual bool IsCurrentlyOffline() const = 0; |
| + // Returns true if DNS watchers are operational. |
| + // Otherwise, OnDNSChanged might not be issued for future changes. |
| + // TODO(szym): This is a temporary interface, consider restarting them. |
| + // http://crbug.com/116139 |
| + virtual bool IsCurrentlyWatchingDNS() const; |
|
cbentzel
2012/02/29 21:51:58
Which consumers are using this?
cbentzel
2012/02/29 21:51:58
why not pure virtual? should also include similar
szym
2012/02/29 22:03:49
Any DNSObserver that must know if it can expect to
szym
2012/02/29 22:03:49
Not pure virtual, because this is not an essential
|
| + |
| // Replaces the default class factory instance of NetworkChangeNotifier class. |
| // The method will take over the ownership of |factory| object. |
| static void SetFactory(NetworkChangeNotifierFactory* factory); |
| @@ -105,6 +111,9 @@ class NET_EXPORT NetworkChangeNotifier { |
| // will be successfully. |
| static bool IsOffline(); |
| + // Returns true if DNS watchers are operational. |
| + static bool IsWatchingDNS(); |
| + |
| // Like Create(), but for use in tests. The mock object doesn't monitor any |
| // events, it merely rebroadcasts notifications when requested. |
| static NetworkChangeNotifier* CreateMock(); |