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_FACTORY_H_ | |
6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_FACTORY_H_ | |
7 #pragma once | |
8 | |
9 #include <vector> | |
10 | |
11 #include "base/values.h" | |
12 #include "chrome/browser/policy/configuration_policy_handler_interface.h" | |
13 #include "chrome/browser/policy/configuration_policy_pref_store.h" | |
14 #include "policy/configuration_policy_type.h" | |
15 #include "policy/policy_constants.h" | |
16 | |
17 namespace policy { | |
18 | |
19 // This class produces a list of all the ConfigurationPolicyHandlerInterface | |
20 // instances needed to check and apply all policy settings. | |
21 class ConfigurationPolicyHandlerFactory { | |
Mattias Nissler (ping if slow)
2011/09/20 13:12:25
seems like there's no reason to make this a class,
simo
2011/09/22 11:43:26
Okay, I've removed the class and renamed this file
| |
22 public: | |
23 typedef std::vector<ConfigurationPolicyHandlerInterface*> HandlerList; | |
24 typedef std::vector<ConfigurationPolicyHandlerInterface*>::const_iterator | |
25 const_iterator; | |
26 | |
27 // Returns a pointer to a |HandlerList| containing all available handlers | |
28 // derived from ConfigurationPolicyHandlerInterface. | |
29 static HandlerList* MakeHandlers(); | |
30 | |
31 private: | |
32 // Lists policies that map to a single preference. These are handled by | |
33 // SimplePolicyHandler. Each one of these policies has an entry in | |
34 // kSimplePolicyMap with the following type. | |
35 struct PolicyToPreferenceMapEntry { | |
36 base::Value::Type value_type; | |
37 ConfigurationPolicyType policy_type; | |
38 const char* preference_path; // A DictionaryValue path, not a file path. | |
39 }; | |
40 | |
41 static const PolicyToPreferenceMapEntry kSimplePolicyMap[]; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyHandlerFactory); | |
44 }; | |
45 | |
46 } // namespace policy | |
47 | |
48 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_FACTORY_H_ | |
OLD | NEW |