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

Unified Diff: net/base/network_change_notifier_win.cc

Issue 2910473005: Deprecate NonThreadSafe in net/ in favor of SequenceChecker/ThreadChecker. (Closed)
Patch Set: Fix chromecast compile 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 9b2b35ec76bfbc08a1ac6008dbf9f85b80a2618b..818fa5336d443923ebe3ee2cf8caced3cf5097c1 100644
--- a/net/base/network_change_notifier_win.cc
+++ b/net/base/network_change_notifier_win.cc
@@ -65,6 +65,7 @@ NetworkChangeNotifierWin::NetworkChangeNotifierWin()
}
NetworkChangeNotifierWin::~NetworkChangeNotifierWin() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (is_watching_) {
CancelIPChangeNotify(&addr_overlapped_);
mmenke 2017/05/26 20:20:03 This class uses an overlapped structure, which I d
addr_watcher_.StopWatching();
@@ -136,7 +137,7 @@ NetworkChangeNotifierWin::NetworkChangeCalculatorParamsWin() {
//
NetworkChangeNotifier::ConnectionType
NetworkChangeNotifierWin::RecomputeCurrentConnectionType() const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
EnsureWinsockInit();
@@ -218,7 +219,7 @@ void NetworkChangeNotifierWin::SetCurrentConnectionType(
}
void NetworkChangeNotifierWin::OnObjectSignaled(HANDLE object) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(is_watching_);
is_watching_ = false;
@@ -229,7 +230,7 @@ void NetworkChangeNotifierWin::OnObjectSignaled(HANDLE object) {
}
void NetworkChangeNotifierWin::NotifyObservers() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
SetCurrentConnectionType(RecomputeCurrentConnectionType());
NotifyObserversOfIPAddressChange();
@@ -246,7 +247,7 @@ void NetworkChangeNotifierWin::NotifyObservers() {
}
void NetworkChangeNotifierWin::WatchForAddressChange() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(!is_watching_);
// NotifyAddrChange occasionally fails with ERROR_OPEN_FAILED for unknown
@@ -287,7 +288,7 @@ void NetworkChangeNotifierWin::WatchForAddressChange() {
}
bool NetworkChangeNotifierWin::WatchForAddressChangeInternal() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_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