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

Unified Diff: chrome/browser/signin/android_profile_oauth2_token_service.cc

Issue 63253003: Fix issues with token refresh in AccountReconcilor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove the event Created 7 years, 1 month 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/browser/signin/android_profile_oauth2_token_service.cc
diff --git a/chrome/browser/signin/android_profile_oauth2_token_service.cc b/chrome/browser/signin/android_profile_oauth2_token_service.cc
index 60d378d5fa6deeecdb72e5778147f4799f5fd72f..a5be48a7216ccbb0345d63afff9be9ada46d34dd 100644
--- a/chrome/browser/signin/android_profile_oauth2_token_service.cc
+++ b/chrome/browser/signin/android_profile_oauth2_token_service.cc
@@ -167,7 +167,17 @@ void AndroidProfileOAuth2TokenService::ValidateAccounts(JNIEnv* env,
account_ids.end(),
signed_in_account) != account_ids.end()) {
// Currently signed in account still exists among accounts on system.
+ std::vector<std::string> ids = GetAccounts();
+
+ // Always fire the primary signed in account first.
FireRefreshTokenAvailable(signed_in_account);
Roger Tawa OOO till Jul 10th 2013/11/21 16:02:32 Why is it important to fire the primary account fi
acleung1 2013/11/26 09:28:31 Because that becomes the first account in the gaia
Roger Tawa OOO till Jul 10th 2013/11/27 18:45:43 No, you are correct Alan.
+
+ for (std::vector<std::string>::iterator it = ids.begin();
+ it != ids.end(); it++) {
+ if (*it != signed_in_account) {
+ FireRefreshTokenAvailable(*it);
+ }
+ }
} else {
// Currently signed in account does not any longer exist among accounts on
// system.

Powered by Google App Engine
This is Rietveld 408576698