Chromium Code Reviews| Index: chrome/browser/invalidation/ticl_invalidation_service.cc |
| diff --git a/chrome/browser/invalidation/ticl_invalidation_service.cc b/chrome/browser/invalidation/ticl_invalidation_service.cc |
| index ee2da37e8c620d76aadbbbd59df21dad82b69026..5863be8dee177bb9d4f732efa73e0d47b387f63b 100644 |
| --- a/chrome/browser/invalidation/ticl_invalidation_service.cc |
| +++ b/chrome/browser/invalidation/ticl_invalidation_service.cc |
| @@ -258,7 +258,15 @@ void TiclInvalidationService::OnGetTokenFailure( |
| void TiclInvalidationService::OnInvalidatorStateChange( |
| syncer::InvalidatorState state) { |
| - invalidator_registrar_->UpdateInvalidatorState(state); |
| + if (state == syncer::INVALIDATION_CREDENTIALS_REJECTED) { |
| + // This may be due to normal OAuth access token expiration. If so, we must |
| + // fetch a new one using our refresh token. Resetting the invalidator's |
| + // access token will not reset the invalidator's exponential backoff, so |
| + // it's safe to try to update the token every time we receive this signal. |
|
akalin
2013/07/31 22:37:46
Add comment saying that if the credentials continu
akalin
2013/07/31 22:42:45
per our discussion, transition to TRANSIENT_ERROR
rlarocque
2013/07/31 23:00:53
Done.
|
| + RequestAccessToken(); |
| + } else { |
| + invalidator_registrar_->UpdateInvalidatorState(state); |
| + } |
| } |
| void TiclInvalidationService::OnIncomingInvalidation( |