#include "components/policy/core/common/management/platform_management_service.h"
#include "base/memory/singleton.h"
#include "base/no_destructor.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#if BUILDFLAG(IS_MAC)
#include "components/policy/core/common/management/platform_management_status_provider_mac.h"
#elif BUILDFLAG(IS_WIN)
#include "components/policy/core/common/management/platform_management_status_provider_win.h"
#elif BUILDFLAG(IS_CHROMEOS_LACROS)
#include "build/chromeos_buildflags.h"
#include "components/policy/core/common/management/platform_management_status_provider_lacros.h"
#endif
namespace policy {
namespace {
std::vector<std::unique_ptr<ManagementStatusProvider>>
GetPlatformManagementSatusProviders() { … }
}
PlatformManagementService* PlatformManagementService::GetInstance() { … }
PlatformManagementService::PlatformManagementService()
: … { … }
PlatformManagementService::~PlatformManagementService() = default;
void PlatformManagementService::AddLocalBrowserManagementStatusProvider(
std::unique_ptr<ManagementStatusProvider> provider) { … }
#if BUILDFLAG(IS_CHROMEOS_ASH)
void PlatformManagementService::AddChromeOsStatusProvider(
std::unique_ptr<ManagementStatusProvider> provider) {
AddManagementStatusProvider(std::move(provider));
has_cros_status_provider_ = true;
}
#endif
void PlatformManagementService::RefreshCache(CacheRefreshCallback callback) { … }
base::flat_map<ManagementStatusProvider*, EnterpriseManagementAuthority>
PlatformManagementService::GetCacheUpdate() { … }
void PlatformManagementService::UpdateCache(
CacheRefreshCallback callback,
base::flat_map<ManagementStatusProvider*, EnterpriseManagementAuthority>
cache_update) { … }
}