blob: c2acbbf9b67860b345946aa46481fc30ab02a9dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_H_
#define CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_H_
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "components/keyed_service/core/keyed_service.h"
namespace policy {
class CombinedSchemaRegistry;
class Schema;
class SchemaRegistry;
// A KeyedService associated with a Profile that contains a SchemaRegistry.
class SchemaRegistryService : public KeyedService {
public:
// This |registry| will initially contain only the |chrome_schema|, if
// it's valid. The optional |global_registry| must outlive this, and will
// track |registry|.
SchemaRegistryService(scoped_ptr<SchemaRegistry> registry,
const Schema& chrome_schema,
CombinedSchemaRegistry* global_registry);
~SchemaRegistryService() override;
SchemaRegistry* registry() const { return registry_.get(); }
private:
scoped_ptr<SchemaRegistry> registry_;
DISALLOW_COPY_AND_ASSIGN(SchemaRegistryService);
};
} // namespace policy
#endif // CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_H_
|