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

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

Issue 1247853007: [Sync] Add auto-generated ModelType in Java. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add SYNC_EXPORT and rebase. Created 5 years, 5 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/InvalidationIntentProtocol.java
diff --git a/sync/android/java/src/org/chromium/sync/notifier/InvalidationIntentProtocol.java b/sync/android/java/src/org/chromium/sync/notifier/InvalidationIntentProtocol.java
index e0692047c9344555d9c7aa696a84de435d0017f1..7234ce98f75ed9c9ffff9a9a6ce5b7db510150c8 100644
--- a/sync/android/java/src/org/chromium/sync/notifier/InvalidationIntentProtocol.java
+++ b/sync/android/java/src/org/chromium/sync/notifier/InvalidationIntentProtocol.java
@@ -11,7 +11,7 @@ import com.google.ipc.invalidation.external.client.types.ObjectId;
import com.google.protos.ipc.invalidation.Types;
import org.chromium.base.CollectionUtil;
-import org.chromium.sync.internal_api.pub.base.ModelType;
+import org.chromium.sync.ModelTypeHelper;
import java.util.ArrayList;
import java.util.HashSet;
@@ -59,12 +59,12 @@ public class InvalidationIntentProtocol {
* Create an Intent that will start the invalidation listener service and
* register for the specified types.
*/
- public static Intent createRegisterIntent(Account account, Set<ModelType> types) {
+ public static Intent createRegisterIntent(Account account, Set<Integer> types) {
Intent registerIntent = new Intent(ACTION_REGISTER);
String[] selectedTypesArray = new String[types.size()];
int pos = 0;
- for (ModelType type : types) {
- selectedTypesArray[pos++] = type.name();
+ for (Integer type : types) {
+ selectedTypesArray[pos++] = ModelTypeHelper.toString(type);
}
registerIntent.putStringArrayListExtra(EXTRA_REGISTERED_TYPES,
CollectionUtil.newArrayList(selectedTypesArray));

Powered by Google App Engine
This is Rietveld 408576698