Chromium Code Reviews| Index: sync/android/java/src/org/chromium/sync/signin/AccountManagerDelegate.java |
| diff --git a/sync/android/java/src/org/chromium/sync/signin/AccountManagerDelegate.java b/sync/android/java/src/org/chromium/sync/signin/AccountManagerDelegate.java |
| index cef541efe81bb7838c94cffa788e6520e6c111b2..21426f94e5763956601c2ba2f7849c385d4e1fae 100644 |
| --- a/sync/android/java/src/org/chromium/sync/signin/AccountManagerDelegate.java |
| +++ b/sync/android/java/src/org/chromium/sync/signin/AccountManagerDelegate.java |
| @@ -5,11 +5,7 @@ |
| package org.chromium.sync.signin; |
| import android.accounts.Account; |
| -import android.accounts.AccountManagerCallback; |
| -import android.accounts.AccountManagerFuture; |
| import android.accounts.AuthenticatorDescription; |
| -import android.os.Bundle; |
| -import android.os.Handler; |
| import org.chromium.base.Callback; |
| @@ -24,14 +20,31 @@ public interface AccountManagerDelegate { |
| */ |
| Account[] getAccountsByType(String type); |
| + /** |
| + * Get all the accounts for a given {@code type}. |
| + */ |
| void getAccountsByType(String type, Callback<Account[]> callback); |
| - AccountManagerFuture<Bundle> getAuthToken(Account account, String authTokenType, |
| - boolean notifyAuthFailure, AccountManagerCallback<Bundle> callback, Handler handler); |
| + /** |
| + * @param account The {@link Account} for which the auth token is requested. |
| + * @param authTokenScope The scope of the authToken being requested. |
| + * @return The auth token, if it was fetched successfully, or {@code null}. |
|
Bernhard Bauer
2015/11/20 18:55:42
Remove the "or null" part, and maybe even "if it w
knn
2015/11/23 11:35:32
Done.
|
| + * This should only be called on a background thread. |
| + */ |
| + String getAuthToken(Account account, String authTokenScope) throws AuthException; |
| + /** |
| + * Invalidate the {@code authToken} associated with account type {@code accountType}. |
| + */ |
| void invalidateAuthToken(String accountType, String authToken); |
| + /** |
| + * Get all the available authenticator types. |
| + */ |
| AuthenticatorDescription[] getAuthenticatorTypes(); |
| + /** |
| + * Check whether the {@code account} has all the features listed in {@code features}. |
| + */ |
| void hasFeatures(Account account, String[] features, Callback<Boolean> callback); |
| } |