[email protected] | eb83c39 | 2013-11-07 12:53:24 | [diff] [blame] | 1 | // Copyright 2013 The Chromium Authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_H_ | ||||
6 | #define CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_H_ | ||||
7 | |||||
8 | #include "base/basictypes.h" | ||||
9 | #include "base/compiler_specific.h" | ||||
[email protected] | 540380fc | 2014-03-14 10:10:34 | [diff] [blame] | 10 | #include "components/keyed_service/core/keyed_service.h" |
[email protected] | f39e98e | 2013-11-22 17:50:47 | [diff] [blame] | 11 | #include "components/policy/core/common/schema_registry.h" |
[email protected] | eb83c39 | 2013-11-07 12:53:24 | [diff] [blame] | 12 | |
13 | namespace policy { | ||||
14 | |||||
15 | class Schema; | ||||
16 | |||||
[email protected] | 540380fc | 2014-03-14 10:10:34 | [diff] [blame] | 17 | // A SchemaRegistry that is also a KeyedService, and is associated |
[email protected] | eb83c39 | 2013-11-07 12:53:24 | [diff] [blame] | 18 | // with a Profile. |
[email protected] | 540380fc | 2014-03-14 10:10:34 | [diff] [blame] | 19 | class SchemaRegistryService : public SchemaRegistry, public KeyedService { |
[email protected] | eb83c39 | 2013-11-07 12:53:24 | [diff] [blame] | 20 | public: |
21 | // This SchemaRegistry will initially contain only the |chrome_schema|, if | ||||
22 | // it's valid. The optional |global_registry| must outlive this, and will | ||||
23 | // track this registry. | ||||
24 | SchemaRegistryService(const Schema& chrome_schema, | ||||
25 | CombinedSchemaRegistry* global_registry); | ||||
26 | virtual ~SchemaRegistryService(); | ||||
27 | |||||
[email protected] | 540380fc | 2014-03-14 10:10:34 | [diff] [blame] | 28 | // KeyedService: |
[email protected] | eb83c39 | 2013-11-07 12:53:24 | [diff] [blame] | 29 | virtual void Shutdown() OVERRIDE; |
30 | |||||
31 | private: | ||||
32 | CombinedSchemaRegistry* global_registry_; | ||||
33 | |||||
34 | DISALLOW_COPY_AND_ASSIGN(SchemaRegistryService); | ||||
35 | }; | ||||
36 | |||||
37 | } // namespace policy | ||||
38 | |||||
39 | #endif // CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_H_ |