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.
5 #ifndef CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_H_
6 #define CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "components/keyed_service/core/keyed_service.h"
14 class CombinedSchemaRegistry
;
18 // A KeyedService associated with a Profile that contains a SchemaRegistry.
19 class SchemaRegistryService
: public KeyedService
{
21 // This |registry| will initially contain only the |chrome_schema|, if
22 // it's valid. The optional |global_registry| must outlive this, and will
24 SchemaRegistryService(scoped_ptr
<SchemaRegistry
> registry
,
25 const Schema
& chrome_schema
,
26 CombinedSchemaRegistry
* global_registry
);
27 ~SchemaRegistryService() override
;
29 SchemaRegistry
* registry() const { return registry_
.get(); }
32 scoped_ptr
<SchemaRegistry
> registry_
;
34 DISALLOW_COPY_AND_ASSIGN(SchemaRegistryService
);
39 #endif // CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_H_