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

Unified Diff: net/base/network_change_notifier_win.cc

Issue 2910473005: Deprecate NonThreadSafe in net/ in favor of SequenceChecker/ThreadChecker. (Closed)
Patch Set: rebase on r476634 Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/network_change_notifier_win.h ('k') | net/base/network_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_change_notifier_win.cc
diff --git a/net/base/network_change_notifier_win.cc b/net/base/network_change_notifier_win.cc
index 1dc2038327dd36f1c887d6fe2ced3d47e4c46237..c53df99f8eaafa1fed38c40d4c6aa196fadbcc04 100644
--- a/net/base/network_change_notifier_win.cc
+++ b/net/base/network_change_notifier_win.cc
@@ -66,6 +66,7 @@ NetworkChangeNotifierWin::NetworkChangeNotifierWin()
}
NetworkChangeNotifierWin::~NetworkChangeNotifierWin() {
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
if (is_watching_) {
CancelIPChangeNotify(&addr_overlapped_);
addr_watcher_.StopWatching();
@@ -229,7 +230,7 @@ void NetworkChangeNotifierWin::SetCurrentConnectionType(
}
void NetworkChangeNotifierWin::OnObjectSignaled(HANDLE object) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
DCHECK(is_watching_);
is_watching_ = false;
@@ -241,7 +242,7 @@ void NetworkChangeNotifierWin::OnObjectSignaled(HANDLE object) {
}
void NetworkChangeNotifierWin::NotifyObservers(ConnectionType connection_type) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
SetCurrentConnectionType(connection_type);
NotifyObserversOfIPAddressChange();
@@ -258,7 +259,7 @@ void NetworkChangeNotifierWin::NotifyObservers(ConnectionType connection_type) {
}
void NetworkChangeNotifierWin::WatchForAddressChange() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
DCHECK(!is_watching_);
// NotifyAddrChange occasionally fails with ERROR_OPEN_FAILED for unknown
@@ -302,7 +303,7 @@ void NetworkChangeNotifierWin::WatchForAddressChange() {
}
bool NetworkChangeNotifierWin::WatchForAddressChangeInternal() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
if (!dns_config_service_thread_->IsRunning()) {
dns_config_service_thread_->StartWithOptions(
« no previous file with comments | « net/base/network_change_notifier_win.h ('k') | net/base/network_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698