#include "chrome/enterprise_companion/device_management_storage/dm_storage.h"
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <utility>
#include "base/base64.h"
#include "base/check.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/important_file_writer.h"
#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
#include "base/memory/scoped_refptr.h"
#include "base/sequence_checker.h"
#include "build/build_config.h"
#include "components/policy/proto/device_management_backend.pb.h"
namespace device_management_storage {
namespace {
constexpr char kInvalidTokenValue[] = …;
constexpr char kPolicyInfoFileName[] = …;
constexpr char kPolicyFileName[] = …;
bool DeletePolicies(const base::FilePath& cache_root,
const std::set<std::string>& exclusion_set) { … }
bool MakePathGlobalAccessible(const base::FilePath& path) { … }
class DMStorageImpl final : public DMStorage { … };
}
bool CreateGlobalAccessibleDirectory(const base::FilePath& path) { … }
bool WriteContentToGlobalReadableFile(const base::FilePath& path,
const std::string& content) { … }
bool CachedPolicyInfo::Populate(const std::string& raw_response) { … }
scoped_refptr<DMStorage> CreateDMStorage(
const base::FilePath& policy_cache_root,
std::unique_ptr<TokenServiceInterface> token_service) { … }
}