Chromium Code Reviews| Index: chrome/browser/ui/auto_login_prompter.cc |
| diff --git a/chrome/browser/ui/auto_login_prompter.cc b/chrome/browser/ui/auto_login_prompter.cc |
| index 9d9bff0c2c683bee7668e119e510d0f256dc0121..3e1ddb85b253d2ed72e5cff5a30bd5dc2f10546b 100644 |
| --- a/chrome/browser/ui/auto_login_prompter.cc |
| +++ b/chrome/browser/ui/auto_login_prompter.cc |
| @@ -31,16 +31,17 @@ namespace { |
| bool FetchUsernameThroughSigninManager(Profile* profile, std::string* output) { |
| // In an incognito window these services are not available. |
| - ProfileOAuth2TokenService* token_service = |
| - ProfileOAuth2TokenServiceFactory::GetForProfile(profile); |
| - if (!token_service || !token_service->RefreshTokenIsAvailable()) |
| - return false; |
| - |
| SigninManagerBase* signin_manager = |
| SigninManagerFactory::GetInstance()->GetForProfile(profile); |
| if (!signin_manager) |
| return false; |
| + ProfileOAuth2TokenService* token_service = |
| + ProfileOAuth2TokenServiceFactory::GetForProfile(profile); |
| + if (!token_service || !token_service->RefreshTokenIsAvailable( |
| + signin_manager->GetAuthenticatedUsername())) |
|
Andrew T Wilson (Slow)
2013/08/23 09:38:13
Still unsure about mixing GetAuthenticatedUsername
fgorski
2013/08/23 19:13:35
Done. That one was a mistake.
|
| + return false; |
| + |
| *output = signin_manager->GetAuthenticatedUsername(); |
| return true; |
| } |