Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: chrome/browser/policy/schema_registry_service.cc

Issue 60823003: Introduced a ForwardingPolicyProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fixes Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/logging.h" 7 #include "base/logging.h"
8 #include "components/policy/core/common/policy_namespace.h" 8 #include "components/policy/core/common/policy_namespace.h"
9 #include "components/policy/core/common/schema.h" 9 #include "components/policy/core/common/schema.h"
10 10
11 namespace policy { 11 namespace policy {
12 12
13 SchemaRegistryService::SchemaRegistryService( 13 SchemaRegistryService::SchemaRegistryService(
14 const Schema& chrome_schema, 14 const Schema& chrome_schema,
15 CombinedSchemaRegistry* global_registry) 15 CombinedSchemaRegistry* global_registry)
16 : global_registry_(global_registry) { 16 : global_registry_(global_registry) {
17 if (chrome_schema.valid()) 17 if (chrome_schema.valid())
18 RegisterComponent(PolicyNamespace(POLICY_DOMAIN_CHROME, ""), chrome_schema); 18 RegisterComponent(PolicyNamespace(POLICY_DOMAIN_CHROME, ""), chrome_schema);
19 SetReady(POLICY_DOMAIN_CHROME);
19 if (global_registry_) 20 if (global_registry_)
20 global_registry->Track(this); 21 global_registry->Track(this);
21 } 22 }
22 23
23 SchemaRegistryService::~SchemaRegistryService() {} 24 SchemaRegistryService::~SchemaRegistryService() {}
24 25
25 void SchemaRegistryService::Shutdown() { 26 void SchemaRegistryService::Shutdown() {
26 if (global_registry_) { 27 if (global_registry_) {
27 global_registry_->Untrack(this); 28 global_registry_->Untrack(this);
28 global_registry_ = NULL; 29 global_registry_ = NULL;
29 } 30 }
30 DCHECK(!HasObservers()); 31 DCHECK(!HasObservers());
31 } 32 }
32 33
33 } // namespace policy 34 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698