Chromium Code Reviews| Index: chrome/browser/extensions/api/identity/identity_api.cc | 
| diff --git a/chrome/browser/extensions/api/identity/identity_api.cc b/chrome/browser/extensions/api/identity/identity_api.cc | 
| index 485711e8be8eebae06df1ae73b4a274d067a56d3..2eabaae44e67e703c3905435b0e8fae8d07e8277 100644 | 
| --- a/chrome/browser/extensions/api/identity/identity_api.cc | 
| +++ b/chrome/browser/extensions/api/identity/identity_api.cc | 
| @@ -393,8 +393,17 @@ void IdentityGetAuthTokenFunction::OnGetTokenFailure( | 
| #if defined(OS_CHROMEOS) | 
| void IdentityGetAuthTokenFunction::StartDeviceLoginAccessTokenRequest() { | 
| - chromeos::DeviceOAuth2TokenService* service = | 
| - chromeos::DeviceOAuth2TokenServiceFactory::Get(); | 
| + chromeos::DeviceOAuth2TokenServiceFactory::Get( | 
| + base::Bind(&IdentityGetAuthTokenFunction::DidGetTokenService, | 
| + this)); | 
| +} | 
| + | 
| +void IdentityGetAuthTokenFunction::DidGetTokenService( | 
| + chromeos::DeviceOAuth2TokenService* service) { | 
| + if (!service) { | 
| + CompleteFunctionWithError(identity_constants::kAuthFailure); | 
| 
 
Michael Courage
2013/10/23 18:04:11
Can you change this to kUserNotSignedIn or a new s
 
satorux1
2013/10/24 01:49:26
Good catch. Changed to kUserNotSignedIn
 
 | 
| + return; | 
| + } | 
| // Since robot account refresh tokens are scoped down to [any-api] only, | 
| // request access token for [any-api] instead of login. | 
| OAuth2TokenService::ScopeSet scopes; |