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 c30e689a03ca79770af717171138208d19a24b80..e83c8436d7219e896c176e97345ec740f37b571a 100644 |
--- a/chrome/browser/invalidation/ticl_invalidation_service.cc |
+++ b/chrome/browser/invalidation/ticl_invalidation_service.cc |
@@ -179,7 +179,7 @@ void TiclInvalidationService::RequestAccessToken() { |
oauth2_scopes.insert(kOAuth2Scopes[i]); |
// Invalidate previous token, otherwise token service will return the same |
// token again. |
- const std::string& account_id = oauth2_token_service_->GetPrimaryAccountId(); |
+ const std::string& account_id = signin_manager_->GetAuthenticatedAccountId(); |
oauth2_token_service_->InvalidateToken(account_id, |
oauth2_scopes, |
access_token_); |
@@ -237,7 +237,7 @@ void TiclInvalidationService::OnGetTokenFailure( |
void TiclInvalidationService::OnRefreshTokenAvailable( |
const std::string& account_id) { |
- if (oauth2_token_service_->GetPrimaryAccountId() == account_id) { |
+ if (signin_manager_->GetAuthenticatedAccountId() == account_id) { |
if (!IsStarted() && IsReadyToStart()) { |
StartInvalidator(PUSH_CLIENT_CHANNEL); |
} |
@@ -246,7 +246,7 @@ void TiclInvalidationService::OnRefreshTokenAvailable( |
void TiclInvalidationService::OnRefreshTokenRevoked( |
const std::string& account_id) { |
- if (oauth2_token_service_->GetPrimaryAccountId() == account_id) { |
+ if (signin_manager_->GetAuthenticatedAccountId() == account_id) { |
access_token_.clear(); |
if (IsStarted()) { |
UpdateInvalidatorCredentials(); |
@@ -312,7 +312,7 @@ bool TiclInvalidationService::IsReadyToStart() { |
} |
if (!oauth2_token_service_->RefreshTokenIsAvailable( |
- oauth2_token_service_->GetPrimaryAccountId())) { |
+ signin_manager_->GetAuthenticatedAccountId())) { |
DVLOG(2) |
<< "Not starting TiclInvalidationServce: Waiting for refresh token."; |
return false; |