chromium/components/policy/core/common/schema_registry.h

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

#ifndef COMPONENTS_POLICY_CORE_COMMON_SCHEMA_REGISTRY_H_
#define COMPONENTS_POLICY_CORE_COMMON_SCHEMA_REGISTRY_H_

#include <set>

#include "base/compiler_specific.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
#include "base/sequence_checker.h"
#include "components/policy/core/common/policy_namespace.h"
#include "components/policy/core/common/schema.h"
#include "components/policy/core/common/schema_map.h"
#include "components/policy/policy_export.h"

namespace policy {

class SchemaMap;

// Holds the main reference to the current SchemaMap, and allows a list of
// observers to get notified whenever it is updated.
// This object is not thread safe and must be used from the owner's thread,
// usually UI.
class POLICY_EXPORT SchemaRegistry {};

// A registry that combines the maps of other registries.
class POLICY_EXPORT CombinedSchemaRegistry
    : public SchemaRegistry,
      public SchemaRegistry::Observer,
      public SchemaRegistry::InternalObserver {};

// A registry that wraps another schema registry.
class POLICY_EXPORT ForwardingSchemaRegistry
    : public SchemaRegistry,
      public SchemaRegistry::Observer,
      public SchemaRegistry::InternalObserver {};

}  // namespace policy

#endif  // COMPONENTS_POLICY_CORE_COMMON_SCHEMA_REGISTRY_H_