chromium/chrome/updater/policy/service.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_SERVICE_H_
#define CHROME_UPDATER_POLICY_SERVICE_H_

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

#include "base/containers/flat_map.h"
#include "base/functional/callback_forward.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_refptr.h"
#include "base/sequence_checker.h"
#include "base/time/time.h"
#include "base/values.h"
#include "chrome/updater/external_constants.h"
#include "chrome/updater/policy/manager.h"

namespace updater {

class PolicyFetcher;

// This class contains the aggregate status of a policy value. It determines
// whether a conflict exists when multiple policy providers set the same policy.
// Instances are logically true if an effective policy is set.
template <typename T>
class PolicyStatus {};

// The PolicyService returns policies for enterprise managed machines from the
// source with the highest priority where the policy available.
// This class is sequence affine and its instance is bound to the main sequence.
class PolicyService : public base::RefCountedThreadSafe<PolicyService> {};

// Decouples the proxy configuration from `PolicyService`.
struct PolicyServiceProxyConfiguration {};

std::vector<scoped_refptr<PolicyManagerInterface>> CreateManagers(
    bool should_take_policy_critical_section,
    scoped_refptr<ExternalConstants> external_constants,
    scoped_refptr<PolicyManagerInterface> dm_policy_manager);

}  // namespace updater

#endif  // CHROME_UPDATER_POLICY_SERVICE_H_