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

Unified Diff: net/ssl/channel_id_service.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
Index: net/ssl/channel_id_service.cc
diff --git a/net/ssl/channel_id_service.cc b/net/ssl/channel_id_service.cc
index 2be6a6bd776b799cd57f1cbec3ca8bcc6f58e37a..18567ef73b8569dad91e7c0cf604ca70dc37d1fa 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_SEQUENCE(sequence_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_SEQUENCE(sequence_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_SEQUENCE(sequence_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_SEQUENCE(sequence_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_SEQUENCE(sequence_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_SEQUENCE(sequence_checker_);
auto j = inflight_.find(server_identifier);
if (j == inflight_.end()) {

Powered by Google App Engine
This is Rietveld 408576698