| 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 c69826c74699306c2ba9424f9512d4c011ddd871..0ca237fbf24577999d189f07015ab0a73fea4e14 100644
|
| --- a/chrome/browser/policy/cloud/user_policy_signin_service.cc
|
| +++ b/chrome/browser/policy/cloud/user_policy_signin_service.cc
|
| @@ -111,12 +111,13 @@ void UserPolicySigninService::OnRefreshTokenAvailable(
|
| return;
|
| }
|
|
|
| - std::string username = GetSigninManager()->GetAuthenticatedUsername();
|
| - // Should not have OAuth tokens if the user isn't signed in.
|
| - DCHECK(!username.empty());
|
| + // Ignore OAuth tokens for any account but the primary one.
|
| + if (account_id != oauth2_token_service_->GetPrimaryAccountId())
|
| + return;
|
| +
|
| // ProfileOAuth2TokenService now has a refresh token so initialize the
|
| // UserCloudPolicyManager.
|
| - InitializeForSignedInUser(username);
|
| + InitializeForSignedInUser(GetSigninManager()->GetAuthenticatedUsername());
|
| }
|
|
|
| void UserPolicySigninService::InitializeUserCloudPolicyManager(
|
|
|