chromium/chrome/enterprise_companion/device_management_storage/dm_storage_linux.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 =;

// Determines the CBE DeviceID derived from /etc/machine-id as implemented by
// |BrowserDMTokenStorageLinux::InitClientId|.
std::string DetermineDeviceID() {}

// Reads a token from the given file. Returns the empty string if the file could
// not be read.
std::string LoadTokenFromFile(const base::FilePath& token_file_path) {}
}  // namespace

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() {}

}  // namespace device_management_storage