diff options
author | adamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 22:42:08 +0000 |
---|---|---|
committer | adamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 22:42:08 +0000 |
commit | 232a58169700ed7abde79d9858c288eb21409e60 (patch) | |
tree | a1424f86d252cd3859c060954882a9a1809a5121 /net/base/dnsrr_resolver.h | |
parent | cdc5489ddff18b5ff13296abc1c8869e3cd7db28 (diff) | |
download | chromium_src-232a58169700ed7abde79d9858c288eb21409e60.zip chromium_src-232a58169700ed7abde79d9858c288eb21409e60.tar.gz chromium_src-232a58169700ed7abde79d9858c288eb21409e60.tar.bz2 |
Plumb through NetworkChangeNotifier::IsOffline() to WebKit, enabling
navigator.onLine and online/offline events. Only works on Windows at the moment, as IsCurrentlyOffline() is supported only by NetworkChangeNotifierWin.
Most of the changes are due to the need to support two different kinds of NetworkChangeNotifier observers. Both observers currently happen to trigger on the same event, but that could change, e.g., if we store the previous online state and only notify on a change. Thus the need for two different observer interfaces, and associated Add/Remove methods.
BUG=7469
TEST=Load https://bug336359.bugzilla.mozilla.org/attachment.cgi?id=220609, unplug network cable, reload, see that page changes to note offline status
Review URL: http://codereview.chromium.org/6526059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76985 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/dnsrr_resolver.h')
-rw-r--r-- | net/base/dnsrr_resolver.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/base/dnsrr_resolver.h b/net/base/dnsrr_resolver.h index 3280774..a9ff84b 100644 --- a/net/base/dnsrr_resolver.h +++ b/net/base/dnsrr_resolver.h @@ -67,7 +67,7 @@ class RRResolverJob; // // A DnsRRResolver must be used from the MessageLoop which created it. class DnsRRResolver : public base::NonThreadSafe, - public NetworkChangeNotifier::Observer { + public NetworkChangeNotifier::IPAddressObserver { public: typedef intptr_t Handle; @@ -105,7 +105,7 @@ class DnsRRResolver : public base::NonThreadSafe, // must not have already been called. void CancelResolve(Handle handle); - // Implementation of NetworkChangeNotifier::Observer + // Implementation of NetworkChangeNotifier::IPAddressObserver virtual void OnIPAddressChanged(); private: |