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

Unified Diff: components/invalidation/invalidation_notifier.cc

Issue 1146533005: [Sync] InvalidationService shouldn't CHECK when registering ObjectId for more than one handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments from Bartosz. Created 5 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/invalidation_notifier.h ('k') | components/invalidation/invalidation_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/invalidation/invalidation_notifier.cc
diff --git a/components/invalidation/invalidation_notifier.cc b/components/invalidation/invalidation_notifier.cc
index 2319eef4f1c669d7a9c415f2cfb69f3f7e8a5520..e50dea64fd4fbd6d304ae2f1019943096987a4f9 100644
--- a/components/invalidation/invalidation_notifier.cc
+++ b/components/invalidation/invalidation_notifier.cc
@@ -44,11 +44,13 @@ void InvalidationNotifier::RegisterHandler(InvalidationHandler* handler) {
registrar_.RegisterHandler(handler);
}
-void InvalidationNotifier::UpdateRegisteredIds(InvalidationHandler* handler,
+bool InvalidationNotifier::UpdateRegisteredIds(InvalidationHandler* handler,
const ObjectIdSet& ids) {
DCHECK(CalledOnValidThread());
- registrar_.UpdateRegisteredIds(handler, ids);
+ if (!registrar_.UpdateRegisteredIds(handler, ids))
+ return false;
invalidation_listener_.UpdateRegisteredIds(registrar_.GetAllRegisteredIds());
+ return true;
}
void InvalidationNotifier::UnregisterHandler(InvalidationHandler* handler) {
« no previous file with comments | « components/invalidation/invalidation_notifier.h ('k') | components/invalidation/invalidation_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698