#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/policy/core/common/config_dir_policy_loader.h"
#include <stddef.h>
#include <algorithm>
#include <set>
#include <string>
#include "base/containers/adapters.h"
#include "base/containers/contains.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/json/json_file_value_serializer.h"
#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/syslog_logging.h"
#include "base/task/sequenced_task_runner.h"
#include "components/policy/core/common/policy_bundle.h"
#include "components/policy/core/common/policy_logger.h"
#include "components/policy/core/common/policy_types.h"
namespace policy {
namespace {
constexpr base::FilePath::CharType kMandatoryConfigDir[] = …);
constexpr base::FilePath::CharType kRecommendedConfigDir[] = …);
}
ConfigDirPolicyLoader::ConfigDirPolicyLoader(
scoped_refptr<base::SequencedTaskRunner> task_runner,
const base::FilePath& config_dir,
PolicyScope scope)
: … { … }
ConfigDirPolicyLoader::~ConfigDirPolicyLoader() { … }
void ConfigDirPolicyLoader::InitOnBackgroundThread() { … }
PolicyBundle ConfigDirPolicyLoader::Load() { … }
base::Time ConfigDirPolicyLoader::LastModificationTime() { … }
void ConfigDirPolicyLoader::LoadFromPath(const base::FilePath& path,
PolicyLevel level,
PolicyBundle* bundle) { … }
void ConfigDirPolicyLoader::Merge3rdPartyPolicy(const base::Value* policies,
PolicyLevel level,
PolicyBundle* bundle,
bool signin_profile) { … }
void ConfigDirPolicyLoader::OnFileUpdated(const base::FilePath& path,
bool error) { … }
}