OLD | NEW |
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_CONFIGURATION_POLICY_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ |
6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ | 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 PolicyErrorMap* errors, | 121 PolicyErrorMap* errors, |
122 const base::ListValue** extension_ids); | 122 const base::ListValue** extension_ids); |
123 | 123 |
124 private: | 124 private: |
125 const char* pref_path_; | 125 const char* pref_path_; |
126 bool allow_wildcards_; | 126 bool allow_wildcards_; |
127 | 127 |
128 DISALLOW_COPY_AND_ASSIGN(ExtensionListPolicyHandler); | 128 DISALLOW_COPY_AND_ASSIGN(ExtensionListPolicyHandler); |
129 }; | 129 }; |
130 | 130 |
| 131 // Implements additional checks for policies that are lists of extension |
| 132 // URLPatterns. |
| 133 class ExtensionURLPatternListPolicyHandler : public TypeCheckingPolicyHandler { |
| 134 public: |
| 135 ExtensionURLPatternListPolicyHandler(const char* policy_name, |
| 136 const char* pref_path); |
| 137 virtual ~ExtensionURLPatternListPolicyHandler(); |
| 138 |
| 139 // ConfigurationPolicyHandler methods: |
| 140 virtual bool CheckPolicySettings(const PolicyMap& policies, |
| 141 PolicyErrorMap* errors) OVERRIDE; |
| 142 virtual void ApplyPolicySettings(const PolicyMap& policies, |
| 143 PrefValueMap* prefs) OVERRIDE; |
| 144 |
| 145 private: |
| 146 const char* pref_path_; |
| 147 |
| 148 DISALLOW_COPY_AND_ASSIGN(ExtensionURLPatternListPolicyHandler); |
| 149 }; |
| 150 |
131 // ConfigurationPolicyHandler for the SyncDisabled policy. | 151 // ConfigurationPolicyHandler for the SyncDisabled policy. |
132 class SyncPolicyHandler : public TypeCheckingPolicyHandler { | 152 class SyncPolicyHandler : public TypeCheckingPolicyHandler { |
133 public: | 153 public: |
134 SyncPolicyHandler(); | 154 SyncPolicyHandler(); |
135 virtual ~SyncPolicyHandler(); | 155 virtual ~SyncPolicyHandler(); |
136 | 156 |
137 // ConfigurationPolicyHandler methods: | 157 // ConfigurationPolicyHandler methods: |
138 virtual void ApplyPolicySettings(const PolicyMap& policies, | 158 virtual void ApplyPolicySettings(const PolicyMap& policies, |
139 PrefValueMap* prefs) OVERRIDE; | 159 PrefValueMap* prefs) OVERRIDE; |
140 | 160 |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 private: | 370 private: |
351 void ApplyPolicySettingsFromHomePage(const PolicyMap& policies, | 371 void ApplyPolicySettingsFromHomePage(const PolicyMap& policies, |
352 PrefValueMap* prefs); | 372 PrefValueMap* prefs); |
353 | 373 |
354 DISALLOW_COPY_AND_ASSIGN(RestoreOnStartupPolicyHandler); | 374 DISALLOW_COPY_AND_ASSIGN(RestoreOnStartupPolicyHandler); |
355 }; | 375 }; |
356 | 376 |
357 } // namespace policy | 377 } // namespace policy |
358 | 378 |
359 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ | 379 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ |
OLD | NEW |