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

Unified Diff: components/invalidation/impl/android/java/src/org/chromium/components/invalidation/InvalidationClientService.java

Issue 2784353002: Android: Remove GetApplicationContext part 2 (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
Index: components/invalidation/impl/android/java/src/org/chromium/components/invalidation/InvalidationClientService.java
diff --git a/components/invalidation/impl/android/java/src/org/chromium/components/invalidation/InvalidationClientService.java b/components/invalidation/impl/android/java/src/org/chromium/components/invalidation/InvalidationClientService.java
index 3e244011ba17b42e9286905ac224b3b447270332..c5694d8a02e5d2585fcb356740326d89b70cacdd 100644
--- a/components/invalidation/impl/android/java/src/org/chromium/components/invalidation/InvalidationClientService.java
+++ b/components/invalidation/impl/android/java/src/org/chromium/components/invalidation/InvalidationClientService.java
@@ -242,7 +242,8 @@ public class InvalidationClientService extends AndroidListener {
@Override
public void requestAuthToken(final PendingIntent pendingIntent,
@Nullable String invalidAuthToken) {
- @Nullable Account account = ChromeSigninController.get(this).getSignedInUser();
+ @Nullable
+ Account account = ChromeSigninController.get().getSignedInUser();
if (account == null) {
// This should never happen, because this code should only be run if a user is
// signed-in.
@@ -252,7 +253,7 @@ public class InvalidationClientService extends AndroidListener {
// Attempt to retrieve a token for the user. This method will also invalidate
// invalidAuthToken if it is non-null.
- AccountManagerHelper.get(this).getNewAuthToken(account, invalidAuthToken,
+ AccountManagerHelper.get().getNewAuthToken(account, invalidAuthToken,
getOAuth2ScopeWithType(), new AccountManagerHelper.GetAuthTokenCallback() {
@Override
public void tokenAvailable(String token) {
@@ -478,7 +479,7 @@ public class InvalidationClientService extends AndroidListener {
}
Bundle bundle =
PendingInvalidation.createBundle(objectName, objectSource, version, payload);
- Account account = ChromeSigninController.get(this).getSignedInUser();
+ Account account = ChromeSigninController.get().getSignedInUser();
String contractAuthority = AndroidSyncSettings.getContractAuthority(this);
requestSyncFromContentResolver(bundle, account, contractAuthority);
}

Powered by Google App Engine
This is Rietveld 408576698