#include "components/policy/core/common/management/management_service.h"
#include <ostream>
#include <tuple>
#include "base/barrier_closure.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
#include "build/build_config.h"
#include "components/policy/core/common/policy_pref_names.h"
#include "components/prefs/persistent_pref_store.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
namespace policy {
ManagementStatusProvider::ManagementStatusProvider() = default;
ManagementStatusProvider::ManagementStatusProvider(
const std::string& cache_pref_name)
: … { … }
ManagementStatusProvider::~ManagementStatusProvider() = default;
EnterpriseManagementAuthority ManagementStatusProvider::GetAuthority() { … }
bool ManagementStatusProvider::RequiresCache() const { … }
void ManagementStatusProvider::UpdateCache(
EnterpriseManagementAuthority authority) { … }
void ManagementStatusProvider::UsePrefStoreAsCache(
scoped_refptr<PersistentPrefStore> pref_store) { … }
void ManagementStatusProvider::UsePrefServiceAsCache(PrefService* prefs) { … }
ManagementService::ManagementService(
std::vector<std::unique_ptr<ManagementStatusProvider>> providers)
: … { … }
ManagementService::~ManagementService() { … }
void ManagementService::UsePrefServiceAsCache(PrefService* prefs) { … }
void ManagementService::UsePrefStoreAsCache(
scoped_refptr<PersistentPrefStore> pref_store) { … }
void ManagementService::RefreshCache(CacheRefreshCallback callback) { … }
bool ManagementService::HasManagementAuthority(
EnterpriseManagementAuthority authority) { … }
ManagementAuthorityTrustworthiness
ManagementService::GetManagementAuthorityTrustworthiness() { … }
int ManagementService::GetManagementAuthorities() { … }
void ManagementService::SetManagementStatusProviderForTesting(
std::vector<std::unique_ptr<ManagementStatusProvider>> providers) { … }
void ManagementService::SetManagementAuthoritiesForTesting(
int management_authorities) { … }
void ManagementService::ClearManagementAuthoritiesForTesting() { … }
void ManagementService::RegisterLocalStatePrefs(PrefRegistrySimple* registry) { … }
bool ManagementService::IsManaged() { … }
bool ManagementService::IsAccountManaged() { … }
bool ManagementService::IsBrowserManaged() { … }
void ManagementService::SetManagementStatusProvider(
std::vector<std::unique_ptr<ManagementStatusProvider>> providers) { … }
void ManagementService::AddManagementStatusProvider(
std::unique_ptr<ManagementStatusProvider> provider) { … }
}