Chromium Code Reviews| 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 71fe1c3b684c752705b2089b178ef77ef6c1e1ac..224f4434a6b64a7bc7c18ab7c5e6e640aabe61b4 100644 |
| --- a/chrome/browser/signin/android_profile_oauth2_token_service.cc |
| +++ b/chrome/browser/signin/android_profile_oauth2_token_service.cc |
| @@ -181,6 +181,23 @@ void AndroidProfileOAuth2TokenService::ValidateAccounts( |
| // Currently signed in account still exists among accounts on system. |
| std::vector<std::string> ids = GetAccounts(); |
|
Roger Tawa OOO till Jul 10th
2014/03/27 15:46:45
In what cases is |ids| going to be different from
acleung1
2014/03/27 21:09:54
Good catch. It's a mistake from previous CL. Was g
|
| + // Test to see if we an account is removed from the Android AccountManager. |
|
Roger Tawa OOO till Jul 10th
2014/03/27 15:46:45
Remove "if we" ?
acleung1
2014/03/27 21:09:54
Done.
|
| + // If so, invoke FireRefreshTokenRevoked to notify the reconcilor. |
| + for (std::vector<std::string>::iterator it = current_accounts_.begin(); |
| + it != current_accounts_.end(); it++) { |
|
Roger Tawa OOO till Jul 10th
2014/03/27 15:46:45
Indent one more.
acleung1
2014/03/27 21:09:54
Done.
|
| + if (*it == signed_in_account) |
| + continue; |
| + |
| + if (std::find(account_ids.begin(), |
| + account_ids.end(), |
| + *it) == account_ids.end()) { |
| + FireRefreshTokenRevoked(*it); |
| + } |
| + } |
| + |
| + current_accounts_.clear(); |
| + current_accounts_.push_back(signed_in_account); |
| + |
| // Always fire the primary signed in account first. |
| FireRefreshTokenAvailable(signed_in_account); |
| @@ -188,6 +205,7 @@ void AndroidProfileOAuth2TokenService::ValidateAccounts( |
| it != ids.end(); it++) { |
| if (*it != signed_in_account) { |
| FireRefreshTokenAvailable(*it); |
| + current_accounts_.push_back(*it); |
| } |
| } |
| } else { |