#include "components/device_signals/core/browser/user_permission_service_impl.h"
#include <set>
#include "base/check.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "components/device_signals/core/browser/pref_names.h"
#include "components/device_signals/core/browser/user_context.h"
#include "components/device_signals/core/browser/user_delegate.h"
#include "components/device_signals/core/common/signals_features.h"
#include "components/policy/core/common/management/management_service.h"
#include "components/policy/core/common/policy_types.h"
#include "components/prefs/pref_service.h"
namespace device_signals {
namespace {
bool IsNewEvSignalsUnaffiliatedEnabled() { … }
}
UserPermissionServiceImpl::UserPermissionServiceImpl(
policy::ManagementService* management_service,
std::unique_ptr<UserDelegate> user_delegate,
PrefService* user_prefs)
: … { … }
UserPermissionServiceImpl::~UserPermissionServiceImpl() = default;
base::WeakPtr<UserPermissionServiceImpl>
UserPermissionServiceImpl::GetWeakPtr() { … }
bool UserPermissionServiceImpl::HasUserConsented() const { … }
bool UserPermissionServiceImpl::ShouldCollectConsent() const { … }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
UserPermission UserPermissionServiceImpl::CanUserCollectSignals(
const UserContext& user_context) const { … }
#endif
UserPermission UserPermissionServiceImpl::CanCollectSignals() const { … }
bool UserPermissionServiceImpl::IsConsentFlowPolicyEnabled() const { … }
bool UserPermissionServiceImpl::IsDeviceCloudManaged() const { … }
}