Chromium Code Reviews| Index: chrome/browser/signin/profile_oauth2_token_service.cc |
| diff --git a/chrome/browser/signin/profile_oauth2_token_service.cc b/chrome/browser/signin/profile_oauth2_token_service.cc |
| index 6c00938c6acde13cdb628931cba2d4e0ba0954c3..e61269ccc26fc18e8937be523441c14294d55bfe 100644 |
| --- a/chrome/browser/signin/profile_oauth2_token_service.cc |
| +++ b/chrome/browser/signin/profile_oauth2_token_service.cc |
| @@ -152,6 +152,14 @@ void ProfileOAuth2TokenService::Observe( |
| break; |
| } |
| case chrome::NOTIFICATION_TOKEN_LOADING_FINISHED: |
| + // During startup, if the OAuth2 refresh token is empty, flag it as an |
| + // error by badging the menu. Otherwise, if a signed in user tries to set |
| + // up sync, they will have to make two attempts: One to surface the OAuth2 |
| + // error, and a second one after they've signed in. See crbug.com/276650. |
| + if (GetRefreshToken().empty()) { |
|
Andrew T Wilson (Slow)
2013/08/22 10:29:09
I think we probably only want to do this if the us
Raghu Simha
2013/08/22 17:48:50
From what I've seen, we enter this observer only w
|
| + UpdateAuthError(GoogleServiceAuthError( |
| + GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS)); |
| + } |
| FireRefreshTokensLoaded(); |
| break; |
| default: |