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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.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: chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java b/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java
index 6fa8aa04defbec0f9afdca6c4b89cfe93bc9110b..c3c9262e2bfdc2761175f32f520e20d17da84b1a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java
@@ -9,7 +9,6 @@ import android.app.Activity;
import android.content.Context;
import org.chromium.base.Callback;
-import org.chromium.base.ContextUtils;
import org.chromium.base.ThreadUtils;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.components.signin.AccountManagerHelper;
@@ -42,7 +41,7 @@ public class ChildAccountService {
*/
public static void checkHasChildAccount(Context context, final Callback<Boolean> callback) {
ThreadUtils.assertOnUiThread();
- final AccountManagerHelper helper = AccountManagerHelper.get(context);
+ final AccountManagerHelper helper = AccountManagerHelper.get();
helper.getGoogleAccounts(new Callback<Account[]>() {
@Override
public void onResult(Account[] accounts) {
@@ -90,13 +89,12 @@ public class ChildAccountService {
}
Account account = AccountManagerHelper.createAccountFromName(accountName);
- AccountManagerHelper.get(ContextUtils.getApplicationContext())
- .updateCredentials(account, activity, new Callback<Boolean>() {
- @Override
- public void onResult(Boolean result) {
- nativeOnReauthenticationResult(nativeCallback, result);
- }
- });
+ AccountManagerHelper.get().updateCredentials(account, activity, new Callback<Boolean>() {
+ @Override
+ public void onResult(Boolean result) {
+ nativeOnReauthenticationResult(nativeCallback, result);
+ }
+ });
}
private static native boolean nativeIsChildAccount();

Powered by Google App Engine
This is Rietveld 408576698