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

Unified Diff: sync/android/java/src/org/chromium/sync/notifier/InvalidationController.java

Issue 22642004: Ensure we never try to register for the object id "NULL" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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: sync/android/java/src/org/chromium/sync/notifier/InvalidationController.java
diff --git a/sync/android/java/src/org/chromium/sync/notifier/InvalidationController.java b/sync/android/java/src/org/chromium/sync/notifier/InvalidationController.java
index b912599eab3220afa2ad6056d2880f2e52cbeb24..fde5cb1e336fc774aaa8e53f5aff5ba3322c91fc 100644
--- a/sync/android/java/src/org/chromium/sync/notifier/InvalidationController.java
+++ b/sync/android/java/src/org/chromium/sync/notifier/InvalidationController.java
@@ -100,9 +100,8 @@ public class InvalidationController implements ActivityStatus.StateListener {
* @param types Set of types for which to register. Ignored if {@code allTypes == true}.
*/
public void setRegisteredTypes(Account account, boolean allTypes, Set<ModelType> types) {
- Set<ModelType> typesToRegister = types;
- // Proxy types should never receive notifications.
- typesToRegister.remove(ModelType.PROXY_TABS);
+ // Some types should never receive notifications.
+ Set<ModelType> typesToRegister = ModelType.stripNonInvalidationTypes(types);
Intent registerIntent = IntentProtocol.createRegisterIntent(account, allTypes,
typesToRegister);
registerIntent.setClass(mContext, InvalidationService.class);

Powered by Google App Engine
This is Rietveld 408576698