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 #include <string> | |
10 | |
11 #include "base/memory/scoped_ptr.h" | |
Mattias Nissler (ping if slow)
2011/09/20 13:12:25
not needed?
simo
2011/09/22 11:43:26
Done.
| |
12 #include "base/values.h" | |
Mattias Nissler (ping if slow)
2011/09/20 13:12:25
not needed?
simo
2011/09/22 11:43:26
Done.
| |
13 #include "chrome/browser/policy/policy_error_map.h" | |
Mattias Nissler (ping if slow)
2011/09/20 13:12:25
forward declaration?
simo
2011/09/22 11:43:26
Done.
| |
14 #include "chrome/browser/policy/policy_map.h" | |
Mattias Nissler (ping if slow)
2011/09/20 13:12:25
forward declaration?
simo
2011/09/22 11:43:26
Done.
| |
15 #include "chrome/browser/prefs/pref_value_map.h" | |
Mattias Nissler (ping if slow)
2011/09/20 13:12:25
forward declaration?
simo
2011/09/22 11:43:26
Done.
| |
16 | |
17 namespace policy { | |
18 | |
19 // An abstract super class that subclasses should implement to map a policy | |
20 // configuration to the appropriate preferences and to check whether a policy | |
21 // configuration is valid. | |
22 class ConfigurationPolicyHandlerInterface { | |
23 public: | |
24 ConfigurationPolicyHandlerInterface() {} | |
25 virtual ~ConfigurationPolicyHandlerInterface() {} | |
26 | |
27 // Returns true if the polic handled by this ConfigurationPolicyHandler is | |
28 // valid and false otherwise, in which case |error_message| contains the | |
29 // appropriate error message. | |
30 virtual bool CheckPolicySettings(PolicyMap* map, PolicyErrorMap* errors) = 0; | |
Mattias Nissler (ping if slow)
2011/09/20 13:12:25
Make the policy map const?
simo
2011/09/22 11:43:26
Done.
| |
31 | |
32 // Processes the policies handled by this ConfigurationPolicyHandler and sets | |
33 // the appropriate preferences in |prefs|. | |
34 virtual void ApplyPolicySettings(PolicyMap* map, PrefValueMap* prefs) = 0; | |
Mattias Nissler (ping if slow)
2011/09/20 13:12:25
make the policy map const?
simo
2011/09/22 11:43:26
Done.
| |
35 | |
36 private: | |
37 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyHandlerInterface); | |
38 }; | |
39 | |
40 } // namespace policy | |
41 | |
42 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_INTERFACE_H_ | |
OLD | NEW |