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

Unified Diff: net/ssl/channel_id_service.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/ssl/channel_id_service.h ('k') | net/ssl/channel_id_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/channel_id_service.cc
diff --git a/net/ssl/channel_id_service.cc b/net/ssl/channel_id_service.cc
index 8aa37328d10d06aedc7dc08f626f06131342d84f..860ba7844b2058eccc7d1298edccfd9c7414847e 100644
--- a/net/ssl/channel_id_service.cc
+++ b/net/ssl/channel_id_service.cc
@@ -261,6 +261,7 @@ ChannelIDService::ChannelIDService(ChannelIDStore* channel_id_store)
weak_ptr_factory_(this) {}
ChannelIDService::~ChannelIDService() {
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
}
// static
@@ -279,7 +280,7 @@ int ChannelIDService::GetOrCreateChannelID(
const CompletionCallback& callback,
Request* out_req) {
DVLOG(1) << __func__ << " " << host;
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
if (callback.is_null() || !key || host.empty()) {
RecordGetChannelIDResult(INVALID_ARGUMENT);
@@ -328,7 +329,7 @@ int ChannelIDService::GetChannelID(const std::string& host,
const CompletionCallback& callback,
Request* out_req) {
DVLOG(1) << __func__ << " " << host;
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
if (callback.is_null() || !key || host.empty()) {
RecordGetChannelIDResult(INVALID_ARGUMENT);
@@ -357,7 +358,7 @@ int ChannelIDService::GetChannelID(const std::string& host,
void ChannelIDService::GotChannelID(int err,
const std::string& server_identifier,
std::unique_ptr<crypto::ECPrivateKey> key) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
auto j = inflight_.find(server_identifier);
if (j == inflight_.end()) {
@@ -397,7 +398,7 @@ void ChannelIDService::GeneratedChannelID(
const std::string& server_identifier,
int error,
std::unique_ptr<ChannelIDStore::ChannelID> channel_id) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
std::unique_ptr<crypto::ECPrivateKey> key;
if (error == OK) {
@@ -410,7 +411,7 @@ void ChannelIDService::GeneratedChannelID(
void ChannelIDService::HandleResult(int error,
const std::string& server_identifier,
std::unique_ptr<crypto::ECPrivateKey> key) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
auto j = inflight_.find(server_identifier);
if (j == inflight_.end()) {
« no previous file with comments | « net/ssl/channel_id_service.h ('k') | net/ssl/channel_id_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698