#ifndef CHROME_ENTERPRISE_COMPANION_DEVICE_MANAGEMENT_STORAGE_DM_STORAGE_H_
#define CHROME_ENTERPRISE_COMPANION_DEVICE_MANAGEMENT_STORAGE_DM_STORAGE_H_
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include "base/containers/flat_map.h"
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/sequence_checker.h"
#include "build/build_config.h"
#include "components/policy/proto/device_management_backend.pb.h"
namespace device_management_storage {
using DMPolicyMap = base::flat_map<std::string, std::string>;
bool CreateGlobalAccessibleDirectory(const base::FilePath& path);
bool WriteContentToGlobalReadableFile(const base::FilePath& path,
const std::string& content_to_write);
class CachedPolicyInfo { … };
class TokenServiceInterface { … };
class DMStorage : public base::RefCountedThreadSafe<DMStorage> { … };
#if BUILDFLAG(IS_WIN)
scoped_refptr<DMStorage> CreateDMStorage(
const base::FilePath& policy_cache_root);
#else
scoped_refptr<DMStorage> CreateDMStorage(
const base::FilePath& policy_cache_root,
const base::FilePath& enrollment_token_path = { … };
#endif
scoped_refptr<DMStorage> CreateDMStorage(
const base::FilePath& policy_cache_root,
std::unique_ptr<TokenServiceInterface> token_service);
scoped_refptr<DMStorage> GetDefaultDMStorage();
}
#endif