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

Unified Diff: components/invalidation/non_blocking_invalidator.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
Index: components/invalidation/non_blocking_invalidator.cc
diff --git a/components/invalidation/non_blocking_invalidator.cc b/components/invalidation/non_blocking_invalidator.cc
index 417a84cb82afe361b5407355fc0e483fb4fcfb8e..e438360f9193de12affdec30d56fbda97937629e 100644
--- a/components/invalidation/non_blocking_invalidator.cc
+++ b/components/invalidation/non_blocking_invalidator.cc
@@ -274,10 +274,11 @@ void NonBlockingInvalidator::RegisterHandler(InvalidationHandler* handler) {
registrar_.RegisterHandler(handler);
}
-void NonBlockingInvalidator::UpdateRegisteredIds(InvalidationHandler* handler,
+bool NonBlockingInvalidator::UpdateRegisteredIds(InvalidationHandler* handler,
const ObjectIdSet& ids) {
DCHECK(parent_task_runner_->BelongsToCurrentThread());
- registrar_.UpdateRegisteredIds(handler, ids);
+ if (!registrar_.UpdateRegisteredIds(handler, ids))
+ return false;
if (!network_task_runner_->PostTask(
FROM_HERE,
base::Bind(
@@ -286,6 +287,7 @@ void NonBlockingInvalidator::UpdateRegisteredIds(InvalidationHandler* handler,
registrar_.GetAllRegisteredIds()))) {
NOTREACHED();
}
+ return true;
}
void NonBlockingInvalidator::UnregisterHandler(InvalidationHandler* handler) {
« no previous file with comments | « components/invalidation/non_blocking_invalidator.h ('k') | components/invalidation/p2p_invalidation_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698