Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / chrome / browser / policy / schema_registry_service.cc
blob9cf2b494e8f06fc8c49b4a98e6dd50ebb8d0f749
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 #include "chrome/browser/policy/schema_registry_service.h"
7 #include "components/policy/core/common/policy_namespace.h"
8 #include "components/policy/core/common/schema.h"
9 #include "components/policy/core/common/schema_registry.h"
11 namespace policy {
13 SchemaRegistryService::SchemaRegistryService(
14 scoped_ptr<SchemaRegistry> registry,
15 const Schema& chrome_schema,
16 CombinedSchemaRegistry* global_registry)
17 : registry_(registry.Pass()) {
18 if (chrome_schema.valid()) {
19 registry_->RegisterComponent(PolicyNamespace(POLICY_DOMAIN_CHROME, ""),
20 chrome_schema);
22 registry_->SetReady(POLICY_DOMAIN_CHROME);
23 if (global_registry)
24 global_registry->Track(registry_.get());
27 SchemaRegistryService::~SchemaRegistryService() {}
29 } // namespace policy