diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-17 21:24:02 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-17 21:24:02 +0000 |
commit | afed2dc02a3cce27bbe132aa9f97cb5bbb31d45a (patch) | |
tree | dd57bea37e892bf63dbcbd3d759548a3b1b626eb /net/base/network_change_notifier_win.cc | |
parent | e106b901229419b078903bdd7f2bac97f2932bdc (diff) | |
download | chromium_src-afed2dc02a3cce27bbe132aa9f97cb5bbb31d45a.zip chromium_src-afed2dc02a3cce27bbe132aa9f97cb5bbb31d45a.tar.gz chromium_src-afed2dc02a3cce27bbe132aa9f97cb5bbb31d45a.tar.bz2 |
Implement a TODO: Move "NonThreadSafe" inheritance from NetworkChangeNotifier interface to implementations. Also add CalledOnValidThread() DCHECKs in as many places as possible.
Some minor style changes.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2813019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50139 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/network_change_notifier_win.cc')
-rw-r--r-- | net/base/network_change_notifier_win.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/net/base/network_change_notifier_win.cc b/net/base/network_change_notifier_win.cc index 02b1834..bed361c 100644 --- a/net/base/network_change_notifier_win.cc +++ b/net/base/network_change_notifier_win.cc @@ -66,7 +66,23 @@ NetworkChangeNotifierWin::NetworkChangeNotifierWin() : impl_(new Impl(ALLOW_THIS_IN_INITIALIZER_LIST(this))) { impl_->WatchForAddressChange(); } +void NetworkChangeNotifierWin::OnIPAddressChanged() { + DCHECK(CalledOnValidThread()); + FOR_EACH_OBSERVER(Observer, observers_, OnIPAddressChanged()); +} + +void NetworkChangeNotifierWin::AddObserver(Observer* observer) { + DCHECK(CalledOnValidThread()); + observers_.AddObserver(observer); +} -NetworkChangeNotifierWin::~NetworkChangeNotifierWin() {} +void NetworkChangeNotifierWin::RemoveObserver(Observer* observer) { + DCHECK(CalledOnValidThread()); + observers_.RemoveObserver(observer); +} + +NetworkChangeNotifierWin::~NetworkChangeNotifierWin() { + DCHECK(CalledOnValidThread()); +} } // namespace net |