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

Side by Side Diff: net/base/network_change_notifier_win.cc

Issue 7031054: Use CHECK_EQ in NetworkChangeNotifierWin::WatchForAddressChange (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/network_change_notifier_win.h" 5 #include "net/base/network_change_notifier_win.h"
6 6
7 #include <iphlpapi.h> 7 #include <iphlpapi.h>
8 #include <winsock2.h> 8 #include <winsock2.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 timer_.Start(base::TimeDelta::FromSeconds(1), this, 156 timer_.Start(base::TimeDelta::FromSeconds(1), this,
157 &NetworkChangeNotifierWin::NotifyParentOfOnlineStateChange); 157 &NetworkChangeNotifierWin::NotifyParentOfOnlineStateChange);
158 158
159 // Start watching for the next address change. 159 // Start watching for the next address change.
160 WatchForAddressChange(); 160 WatchForAddressChange();
161 } 161 }
162 162
163 void NetworkChangeNotifierWin::WatchForAddressChange() { 163 void NetworkChangeNotifierWin::WatchForAddressChange() {
164 HANDLE handle = NULL; 164 HANDLE handle = NULL;
165 DWORD ret = NotifyAddrChange(&handle, &addr_overlapped_); 165 DWORD ret = NotifyAddrChange(&handle, &addr_overlapped_);
166 CHECK(ret == ERROR_IO_PENDING); 166 CHECK_EQ(static_cast<DWORD>(ERROR_IO_PENDING), ret);
167 addr_watcher_.StartWatching(addr_overlapped_.hEvent, this); 167 addr_watcher_.StartWatching(addr_overlapped_.hEvent, this);
168 } 168 }
169 169
170 void NetworkChangeNotifierWin::NotifyParentOfOnlineStateChange() { 170 void NetworkChangeNotifierWin::NotifyParentOfOnlineStateChange() {
171 NotifyObserversOfOnlineStateChange(); 171 NotifyObserversOfOnlineStateChange();
172 } 172 }
173 173
174 } // namespace net 174 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698