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

Unified Diff: components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java

Issue 2810863003: Android: Remove GetApplicationContext: components/ (Closed)
Patch Set: Fix tests Created 3 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
« no previous file with comments | « no previous file | components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GoogleCloudMessagingV2.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java
diff --git a/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java b/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java
index b914c9bdbf073654e5d8b3f2f386d5f3d8a83932..7a1a04523163fe488a95b9305c9d4c3efa4f8a40 100644
--- a/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java
+++ b/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java
@@ -4,7 +4,6 @@
package org.chromium.components.gcm_driver;
-import android.content.Context;
import android.os.AsyncTask;
import org.chromium.base.Log;
@@ -30,29 +29,25 @@ public class GCMDriver {
private static GCMDriver sInstance;
private long mNativeGCMDriverAndroid;
- private final Context mContext;
private GoogleCloudMessagingSubscriber mSubscriber;
- private GCMDriver(long nativeGCMDriverAndroid, Context context) {
+ private GCMDriver(long nativeGCMDriverAndroid) {
mNativeGCMDriverAndroid = nativeGCMDriverAndroid;
- mContext = context;
- mSubscriber = new GoogleCloudMessagingV2(context);
+ mSubscriber = new GoogleCloudMessagingV2();
}
/**
* Create a GCMDriver object, which is owned by GCMDriverAndroid
* on the C++ side.
+ * @param nativeGCMDriverAndroid The C++ object that owns us.
*
- * @param nativeGCMDriverAndroid The C++ object that owns us.
- * @param context The app context.
*/
@CalledByNative
- private static GCMDriver create(long nativeGCMDriverAndroid,
- Context context) {
+ private static GCMDriver create(long nativeGCMDriverAndroid) {
if (sInstance != null) {
throw new IllegalStateException("Already instantiated");
}
- sInstance = new GCMDriver(nativeGCMDriverAndroid, context);
+ sInstance = new GCMDriver(nativeGCMDriverAndroid);
return sInstance;
}
« no previous file with comments | « no previous file | components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GoogleCloudMessagingV2.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698