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

Unified Diff: components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/FakeGoogleCloudMessagingSubscriber.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: Rebase (main conflics in browsertest and PMMF) Created 4 years, 7 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/android/java/src/org/chromium/components/gcm_driver/FakeGoogleCloudMessagingSubscriber.java
diff --git a/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/FakeGoogleCloudMessagingSubscriber.java b/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/FakeGoogleCloudMessagingSubscriber.java
deleted file mode 100644
index 8085b4bc983c958d6c92d5fca52f7975e838f76a..0000000000000000000000000000000000000000
--- a/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/FakeGoogleCloudMessagingSubscriber.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.components.gcm_driver;
-
-import android.os.Bundle;
-
-import org.chromium.base.VisibleForTesting;
-
-import java.io.IOException;
-
-import javax.annotation.Nullable;
-
-/**
- * A fake subscriber for test purposes.
- */
-public class FakeGoogleCloudMessagingSubscriber implements GoogleCloudMessagingSubscriber {
- private static final String FAKE_REGISTRATION_ID = "FAKE_REGISTRATION_ID";
- private String mLastSubscribeSource;
- private String mLastSubscribeSubtype;
-
- @Override
- public String subscribe(String source, String subtype, @Nullable Bundle data)
- throws IOException {
- mLastSubscribeSource = source;
- mLastSubscribeSubtype = subtype;
- return FAKE_REGISTRATION_ID;
- }
-
- @Override
- public void unsubscribe(String source, String subtype, @Nullable Bundle data)
- throws IOException {
- // No need to do anything here yet.
- }
-
- /**
- * The source (sender id) passed to #subscribe the last time it was called, or null if it was
- * never called.
- */
- @Nullable
- @VisibleForTesting
- public String getLastSubscribeSource() {
- return mLastSubscribeSource;
- }
-
- /**
- * The subtype (app id) passed to #subscribe the last time it was called, or null if it was
- * never called.
- */
- @Nullable
- @VisibleForTesting
- public String getLastSubscribeSubtype() {
- return mLastSubscribeSubtype;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698