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

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

Issue 9111022: Removed ConfigurationPolicyType and extended PolicyMap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 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) 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 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_PROVIDER_IMPL_H_ 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_PROVIDER_IMPL_H_
6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_PROVIDER_IMPL_H_ 6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_PROVIDER_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "chrome/browser/policy/cloud_policy_cache_base.h" 11 #include "chrome/browser/policy/cloud_policy_cache_base.h"
12 #include "chrome/browser/policy/cloud_policy_provider.h" 12 #include "chrome/browser/policy/cloud_policy_provider.h"
13 #include "chrome/browser/policy/policy_map.h" 13 #include "chrome/browser/policy/policy_map.h"
14 14
15 namespace policy { 15 namespace policy {
16 16
17 class BrowserPolicyConnector; 17 class BrowserPolicyConnector;
18 18
19 class CloudPolicyProviderImpl : public CloudPolicyProvider, 19 class CloudPolicyProviderImpl : public CloudPolicyProvider,
20 public CloudPolicyCacheBase::Observer { 20 public CloudPolicyCacheBase::Observer {
21 public: 21 public:
22 CloudPolicyProviderImpl(BrowserPolicyConnector* browser_policy_connector, 22 CloudPolicyProviderImpl(BrowserPolicyConnector* browser_policy_connector,
23 const PolicyDefinitionList* policy_list, 23 const PolicyDefinitionList* policy_list,
24 CloudPolicyCacheBase::PolicyLevel level); 24 PolicyLevel level);
25 virtual ~CloudPolicyProviderImpl(); 25 virtual ~CloudPolicyProviderImpl();
26 26
27 // ConfigurationPolicyProvider implementation. 27 // ConfigurationPolicyProvider implementation.
28 virtual bool ProvideInternal(PolicyMap* result) OVERRIDE; 28 virtual bool ProvideInternal(PolicyMap* result) OVERRIDE;
29 virtual bool IsInitializationComplete() const OVERRIDE; 29 virtual bool IsInitializationComplete() const OVERRIDE;
30 virtual void RefreshPolicies() OVERRIDE; 30 virtual void RefreshPolicies() OVERRIDE;
31 31
32 // CloudPolicyCacheBase::Observer implementation. 32 // CloudPolicyCacheBase::Observer implementation.
33 virtual void OnCacheUpdate(CloudPolicyCacheBase* cache) OVERRIDE; 33 virtual void OnCacheUpdate(CloudPolicyCacheBase* cache) OVERRIDE;
34 virtual void OnCacheGoingAway(CloudPolicyCacheBase* cache) OVERRIDE; 34 virtual void OnCacheGoingAway(CloudPolicyCacheBase* cache) OVERRIDE;
(...skipping 18 matching lines...) Expand all
53 BrowserPolicyConnector* browser_policy_connector_; 53 BrowserPolicyConnector* browser_policy_connector_;
54 54
55 // The underlying policy caches. 55 // The underlying policy caches.
56 ListType caches_; 56 ListType caches_;
57 57
58 // Caches with pending updates. Used by RefreshPolicies to determine if a 58 // Caches with pending updates. Used by RefreshPolicies to determine if a
59 // refresh has fully completed. 59 // refresh has fully completed.
60 ListType pending_update_caches_; 60 ListType pending_update_caches_;
61 61
62 // Policy level this provider will handle. 62 // Policy level this provider will handle.
63 CloudPolicyCacheBase::PolicyLevel level_; 63 PolicyLevel level_;
64 64
65 // Whether all caches are fully initialized. 65 // Whether all caches are fully initialized.
66 bool initialization_complete_; 66 bool initialization_complete_;
67 67
68 // The currently valid combination of all the maps in |caches_|. Will be 68 // The currently valid combination of all the maps in |caches_|. Will be
69 // applied as is on call of Provide. 69 // applied as is on call of Provide.
70 PolicyMap combined_; 70 PolicyMap combined_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(CloudPolicyProviderImpl); 72 DISALLOW_COPY_AND_ASSIGN(CloudPolicyProviderImpl);
73 }; 73 };
74 74
75 } // namespace policy 75 } // namespace policy
76 76
77 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_PROVIDER_IMPL_H_ 77 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_PROVIDER_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud_policy_controller_unittest.cc ('k') | chrome/browser/policy/cloud_policy_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698