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

Side by Side Diff: components/policy/core/common/schema_registry.cc

Issue 2440473004: Add policy domain for signin screen apps (Closed)
Patch Set: Fix compilation Created 4 years, 2 months 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
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 "components/policy/core/common/schema_registry.h" 5 #include "components/policy/core/common/schema_registry.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace policy { 9 namespace policy {
10 10
11 SchemaRegistry::Observer::~Observer() {} 11 SchemaRegistry::Observer::~Observer() {}
12 12
13 SchemaRegistry::InternalObserver::~InternalObserver() {} 13 SchemaRegistry::InternalObserver::~InternalObserver() {}
14 14
15 SchemaRegistry::SchemaRegistry() : schema_map_(new SchemaMap) { 15 SchemaRegistry::SchemaRegistry() : schema_map_(new SchemaMap) {
16 for (int i = 0; i < POLICY_DOMAIN_SIZE; ++i) 16 for (int i = 0; i < POLICY_DOMAIN_SIZE; ++i)
17 domains_ready_[i] = false; 17 domains_ready_[i] = false;
18 #if !defined(ENABLE_EXTENSIONS) 18 #if !defined(ENABLE_EXTENSIONS)
19 domains_ready_[POLICY_DOMAIN_EXTENSIONS] = true; 19 domains_ready_[POLICY_DOMAIN_EXTENSIONS] = true;
20 domains_ready_[POLICY_DOMAIN_SIGNIN_EXTENSIONS] = true;
20 #endif 21 #endif
21 } 22 }
22 23
23 SchemaRegistry::~SchemaRegistry() { 24 SchemaRegistry::~SchemaRegistry() {
24 for (auto& observer : internal_observers_) 25 for (auto& observer : internal_observers_)
25 observer.OnSchemaRegistryShuttingDown(this); 26 observer.OnSchemaRegistryShuttingDown(this);
26 } 27 }
27 28
28 void SchemaRegistry::RegisterComponent(const PolicyNamespace& ns, 29 void SchemaRegistry::RegisterComponent(const PolicyNamespace& ns,
29 const Schema& schema) { 30 const Schema& schema) {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 void ForwardingSchemaRegistry::OnSchemaRegistryShuttingDown( 225 void ForwardingSchemaRegistry::OnSchemaRegistryShuttingDown(
225 SchemaRegistry* registry) { 226 SchemaRegistry* registry) {
226 DCHECK_EQ(wrapped_, registry); 227 DCHECK_EQ(wrapped_, registry);
227 wrapped_->RemoveObserver(this); 228 wrapped_->RemoveObserver(this);
228 wrapped_->RemoveInternalObserver(this); 229 wrapped_->RemoveInternalObserver(this);
229 wrapped_ = NULL; 230 wrapped_ = NULL;
230 // Keep serving the same |schema_map_|. 231 // Keep serving the same |schema_map_|.
231 } 232 }
232 233
233 } // namespace policy 234 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698