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

Unified Diff: components/gcm_driver/instance_id/android/javatests/src/org/chromium/components/gcm_driver/instance_id/FakeInstanceIDWithSubtype.java

Issue 1851423003: Make Web Push use InstanceID tokens instead of GCM registrations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid4default
Patch Set: Address review comments, and rewrite following rebase (e.g. no longer depends on NestedMessagePumpA… Created 4 years, 8 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/gcm_driver/instance_id/android/javatests/src/org/chromium/components/gcm_driver/instance_id/FakeInstanceIDWithSubtype.java
diff --git a/components/gcm_driver/instance_id/android/javatests/src/org/chromium/components/gcm_driver/instance_id/FakeInstanceIDWithSubtype.java b/components/gcm_driver/instance_id/android/javatests/src/org/chromium/components/gcm_driver/instance_id/FakeInstanceIDWithSubtype.java
index adb69823443786366718ac14b0c38678bfc7c6d9..90069e6e6865aac7bd839f8325a95b2c3916f9c8 100644
--- a/components/gcm_driver/instance_id/android/javatests/src/org/chromium/components/gcm_driver/instance_id/FakeInstanceIDWithSubtype.java
+++ b/components/gcm_driver/instance_id/android/javatests/src/org/chromium/components/gcm_driver/instance_id/FakeInstanceIDWithSubtype.java
@@ -10,6 +10,7 @@ import android.os.Looper;
import com.google.android.gms.iid.InstanceID;
+import org.chromium.base.VisibleForTesting;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
@@ -27,7 +28,10 @@ import java.util.Random;
public class FakeInstanceIDWithSubtype extends InstanceIDWithSubtype {
private String mId = null;
private long mCreationTime = 0;
- private Map<String, String> mTokens = new HashMap<>();
+
+ /** Map from (subtype + ',' + authorizedEntity + ',' + scope) to token. */
+ @VisibleForTesting
+ public Map<String, String> mTokens = new HashMap<>();
/**
* Enable this in all InstanceID tests to use this fake instead of hitting the network/disk.

Powered by Google App Engine
This is Rietveld 408576698