chromium/chrome/updater/policy/dm_policy_manager.h

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

#ifndef CHROME_UPDATER_POLICY_DM_POLICY_MANAGER_H_
#define CHROME_UPDATER_POLICY_DM_POLICY_MANAGER_H_

#include <optional>
#include <string>
#include <vector>

#include "base/memory/scoped_refptr.h"
#include "chrome/enterprise_companion/device_management_storage/dm_storage.h"
#include "chrome/updater/policy/manager.h"
#include "chrome/updater/protos/omaha_settings.pb.h"

namespace updater {

// The DMPolicyManager returns device management policies for managed machines.
class DMPolicyManager : public PolicyManagerInterface {};

// Read the Omaha settings from DM storage.
std::optional<
    wireless_android_enterprise_devicemanagement::OmahaSettingsClientProto>
GetOmahaPolicySettings(
    scoped_refptr<device_management_storage::DMStorage> dm_storage);

// A factory method to create a DM policy manager.
scoped_refptr<PolicyManagerInterface> CreateDMPolicyManager(
    const std::optional<bool>& override_is_managed_device);

}  // namespace updater

#endif  // CHROME_UPDATER_POLICY_DM_POLICY_MANAGER_H_