#include "chrome/browser/enterprise/signals/user_delegate_impl.h"
#include <set>
#include "base/check.h"
#include "chrome/browser/enterprise/connectors/device_trust/common/common_types.h"
#include "chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service.h"
#include "chrome/browser/enterprise/util/affiliation.h"
#include "chrome/browser/policy/profile_policy_connector.h"
#include "chrome/browser/profiles/profile.h"
#include "components/policy/core/common/policy_types.h"
#include "components/signin/public/base/consent_level.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chrome/browser/ash/profiles/profile_helper.h"
#endif
namespace enterprise_signals {
DTCPolicyLevel;
namespace {
policy::PolicyScope ToPolicyScope(DTCPolicyLevel policy_level) { … }
}
UserDelegateImpl::UserDelegateImpl(
Profile* profile,
signin::IdentityManager* identity_manager,
enterprise_connectors::DeviceTrustConnectorService*
device_trust_connector_service)
: … { … }
UserDelegateImpl::~UserDelegateImpl() = default;
#if BUILDFLAG(IS_CHROMEOS_ASH)
bool UserDelegateImpl::IsSigninContext() const {
return ash::ProfileHelper::IsSigninProfile(profile_);
}
#endif
bool UserDelegateImpl::IsAffiliated() const { … }
bool UserDelegateImpl::IsManagedUser() const { … }
bool UserDelegateImpl::IsSameUser(const std::string& gaia_id) const { … }
std::set<policy::PolicyScope> UserDelegateImpl::GetPolicyScopesNeedingSignals()
const { … }
}