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

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

Issue 2800833003: Revert of Android: Remove GetApplicationContext part 2 (Closed)
Patch Set: 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 c5694d8a02e5d2585fcb356740326d89b70cacdd..3e244011ba17b42e9286905ac224b3b447270332 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,8 +242,7 @@
@Override
public void requestAuthToken(final PendingIntent pendingIntent,
@Nullable String invalidAuthToken) {
- @Nullable
- Account account = ChromeSigninController.get().getSignedInUser();
+ @Nullable Account account = ChromeSigninController.get(this).getSignedInUser();
if (account == null) {
// This should never happen, because this code should only be run if a user is
// signed-in.
@@ -253,7 +252,7 @@
// Attempt to retrieve a token for the user. This method will also invalidate
// invalidAuthToken if it is non-null.
- AccountManagerHelper.get().getNewAuthToken(account, invalidAuthToken,
+ AccountManagerHelper.get(this).getNewAuthToken(account, invalidAuthToken,
getOAuth2ScopeWithType(), new AccountManagerHelper.GetAuthTokenCallback() {
@Override
public void tokenAvailable(String token) {
@@ -479,7 +478,7 @@
}
Bundle bundle =
PendingInvalidation.createBundle(objectName, objectSource, version, payload);
- Account account = ChromeSigninController.get().getSignedInUser();
+ Account account = ChromeSigninController.get(this).getSignedInUser();
String contractAuthority = AndroidSyncSettings.getContractAuthority(this);
requestSyncFromContentResolver(bundle, account, contractAuthority);
}

Powered by Google App Engine
This is Rietveld 408576698