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 140c990197c7a073b6adc7497376886d73776e23..2176ad01b28512cea6c605c6ee3e2d2f031d26ed 100644 |
| --- a/chrome/browser/invalidation/ticl_invalidation_service.cc |
| +++ b/chrome/browser/invalidation/ticl_invalidation_service.cc |
| @@ -205,8 +205,8 @@ void TiclInvalidationService::RequestAccessToken() { |
| // token again. |
| oauth2_token_service_->InvalidateToken(oauth2_scopes, access_token_); |
| access_token_.clear(); |
| - access_token_request_ = |
| - oauth2_token_service_->StartRequest(oauth2_scopes, this); |
| + access_token_request_ = oauth2_token_service_->StartRequest( |
| + signin_manager_->GetAuthenticatedUsername(), oauth2_scopes, this); |
|
Andrew T Wilson (Slow)
2013/08/23 09:38:13
Why are we using GetAuthenticatedUsername() instea
fgorski
2013/08/23 19:13:35
Done. I left it in that way as a case study, antic
|
| } |
| void TiclInvalidationService::OnGetTokenSuccess( |
| @@ -296,7 +296,8 @@ bool TiclInvalidationService::IsReadyToStart() { |
| return false; |
| } |
| - if (signin_manager_->GetAuthenticatedUsername().empty()) { |
| + const std::string& account_id = signin_manager_->GetAuthenticatedUsername(); |
| + if (account_id.empty()) { |
| DVLOG(2) << "Not starting TiclInvalidationService: User is not signed in."; |
| return false; |
| } |
| @@ -307,7 +308,7 @@ bool TiclInvalidationService::IsReadyToStart() { |
| return false; |
| } |
| - if (!oauth2_token_service_->RefreshTokenIsAvailable()) { |
| + if (!oauth2_token_service_->RefreshTokenIsAvailable(account_id)) { |
| DVLOG(2) |
| << "Not starting TiclInvalidationServce: Waiting for refresh token."; |
| return false; |