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

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

Issue 10545033: Removed the PolicyDefinitionList from the ConfigurationPolicyProvider interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.h" 5 #include "chrome/browser/policy/cloud_policy_provider.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/policy/browser_policy_connector.h" 8 #include "chrome/browser/policy/browser_policy_connector.h"
9 #include "chrome/browser/policy/policy_bundle.h" 9 #include "chrome/browser/policy/policy_bundle.h"
10 #include "chrome/browser/policy/policy_map.h" 10 #include "chrome/browser/policy/policy_map.h"
11 11
12 namespace policy { 12 namespace policy {
13 13
14 CloudPolicyProvider::CloudPolicyProvider( 14 CloudPolicyProvider::CloudPolicyProvider(
15 BrowserPolicyConnector* browser_policy_connector, 15 BrowserPolicyConnector* browser_policy_connector,
16 const PolicyDefinitionList* policy_list,
17 PolicyLevel level) 16 PolicyLevel level)
18 : ConfigurationPolicyProvider(policy_list), 17 : browser_policy_connector_(browser_policy_connector),
19 browser_policy_connector_(browser_policy_connector),
20 level_(level), 18 level_(level),
21 initialization_complete_(false) { 19 initialization_complete_(false) {
22 for (size_t i = 0; i < CACHE_SIZE; ++i) 20 for (size_t i = 0; i < CACHE_SIZE; ++i)
23 caches_[i] = NULL; 21 caches_[i] = NULL;
24 } 22 }
25 23
26 CloudPolicyProvider::~CloudPolicyProvider() { 24 CloudPolicyProvider::~CloudPolicyProvider() {
27 for (size_t i = 0; i < CACHE_SIZE; ++i) { 25 for (size_t i = 0; i < CACHE_SIZE; ++i) {
28 if (caches_[i]) 26 if (caches_[i])
29 caches_[i]->RemoveObserver(this); 27 caches_[i]->RemoveObserver(this);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 combined.MergeFrom(*caches_[i]->policy()); 96 combined.MergeFrom(*caches_[i]->policy());
99 } 97 }
100 combined.FilterLevel(level_); 98 combined.FilterLevel(level_);
101 99
102 scoped_ptr<PolicyBundle> bundle(new PolicyBundle()); 100 scoped_ptr<PolicyBundle> bundle(new PolicyBundle());
103 bundle->Get(POLICY_DOMAIN_CHROME, std::string()).Swap(&combined); 101 bundle->Get(POLICY_DOMAIN_CHROME, std::string()).Swap(&combined);
104 UpdatePolicy(bundle.Pass()); 102 UpdatePolicy(bundle.Pass());
105 } 103 }
106 104
107 } // namespace policy 105 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud_policy_provider.h ('k') | chrome/browser/policy/cloud_policy_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698