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

Unified Diff: net/cert/multi_threaded_cert_verifier.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/cert/multi_threaded_cert_verifier.h ('k') | net/dns/address_sorter_posix.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/multi_threaded_cert_verifier.cc
diff --git a/net/cert/multi_threaded_cert_verifier.cc b/net/cert/multi_threaded_cert_verifier.cc
index 8312d413933473f0cd3345b79a527734223d7db3..567edc202c18a3447a9dbb270cefea1596140a0f 100644
--- a/net/cert/multi_threaded_cert_verifier.cc
+++ b/net/cert/multi_threaded_cert_verifier.cc
@@ -345,6 +345,7 @@ MultiThreadedCertVerifier::MultiThreadedCertVerifier(
: requests_(0), inflight_joins_(0), verify_proc_(verify_proc) {}
MultiThreadedCertVerifier::~MultiThreadedCertVerifier() {
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
}
int MultiThreadedCertVerifier::Verify(const RequestParams& params,
@@ -355,7 +356,7 @@ int MultiThreadedCertVerifier::Verify(const RequestParams& params,
const NetLogWithSource& net_log) {
out_req->reset();
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
if (callback.is_null() || !verify_result || params.hostname().empty())
return ERR_INVALID_ARGUMENT;
@@ -404,7 +405,7 @@ bool MultiThreadedCertVerifier::JobComparator::operator()(
std::unique_ptr<CertVerifierJob> MultiThreadedCertVerifier::RemoveJob(
CertVerifierJob* job) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
auto it = inflight_.find(job);
DCHECK(it != inflight_.end());
std::unique_ptr<CertVerifierJob> job_ptr = std::move(it->second);
@@ -421,7 +422,7 @@ struct MultiThreadedCertVerifier::JobToRequestParamsComparator {
};
CertVerifierJob* MultiThreadedCertVerifier::FindJob(const RequestParams& key) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
// The JobSet is kept in sorted order so items can be found using binary
// search.
« no previous file with comments | « net/cert/multi_threaded_cert_verifier.h ('k') | net/dns/address_sorter_posix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698