#include "chrome/enterprise_companion/device_management_storage/dm_storage.h"
#include <string>
#include "base/base64url.h"
#include "base/check.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/important_file_writer.h"
#include "base/hash/sha1.h"
#include "base/logging.h"
#include "base/memory/scoped_refptr.h"
#include "base/strings/string_util.h"
#include "chrome/updater/updater_branding.h"
namespace device_management_storage {
namespace {
constexpr char kEnrollmentTokenFilePath[] = … COMPANY_SHORTNAME_STRING "/" PRODUCT_FULLNAME_STRING
"/CloudManagementEnrollmentToken";
constexpr char kDmTokenFilePath[] = … COMPANY_SHORTNAME_STRING "/" PRODUCT_FULLNAME_STRING
"/CloudManagement";
constexpr int kExpectedMachineIdSize = …;
std::string DetermineDeviceID() { … }
std::string LoadTokenFromFile(const base::FilePath& token_file_path) { … }
}
class TokenService : public TokenServiceInterface { … };
scoped_refptr<DMStorage> CreateDMStorage(
const base::FilePath& policy_cache_root,
const base::FilePath& enrollment_token_path,
const base::FilePath& dm_token_path) { … }
scoped_refptr<DMStorage> GetDefaultDMStorage() { … }
}