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

Side by Side Diff: sync/android/java/src/org/chromium/sync/signin/AccountManagerHelper.java

Issue 12880014: Get OAuth2TokenService working on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable unit test on Android -- it doesn't make sense. Created 7 years, 9 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 unified diff | Download patch
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.sync.signin; 5 package org.chromium.sync.signin;
6 6
7 7
8 import com.google.common.annotations.VisibleForTesting; 8 import com.google.common.annotations.VisibleForTesting;
9 9
10 import android.accounts.Account; 10 import android.accounts.Account;
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 public void getNewAuthTokenFromForeground(Account account, String authToken, 299 public void getNewAuthTokenFromForeground(Account account, String authToken,
300 String authTokenType, GetAuthTokenCallback callback) { 300 String authTokenType, GetAuthTokenCallback callback) {
301 if (authToken != null && !authToken.isEmpty()) { 301 if (authToken != null && !authToken.isEmpty()) {
302 mAccountManager.invalidateAuthToken(GOOGLE_ACCOUNT_TYPE, authToken); 302 mAccountManager.invalidateAuthToken(GOOGLE_ACCOUNT_TYPE, authToken);
303 } 303 }
304 AtomicInteger numTries = new AtomicInteger(0); 304 AtomicInteger numTries = new AtomicInteger(0);
305 AtomicBoolean errorEncountered = new AtomicBoolean(false); 305 AtomicBoolean errorEncountered = new AtomicBoolean(false);
306 getAuthTokenAsynchronously( 306 getAuthTokenAsynchronously(
307 null, account, authTokenType, callback, numTries, errorEncountered, null); 307 null, account, authTokenType, callback, numTries, errorEncountered, null);
308 } 308 }
309
310 /**
311 * Removes an auth token from the AccountManager's cache.
312 */
313 public void invalidateAuthToken(String accountType, String authToken) {
314 mAccountManager.invalidateAuthToken(accountType, authToken);
315 }
309 } 316 }
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698