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..db557daf21de67a84489d8faa82745b356e7393a 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( |
| + token_service->GetPrimaryAccountId())) |
| + return false; |
|
Roger Tawa OOO till Jul 10th
2013/08/26 21:04:53
Need { and } since condition spans more than one l
fgorski
2013/08/26 23:30:54
Done.
|
| + |
| *output = signin_manager->GetAuthenticatedUsername(); |
| return true; |
| } |