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> |
| 8 |
7 #include "components/policy/core/common/policy_namespace.h" | 9 #include "components/policy/core/common/policy_namespace.h" |
8 #include "components/policy/core/common/schema.h" | 10 #include "components/policy/core/common/schema.h" |
9 #include "components/policy/core/common/schema_registry.h" | 11 #include "components/policy/core/common/schema_registry.h" |
10 | 12 |
11 namespace policy { | 13 namespace policy { |
12 | 14 |
13 SchemaRegistryService::SchemaRegistryService( | 15 SchemaRegistryService::SchemaRegistryService( |
14 scoped_ptr<SchemaRegistry> registry, | 16 scoped_ptr<SchemaRegistry> registry, |
15 const Schema& chrome_schema, | 17 const Schema& chrome_schema, |
16 CombinedSchemaRegistry* global_registry) | 18 CombinedSchemaRegistry* global_registry) |
17 : registry_(registry.Pass()) { | 19 : registry_(std::move(registry)) { |
18 if (chrome_schema.valid()) { | 20 if (chrome_schema.valid()) { |
19 registry_->RegisterComponent(PolicyNamespace(POLICY_DOMAIN_CHROME, ""), | 21 registry_->RegisterComponent(PolicyNamespace(POLICY_DOMAIN_CHROME, ""), |
20 chrome_schema); | 22 chrome_schema); |
21 } | 23 } |
22 registry_->SetReady(POLICY_DOMAIN_CHROME); | 24 registry_->SetReady(POLICY_DOMAIN_CHROME); |
23 if (global_registry) | 25 if (global_registry) |
24 global_registry->Track(registry_.get()); | 26 global_registry->Track(registry_.get()); |
25 } | 27 } |
26 | 28 |
27 SchemaRegistryService::~SchemaRegistryService() {} | 29 SchemaRegistryService::~SchemaRegistryService() {} |
28 | 30 |
29 } // namespace policy | 31 } // namespace policy |
OLD | NEW |