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

Unified Diff: components/invalidation/impl/ticl_invalidation_service.cc

Issue 2909113002: Deprecate NonThreadSafe in components/invalidation in favor of SequenceChecker. (Closed)
Patch Set: 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 | « components/invalidation/impl/ticl_invalidation_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/invalidation/impl/ticl_invalidation_service.cc
diff --git a/components/invalidation/impl/ticl_invalidation_service.cc b/components/invalidation/impl/ticl_invalidation_service.cc
index 11a8e20b6570c40c1d7dae6577e8466febca450a..9d131122f97a078410dd294c2a1012d103a13843 100644
--- a/components/invalidation/impl/ticl_invalidation_service.cc
+++ b/components/invalidation/impl/ticl_invalidation_service.cc
@@ -73,7 +73,7 @@ TiclInvalidationService::TiclInvalidationService(
logger_() {}
TiclInvalidationService::~TiclInvalidationService() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
invalidator_registrar_->UpdateInvalidatorState(
syncer::INVALIDATOR_SHUTTING_DOWN);
settings_provider_->RemoveObserver(this);
@@ -87,7 +87,7 @@ TiclInvalidationService::~TiclInvalidationService() {
void TiclInvalidationService::Init(
std::unique_ptr<syncer::InvalidationStateTracker>
invalidation_state_tracker) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
invalidation_state_tracker_ = std::move(invalidation_state_tracker);
if (invalidation_state_tracker_->GetInvalidatorClientId().empty()) {
@@ -122,7 +122,7 @@ void TiclInvalidationService::InitForTest(
void TiclInvalidationService::RegisterInvalidationHandler(
syncer::InvalidationHandler* handler) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DVLOG(2) << "Registering an invalidation handler";
invalidator_registrar_->RegisterHandler(handler);
logger_.OnRegistration(handler->GetOwnerName());
@@ -131,7 +131,7 @@ void TiclInvalidationService::RegisterInvalidationHandler(
bool TiclInvalidationService::UpdateRegisteredInvalidationIds(
syncer::InvalidationHandler* handler,
const syncer::ObjectIdSet& ids) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DVLOG(2) << "Registering ids: " << ids.size();
if (!invalidator_registrar_->UpdateRegisteredIds(handler, ids))
return false;
@@ -145,7 +145,7 @@ bool TiclInvalidationService::UpdateRegisteredInvalidationIds(
void TiclInvalidationService::UnregisterInvalidationHandler(
syncer::InvalidationHandler* handler) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DVLOG(2) << "Unregistering";
invalidator_registrar_->UnregisterHandler(handler);
if (invalidator_) {
@@ -156,7 +156,7 @@ void TiclInvalidationService::UnregisterInvalidationHandler(
}
syncer::InvalidatorState TiclInvalidationService::GetInvalidatorState() const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (invalidator_) {
DVLOG(2) << "GetInvalidatorState returning "
<< invalidator_->GetInvalidatorState();
@@ -168,7 +168,7 @@ syncer::InvalidatorState TiclInvalidationService::GetInvalidatorState() const {
}
std::string TiclInvalidationService::GetInvalidatorClientId() const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
return invalidation_state_tracker_->GetInvalidatorClientId();
}
@@ -349,7 +349,7 @@ bool TiclInvalidationService::IsStarted() const {
void TiclInvalidationService::StartInvalidator(
InvalidationNetworkChannel network_channel) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(!invalidator_);
DCHECK(invalidation_state_tracker_);
DCHECK(!invalidation_state_tracker_->GetInvalidatorClientId().empty());
« no previous file with comments | « components/invalidation/impl/ticl_invalidation_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698