Chromium Code Reviews| Index: sync/android/java/src/org/chromium/sync/internal_api/pub/base/ModelType.java |
| diff --git a/sync/android/java/src/org/chromium/sync/internal_api/pub/base/ModelType.java b/sync/android/java/src/org/chromium/sync/internal_api/pub/base/ModelType.java |
| index a7d4797680fbdc301524d57ac38caa9a86aef026..028f53fc318f0885cfa3e0fa2f3b6e4a509ac30d 100644 |
| --- a/sync/android/java/src/org/chromium/sync/internal_api/pub/base/ModelType.java |
| +++ b/sync/android/java/src/org/chromium/sync/internal_api/pub/base/ModelType.java |
| @@ -63,7 +63,7 @@ public enum ModelType { |
| /** |
| * A proxy tabs object (placeholder for sessions). |
| */ |
| - PROXY_TABS("NULL"), |
| + PROXY_TABS("NULL", true), |
| /** |
| * A favicon image object. |
| */ |
| @@ -80,8 +80,15 @@ public enum ModelType { |
| private final String mModelType; |
| - ModelType(String modelType) { |
| + private final boolean mNonInvalidationType; |
| + |
| + ModelType(String modelType, boolean nonInvalidationType) { |
| mModelType = modelType; |
| + mNonInvalidationType = nonInvalidationType; |
| + } |
| + |
| + ModelType(String modelType) { |
| + this(modelType, false); |
| } |
| public ObjectId toObjectId() { |
| @@ -141,4 +148,14 @@ public enum ModelType { |
| } |
| return objectIds; |
| } |
| + |
| + public static Set<ModelType> stripNonInvalidationTypes(Set<ModelType> modelTypes) { |
|
Yaron
2013/08/08 01:52:16
Pleaes add Javadoc.
nyquist
2013/08/08 17:59:28
Removed.
|
| + Set<ModelType> result = new HashSet<ModelType>(modelTypes); |
|
Yaron
2013/08/08 01:52:16
Which a name of "strip..." it's not clear why you'
nyquist
2013/08/08 17:59:28
Removed.
|
| + for (ModelType modelType : values()) { |
| + if (modelType.mNonInvalidationType) { |
| + result.remove(modelType); |
| + } |
| + } |
| + return result; |
| + } |
| } |