summaryrefslogtreecommitdiffstats
path: root/net/base/network_change_notifier_win.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-04 19:08:29 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-04 19:08:29 +0000
commit1fabd9a93df25441a704715c05d2e773d9ef4db1 (patch)
tree4623822f20a901adf12cd4ffb65f257427b34a9e /net/base/network_change_notifier_win.h
parent0109730426988f862224c42ad01be37cb6a3c569 (diff)
downloadchromium_src-1fabd9a93df25441a704715c05d2e773d9ef4db1.zip
chromium_src-1fabd9a93df25441a704715c05d2e773d9ef4db1.tar.gz
chromium_src-1fabd9a93df25441a704715c05d2e773d9ef4db1.tar.bz2
Revert r36842 which reverted r36837.
===== Implement NetworkChangeNotifierWin. Uses the NotifyAddrChange() API to detect ip address changes. BUG=http://crbug.com/26156 ===== It was previously reverted due to a HTTPBridgeTest failing in XP unit_tests. This is because that test would create HttpNetworkSession in the unit test in a thread that didn't have a MessageLoop. The test is still broken, but r38052 moved NetworkChangeNotifier initialization to IOThread, so it's no longer initialized when HttpNetworkSession is. Therefore, it doesn't trigger the same crash now, although the previous test is still broken and is tracked in bug 34352. Review URL: http://codereview.chromium.org/563029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38116 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/network_change_notifier_win.h')
-rw-r--r--net/base/network_change_notifier_win.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/base/network_change_notifier_win.h b/net/base/network_change_notifier_win.h
index b208ad7..b11ec0d 100644
--- a/net/base/network_change_notifier_win.h
+++ b/net/base/network_change_notifier_win.h
@@ -6,6 +6,7 @@
#define NET_BASE_NETWORK_CHANGE_NOTIFIER_WIN_H_
#include "base/basictypes.h"
+#include "base/object_watcher.h"
#include "net/base/network_change_notifier_helper.h"
namespace net {
@@ -14,6 +15,11 @@ class NetworkChangeNotifierWin : public NetworkChangeNotifier {
public:
NetworkChangeNotifierWin();
+ // Called by NetworkChangeNotifierWin::Impl.
+ void OnIPAddressChanged() { helper_.OnIPAddressChanged(); }
+
+ // NetworkChangeNotifier methods:
+
virtual void AddObserver(Observer* observer) {
helper_.AddObserver(observer);
}
@@ -23,11 +29,12 @@ class NetworkChangeNotifierWin : public NetworkChangeNotifier {
}
private:
- virtual ~NetworkChangeNotifierWin();
+ class Impl;
- void OnIPAddressChanged() { helper_.OnIPAddressChanged(); }
+ virtual ~NetworkChangeNotifierWin();
internal::NetworkChangeNotifierHelper helper_;
+ scoped_ptr<Impl> impl_;
DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierWin);
};