OLD | NEW |
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 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_ |
6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_ | 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 static ConfigurationPolicyPrefStore* CreateManagedCloudPolicyPrefStore(); | 64 static ConfigurationPolicyPrefStore* CreateManagedCloudPolicyPrefStore(); |
65 | 65 |
66 // Creates a ConfigurationPolicyPrefStore that reads recommended platform | 66 // Creates a ConfigurationPolicyPrefStore that reads recommended platform |
67 // policy. | 67 // policy. |
68 static ConfigurationPolicyPrefStore* | 68 static ConfigurationPolicyPrefStore* |
69 CreateRecommendedPlatformPolicyPrefStore(); | 69 CreateRecommendedPlatformPolicyPrefStore(); |
70 | 70 |
71 // Creates a ConfigurationPolicyPrefStore that reads recommended cloud policy. | 71 // Creates a ConfigurationPolicyPrefStore that reads recommended cloud policy. |
72 static ConfigurationPolicyPrefStore* CreateRecommendedCloudPolicyPrefStore(); | 72 static ConfigurationPolicyPrefStore* CreateRecommendedCloudPolicyPrefStore(); |
73 | 73 |
74 // Returns the default policy definition list for Chrome. | |
75 static const ConfigurationPolicyProvider::PolicyDefinitionList* | |
76 GetChromePolicyDefinitionList(); | |
77 | |
78 // Returns true if the given policy is a proxy policy. | 74 // Returns true if the given policy is a proxy policy. |
79 static bool IsProxyPolicy(ConfigurationPolicyType policy); | 75 static bool IsProxyPolicy(ConfigurationPolicyType policy); |
80 | 76 |
81 private: | 77 private: |
82 // Refreshes policy information, rereading policy from the provider and | 78 // Refreshes policy information, rereading policy from the provider and |
83 // sending out change notifications as appropriate. | 79 // sending out change notifications as appropriate. |
84 void Refresh(); | 80 void Refresh(); |
85 | 81 |
86 static const ConfigurationPolicyProvider::PolicyDefinitionList | |
87 kPolicyDefinitionList; | |
88 | |
89 // The policy provider from which policy settings are read. | 82 // The policy provider from which policy settings are read. |
90 ConfigurationPolicyProvider* provider_; | 83 ConfigurationPolicyProvider* provider_; |
91 | 84 |
92 // Initialization status as reported by the policy provider the last time we | 85 // Initialization status as reported by the policy provider the last time we |
93 // queried it. | 86 // queried it. |
94 bool initialization_complete_; | 87 bool initialization_complete_; |
95 | 88 |
96 // Current policy preferences. | 89 // Current policy preferences. |
97 scoped_ptr<ConfigurationPolicyPrefKeeper> policy_keeper_; | 90 scoped_ptr<ConfigurationPolicyPrefKeeper> policy_keeper_; |
98 | 91 |
99 ObserverList<PrefStore::Observer, true> observers_; | 92 ObserverList<PrefStore::Observer, true> observers_; |
100 | 93 |
101 ConfigurationPolicyObserverRegistrar registrar_; | 94 ConfigurationPolicyObserverRegistrar registrar_; |
102 | 95 |
103 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyPrefStore); | 96 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyPrefStore); |
104 }; | 97 }; |
105 | 98 |
106 } // namespace policy | 99 } // namespace policy |
107 | 100 |
108 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_ | 101 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_ |
OLD | NEW |