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

Unified Diff: components/invalidation/impl/invalidation_notifier.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
Index: components/invalidation/impl/invalidation_notifier.cc
diff --git a/components/invalidation/impl/invalidation_notifier.cc b/components/invalidation/impl/invalidation_notifier.cc
index d791545a3276a7e0bc0b136478f0b3b20634fedd..cde561650d8f95cfbc34494a9dd02fa945c55627 100644
--- a/components/invalidation/impl/invalidation_notifier.cc
+++ b/components/invalidation/impl/invalidation_notifier.cc
@@ -36,17 +36,17 @@ InvalidationNotifier::InvalidationNotifier(
invalidation_listener_(std::move(network_channel)) {}
InvalidationNotifier::~InvalidationNotifier() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
}
void InvalidationNotifier::RegisterHandler(InvalidationHandler* handler) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
registrar_.RegisterHandler(handler);
}
bool InvalidationNotifier::UpdateRegisteredIds(InvalidationHandler* handler,
const ObjectIdSet& ids) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (!registrar_.UpdateRegisteredIds(handler, ids))
return false;
invalidation_listener_.UpdateRegisteredIds(registrar_.GetAllRegisteredIds());
@@ -54,12 +54,12 @@ bool InvalidationNotifier::UpdateRegisteredIds(InvalidationHandler* handler,
}
void InvalidationNotifier::UnregisterHandler(InvalidationHandler* handler) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
registrar_.UnregisterHandler(handler);
}
InvalidatorState InvalidationNotifier::GetInvalidatorState() const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
return registrar_.GetInvalidatorState();
}
@@ -82,18 +82,18 @@ void InvalidationNotifier::UpdateCredentials(
void InvalidationNotifier::RequestDetailedStatus(
base::Callback<void(const base::DictionaryValue&)> callback) const {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
invalidation_listener_.RequestDetailedStatus(callback);
}
void InvalidationNotifier::OnInvalidate(
const ObjectIdInvalidationMap& invalidation_map) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
registrar_.DispatchInvalidationsToHandlers(invalidation_map);
}
void InvalidationNotifier::OnInvalidatorStateChange(InvalidatorState state) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
registrar_.UpdateInvalidatorState(state);
}
« no previous file with comments | « components/invalidation/impl/invalidation_notifier.h ('k') | components/invalidation/impl/invalidation_service_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698