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

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

Issue 8258018: Generate Chrome policy definition list from policy_templates.json. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the unittest fix Created 9 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 | 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/cloud_policy_provider_impl.h" 5 #include "chrome/browser/policy/cloud_policy_provider_impl.h"
6 6
7 #include "chrome/browser/policy/configuration_policy_pref_store.h" 7 #include "chrome/browser/policy/configuration_policy_pref_store.h"
8 8
9 namespace policy { 9 namespace policy {
10 10
11 CloudPolicyProviderImpl::CloudPolicyProviderImpl( 11 CloudPolicyProviderImpl::CloudPolicyProviderImpl(
12 const ConfigurationPolicyProvider::PolicyDefinitionList* policy_list, 12 const PolicyDefinitionList* policy_list,
13 CloudPolicyCacheBase::PolicyLevel level) 13 CloudPolicyCacheBase::PolicyLevel level)
14 : CloudPolicyProvider(policy_list), 14 : CloudPolicyProvider(policy_list),
15 level_(level), 15 level_(level),
16 initialization_complete_(true) {} 16 initialization_complete_(true) {}
17 17
18 CloudPolicyProviderImpl::~CloudPolicyProviderImpl() { 18 CloudPolicyProviderImpl::~CloudPolicyProviderImpl() {
19 for (ListType::iterator i = caches_.begin(); i != caches_.end(); ++i) 19 for (ListType::iterator i = caches_.begin(); i != caches_.end(); ++i)
20 (*i)->RemoveObserver(this); 20 (*i)->RemoveObserver(this);
21 } 21 }
22 22
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 CombineTwoPolicyMaps(newly_combined, *(*i)->policy(level_), &tmp_map); 109 CombineTwoPolicyMaps(newly_combined, *(*i)->policy(level_), &tmp_map);
110 newly_combined.Swap(&tmp_map); 110 newly_combined.Swap(&tmp_map);
111 } 111 }
112 112
113 // Trigger a notification. 113 // Trigger a notification.
114 combined_.Swap(&newly_combined); 114 combined_.Swap(&newly_combined);
115 NotifyPolicyUpdated(); 115 NotifyPolicyUpdated();
116 } 116 }
117 117
118 } // namespace policy 118 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud_policy_provider.cc ('k') | chrome/browser/policy/cloud_policy_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698