| Index: chrome/browser/policy/cloud/user_policy_signin_service.cc
|
| diff --git a/chrome/browser/policy/cloud/user_policy_signin_service.cc b/chrome/browser/policy/cloud/user_policy_signin_service.cc
|
| index baef750073bc0171cdf4c8808932358a8e591fe7..8b26a1b802523a94e78cb4f3c14f28ad0523d93c 100644
|
| --- a/chrome/browser/policy/cloud/user_policy_signin_service.cc
|
| +++ b/chrome/browser/policy/cloud/user_policy_signin_service.cc
|
| @@ -39,7 +39,8 @@ UserPolicySigninService::UserPolicySigninService(
|
| // ProfileOAuth2TokenService should not yet have loaded its tokens since this
|
| // happens in the background after PKS initialization - so this service
|
| // should always be created before the oauth token is available.
|
| - DCHECK(!oauth2_token_service_->RefreshTokenIsAvailable());
|
| + DCHECK(!oauth2_token_service_->RefreshTokenIsAvailable(
|
| + oauth2_token_service_->GetPrimaryAccountId()));
|
|
|
| // Listen for an OAuth token to become available so we can register a client
|
| // if for some reason the client is not already registered (for example, if
|
| @@ -145,7 +146,8 @@ void UserPolicySigninService::OnInitializationCompleted(
|
| DVLOG_IF(1, manager->IsClientRegistered())
|
| << "Client already registered - not fetching DMToken";
|
| if (!manager->IsClientRegistered()) {
|
| - if (!oauth2_token_service_->RefreshTokenIsAvailable()) {
|
| + if (!oauth2_token_service_->RefreshTokenIsAvailable(
|
| + oauth2_token_service_->GetPrimaryAccountId())) {
|
| // No token yet - this class listens for OnRefreshTokenAvailable()
|
| // and will re-attempt registration once the token is available.
|
| DLOG(WARNING) << "No OAuth Refresh Token - delaying policy download";
|
|
|