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

Unified Diff: net/proxy/dhcp_proxy_script_fetcher_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/proxy/dhcp_proxy_script_fetcher_win.h ('k') | net/proxy/multi_threaded_proxy_resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/dhcp_proxy_script_fetcher_win.cc
diff --git a/net/proxy/dhcp_proxy_script_fetcher_win.cc b/net/proxy/dhcp_proxy_script_fetcher_win.cc
index fc72b86c86ce4d84105e27fddb674aa16c4e03ba..8685084dc67f485bedd99b93226ccce7e3a3e7ee 100644
--- a/net/proxy/dhcp_proxy_script_fetcher_win.cc
+++ b/net/proxy/dhcp_proxy_script_fetcher_win.cc
@@ -63,6 +63,7 @@ DhcpProxyScriptFetcherWin::DhcpProxyScriptFetcherWin(
}
DhcpProxyScriptFetcherWin::~DhcpProxyScriptFetcherWin() {
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
// Count as user-initiated if we are not yet in STATE_DONE.
Cancel();
@@ -76,7 +77,7 @@ int DhcpProxyScriptFetcherWin::Fetch(base::string16* utf16_text,
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"476182 DhcpProxyScriptFetcherWin::Fetch 1"));
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
if (state_ != STATE_START && state_ != STATE_DONE) {
NOTREACHED();
return ERR_UNEXPECTED;
@@ -108,13 +109,13 @@ int DhcpProxyScriptFetcherWin::Fetch(base::string16* utf16_text,
}
void DhcpProxyScriptFetcherWin::Cancel() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
CancelImpl();
}
void DhcpProxyScriptFetcherWin::OnShutdown() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
// Back up callback, if there is one, as CancelImpl() will destroy it.
net::CompletionCallback callback = std::move(callback_);
@@ -131,7 +132,7 @@ void DhcpProxyScriptFetcherWin::OnShutdown() {
}
void DhcpProxyScriptFetcherWin::CancelImpl() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
if (state_ != STATE_DONE) {
callback_.Reset();
@@ -156,7 +157,7 @@ void DhcpProxyScriptFetcherWin::OnGetCandidateAdapterNamesDone(
"476182 "
"DhcpProxyScriptFetcherWin::OnGetCandidateAdapterNamesDone 1"));
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
// This can happen if this object is reused for multiple queries,
// and a previous query was cancelled before it completed.
@@ -207,12 +208,12 @@ void DhcpProxyScriptFetcherWin::OnGetCandidateAdapterNamesDone(
}
std::string DhcpProxyScriptFetcherWin::GetFetcherName() const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
return "win";
}
const GURL& DhcpProxyScriptFetcherWin::GetPacURL() const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
DCHECK_EQ(state_, STATE_DONE);
return pac_url_;
« no previous file with comments | « net/proxy/dhcp_proxy_script_fetcher_win.h ('k') | net/proxy/multi_threaded_proxy_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698