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

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

Issue 6272025: Part 2 of repairing regressions to my old clang check plugins so Nico can (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright 2011 Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/configuration_policy_provider.h" 5 #include "chrome/browser/policy/configuration_policy_provider.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 8
9 namespace policy { 9 namespace policy {
10 10
11 // Class ConfigurationPolicyProvider. 11 // Class ConfigurationPolicyProvider.
12 12
13 ConfigurationPolicyProvider::ConfigurationPolicyProvider( 13 ConfigurationPolicyProvider::ConfigurationPolicyProvider(
14 const PolicyDefinitionList* policy_list) 14 const PolicyDefinitionList* policy_list)
15 : policy_definition_list_(policy_list) { 15 : policy_definition_list_(policy_list) {
16 } 16 }
17 17
18 ConfigurationPolicyProvider::~ConfigurationPolicyProvider() {} 18 ConfigurationPolicyProvider::~ConfigurationPolicyProvider() {}
19 19
20 bool ConfigurationPolicyProvider::IsInitializationComplete() const {
21 return true;
22 }
23
20 void ConfigurationPolicyProvider::DecodePolicyValueTree( 24 void ConfigurationPolicyProvider::DecodePolicyValueTree(
21 const DictionaryValue* policies, 25 const DictionaryValue* policies,
22 ConfigurationPolicyStoreInterface* store) { 26 ConfigurationPolicyStoreInterface* store) {
23 const PolicyDefinitionList* policy_list(policy_definition_list()); 27 const PolicyDefinitionList* policy_list(policy_definition_list());
24 for (const PolicyDefinitionList::Entry* i = policy_list->begin; 28 for (const PolicyDefinitionList::Entry* i = policy_list->begin;
25 i != policy_list->end; ++i) { 29 i != policy_list->end; ++i) {
26 Value* value; 30 Value* value;
27 if (policies->Get(i->name, &value) && value->IsType(i->value_type)) 31 if (policies->Get(i->name, &value) && value->IsType(i->value_type))
28 store->Apply(i->policy_type, value->DeepCopy()); 32 store->Apply(i->policy_type, value->DeepCopy());
29 } 33 }
(...skipping 25 matching lines...) Expand all
55 observer_->OnUpdatePolicy(); 59 observer_->OnUpdatePolicy();
56 } 60 }
57 61
58 void ConfigurationPolicyObserverRegistrar::OnProviderGoingAway() { 62 void ConfigurationPolicyObserverRegistrar::OnProviderGoingAway() {
59 observer_->OnProviderGoingAway(); 63 observer_->OnProviderGoingAway();
60 provider_->RemoveObserver(this); 64 provider_->RemoveObserver(this);
61 provider_ = NULL; 65 provider_ = NULL;
62 } 66 }
63 67
64 } // namespace policy 68 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_provider.h ('k') | chrome/browser/policy/configuration_policy_provider_keeper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698