diff options
author | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-20 17:14:15 +0000 |
---|---|---|
committer | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-20 17:14:15 +0000 |
commit | 80bfae1142d44fa37e51d9bec0610c3010796642 (patch) | |
tree | 2e7c1e6dfc789051c996fd9e2f3a879ac1d47452 /chrome/browser/policy/schema_registry_service.h | |
parent | 68a31b1b3ed40a9146d45cd0e262a0d939275c48 (diff) | |
download | chromium_src-80bfae1142d44fa37e51d9bec0610c3010796642.zip chromium_src-80bfae1142d44fa37e51d9bec0610c3010796642.tar.gz chromium_src-80bfae1142d44fa37e51d9bec0610c3010796642.tar.bz2 |
Decoupled the SchemaRegistryService from SchemaRegistry.
The service is not a SchemaRegistry anymore but owns one instead. This
enables the service to own subclasses of SchemaRegistry.
Also added a ForwardingSchemaRegisy, which wraps another
SchemaRegistry. This will be used in a future CL.
R=bartfab@chromium.org
TBR=kalman@chromium.org
BUG=224596
Review URL: https://codereview.chromium.org/349643002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278735 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/policy/schema_registry_service.h')
-rw-r--r-- | chrome/browser/policy/schema_registry_service.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/chrome/browser/policy/schema_registry_service.h b/chrome/browser/policy/schema_registry_service.h index ecf97d7..24beefc 100644 --- a/chrome/browser/policy/schema_registry_service.h +++ b/chrome/browser/policy/schema_registry_service.h @@ -6,30 +6,30 @@ #define CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_H_ #include "base/basictypes.h" -#include "base/compiler_specific.h" +#include "base/memory/scoped_ptr.h" #include "components/keyed_service/core/keyed_service.h" -#include "components/policy/core/common/schema_registry.h" namespace policy { +class CombinedSchemaRegistry; class Schema; +class SchemaRegistry; -// A SchemaRegistry that is also a KeyedService, and is associated -// with a Profile. -class SchemaRegistryService : public SchemaRegistry, public KeyedService { +// A KeyedService associated with a Profile that contains a SchemaRegistry. +class SchemaRegistryService : public KeyedService { public: - // This SchemaRegistry will initially contain only the |chrome_schema|, if + // This |registry| will initially contain only the |chrome_schema|, if // it's valid. The optional |global_registry| must outlive this, and will - // track this registry. - SchemaRegistryService(const Schema& chrome_schema, + // track |registry|. + SchemaRegistryService(scoped_ptr<SchemaRegistry> registry, + const Schema& chrome_schema, CombinedSchemaRegistry* global_registry); virtual ~SchemaRegistryService(); - // KeyedService: - virtual void Shutdown() OVERRIDE; + SchemaRegistry* registry() const { return registry_.get(); } private: - CombinedSchemaRegistry* global_registry_; + scoped_ptr<SchemaRegistry> registry_; DISALLOW_COPY_AND_ASSIGN(SchemaRegistryService); }; |