| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/policy/schema_registry_service.h" | 5 #include "chrome/browser/policy/schema_registry_service.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "components/policy/core/common/policy_namespace.h" | 9 #include "components/policy/core/common/policy_namespace.h" |
| 10 #include "components/policy/core/common/schema.h" | 10 #include "components/policy/core/common/schema.h" |
| 11 #include "components/policy/core/common/schema_registry.h" | 11 #include "components/policy/core/common/schema_registry.h" |
| 12 | 12 |
| 13 namespace policy { | 13 namespace policy { |
| 14 | 14 |
| 15 SchemaRegistryService::SchemaRegistryService( | 15 SchemaRegistryService::SchemaRegistryService( |
| 16 std::unique_ptr<SchemaRegistry> registry, | 16 std::unique_ptr<SchemaRegistry> registry, |
| 17 const Schema& chrome_schema, | 17 const Schema& chrome_schema, |
| 18 CombinedSchemaRegistry* global_registry) | 18 CombinedSchemaRegistry* global_registry) |
| 19 : registry_(std::move(registry)) { | 19 : registry_(std::move(registry)) { |
| 20 if (chrome_schema.valid()) { | 20 if (chrome_schema.valid()) { |
| 21 registry_->RegisterComponent(PolicyNamespace(POLICY_DOMAIN_CHROME, ""), | 21 registry_->RegisterComponent(PolicyNamespace(POLICY_DOMAIN_CHROME, ""), |
| 22 chrome_schema); | 22 chrome_schema); |
| 23 } | 23 } |
| 24 registry_->SetReady(POLICY_DOMAIN_CHROME); | 24 registry_->SetDomainReady(POLICY_DOMAIN_CHROME); |
| 25 if (global_registry) | 25 if (global_registry) |
| 26 global_registry->Track(registry_.get()); | 26 global_registry->Track(registry_.get()); |
| 27 } | 27 } |
| 28 | 28 |
| 29 SchemaRegistryService::~SchemaRegistryService() {} | 29 SchemaRegistryService::~SchemaRegistryService() {} |
| 30 | 30 |
| 31 } // namespace policy | 31 } // namespace policy |
| OLD | NEW |