chromium/components/supervised_user/core/browser/supervised_user_capabilities.h

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_SUPERVISED_USER_CORE_BROWSER_SUPERVISED_USER_CAPABILITIES_H_
#define COMPONENTS_SUPERVISED_USER_CORE_BROWSER_SUPERVISED_USER_CAPABILITIES_H_

#include "base/containers/flat_map.h"
#include "base/scoped_observation.h"
#include "base/types/expected.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/signin/public/identity_manager/primary_account_change_event.h"
#include "components/signin/public/identity_manager/tribool.h"

namespace supervised_user {

// Possible updates made to signin::Tribool capability values of
// AccountCapabilities. Note that capability values cannot be updated to
// signin::Tribool::kUnknown.
enum class CapabilityUpdateState {};

// Returns the IsSubjectToParentalControls capability value of the primary
// account if available. Signed-out users will default to
// signin::Tribool::kFalse.
signin::Tribool IsPrimaryAccountSubjectToParentalControls(
    signin::IdentityManager* identity_manager);

// Wrapper of IdentityManager::Observer, processing account capabilities
// relevant to supervised users.
class SupervisedUserCapabilitiesObserver
    : public signin::IdentityManager::Observer {};

}  // namespace supervised_user

#endif  // COMPONENTS_SUPERVISED_USER_CORE_BROWSER_SUPERVISED_USER_CAPABILITIES_H_