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

Unified Diff: net/dns/address_sorter_posix.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/dns/address_sorter_posix.h ('k') | net/dns/dns_config_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/address_sorter_posix.cc
diff --git a/net/dns/address_sorter_posix.cc b/net/dns/address_sorter_posix.cc
index e354de20223cb36bfc3d03db4c2ced07ed28ecf2..3432a5a7fef36cf16cbc6c82bd0d85405980cc69 100644
--- a/net/dns/address_sorter_posix.cc
+++ b/net/dns/address_sorter_posix.cc
@@ -251,12 +251,13 @@ AddressSorterPosix::AddressSorterPosix(ClientSocketFactory* socket_factory)
}
AddressSorterPosix::~AddressSorterPosix() {
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
NetworkChangeNotifier::RemoveIPAddressObserver(this);
}
void AddressSorterPosix::Sort(const AddressList& list,
const CallbackType& callback) const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
std::vector<std::unique_ptr<DestinationInfo>> sort_list;
for (size_t i = 0; i < list.size(); ++i) {
@@ -315,7 +316,7 @@ void AddressSorterPosix::Sort(const AddressList& list,
}
void AddressSorterPosix::OnIPAddressChanged() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
source_map_.clear();
#if defined(OS_LINUX)
const internal::AddressTrackerLinux* tracker =
@@ -385,7 +386,7 @@ void AddressSorterPosix::OnIPAddressChanged() {
void AddressSorterPosix::FillPolicy(const IPAddress& address,
SourceAddressInfo* info) const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
info->scope = GetScope(ipv4_scope_table_, address);
info->label = GetPolicyValue(label_table_, address);
}
« no previous file with comments | « net/dns/address_sorter_posix.h ('k') | net/dns/dns_config_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698