OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_INTERFACE_H_ |
| 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_INTERFACE_H_ |
| 7 #pragma once |
| 8 |
| 9 class PrefValueMap; |
| 10 |
| 11 namespace policy { |
| 12 |
| 13 class PolicyErrorMap; |
| 14 class PolicyMap; |
| 15 |
| 16 // An abstract super class that subclasses should implement to map a policy |
| 17 // configuration to the appropriate preferences and to check whether a policy |
| 18 // configuration is valid. |
| 19 class ConfigurationPolicyHandlerInterface { |
| 20 public: |
| 21 ConfigurationPolicyHandlerInterface() {} |
| 22 virtual ~ConfigurationPolicyHandlerInterface() {} |
| 23 |
| 24 // Returns true if the polic handled by this ConfigurationPolicyHandler is |
| 25 // valid and false otherwise, in which case |error_message| contains the |
| 26 // appropriate error message. |
| 27 virtual bool CheckPolicySettings(const PolicyMap* policies, |
| 28 PolicyErrorMap* errors) = 0; |
| 29 |
| 30 // Processes the policies handled by this ConfigurationPolicyHandler and sets |
| 31 // the appropriate preferences in |prefs|. |
| 32 virtual void ApplyPolicySettings(const PolicyMap* policies, |
| 33 PrefValueMap* prefs) = 0; |
| 34 |
| 35 private: |
| 36 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyHandlerInterface); |
| 37 }; |
| 38 |
| 39 } // namespace policy |
| 40 |
| 41 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_INTERFACE_H_ |
OLD | NEW |