Chromium Code Reviews| Index: sync/android/java/src/org/chromium/sync/notifier/InvalidationService.java |
| diff --git a/sync/android/java/src/org/chromium/sync/notifier/InvalidationService.java b/sync/android/java/src/org/chromium/sync/notifier/InvalidationService.java |
| index 92ac257bc703fed16bd300c08462040643cb0ffe..c9f351f8937a71bf8743096c26b0bb65a8be8679 100644 |
| --- a/sync/android/java/src/org/chromium/sync/notifier/InvalidationService.java |
| +++ b/sync/android/java/src/org/chromium/sync/notifier/InvalidationService.java |
| @@ -296,6 +296,7 @@ public class InvalidationService extends AndroidListener { |
| return Collections.emptySet(); |
| } else { |
| Set<ModelType> modelTypes = ModelType.syncTypesToModelTypes(savedTypes); |
| + modelTypes = ModelType.stripNonInvalidationTypes(modelTypes); |
| Set<ObjectId> objectIds = Sets.newHashSetWithExpectedSize(modelTypes.size()); |
|
Yaron
2013/08/08 01:52:16
These 4 lines can be replaced with ModelType.model
nyquist
2013/08/08 17:59:28
Simplified this, and moved logic to modelTypesToOb
|
| for (ModelType modelType : modelTypes) { |
| objectIds.add(modelType.toObjectId()); |
| @@ -338,6 +339,8 @@ public class InvalidationService extends AndroidListener { |
| // NOTE: syncTypes MUST NOT be used below this line, since it contains an unexpanded |
| // wildcard. |
| Set<ModelType> newRegisteredTypes = ModelType.syncTypesToModelTypes(syncTypes); |
| + // Some types should never receive notifications. |
| + newRegisteredTypes = ModelType.stripNonInvalidationTypes(newRegisteredTypes); |
| List<ObjectId> unregistrations = Lists.newArrayList(); |
| List<ObjectId> registrations = Lists.newArrayList(); |