| 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 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // Name of the pref to write. | 130 // Name of the pref to write. |
| 131 const char* pref_path_; | 131 const char* pref_path_; |
| 132 | 132 |
| 133 // The mapping table. | 133 // The mapping table. |
| 134 const MappingEntry* mapping_begin_; | 134 const MappingEntry* mapping_begin_; |
| 135 const MappingEntry* mapping_end_; | 135 const MappingEntry* mapping_end_; |
| 136 | 136 |
| 137 DISALLOW_COPY_AND_ASSIGN(StringToIntEnumListPolicyHandler); | 137 DISALLOW_COPY_AND_ASSIGN(StringToIntEnumListPolicyHandler); |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 // A policy handler implementation that maps an int percentage value to a |
| 141 // double. |
| 142 class IntPercentageToDoublePolicyHandler : public TypeCheckingPolicyHandler { |
| 143 public: |
| 144 IntPercentageToDoublePolicyHandler(const char* policy_name, |
| 145 const char* pref_path); |
| 146 |
| 147 // ConfigurationPolicyHandler: |
| 148 virtual void ApplyPolicySettings(const PolicyMap& policies, |
| 149 PrefValueMap* prefs) OVERRIDE; |
| 150 |
| 151 private: |
| 152 // Name of the pref to write. |
| 153 const char* pref_path_; |
| 154 |
| 155 DISALLOW_COPY_AND_ASSIGN(IntPercentageToDoublePolicyHandler); |
| 156 }; |
| 157 |
| 140 // Implements additional checks for policies that are lists of extension IDs. | 158 // Implements additional checks for policies that are lists of extension IDs. |
| 141 class ExtensionListPolicyHandler : public TypeCheckingPolicyHandler { | 159 class ExtensionListPolicyHandler : public TypeCheckingPolicyHandler { |
| 142 public: | 160 public: |
| 143 ExtensionListPolicyHandler(const char* policy_name, | 161 ExtensionListPolicyHandler(const char* policy_name, |
| 144 const char* pref_path, | 162 const char* pref_path, |
| 145 bool allow_wildcards); | 163 bool allow_wildcards); |
| 146 virtual ~ExtensionListPolicyHandler(); | 164 virtual ~ExtensionListPolicyHandler(); |
| 147 | 165 |
| 148 // ConfigurationPolicyHandler methods: | 166 // ConfigurationPolicyHandler methods: |
| 149 virtual bool CheckPolicySettings(const PolicyMap& policies, | 167 virtual bool CheckPolicySettings(const PolicyMap& policies, |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 private: | 476 private: |
| 459 void ApplyPolicySettingsFromHomePage(const PolicyMap& policies, | 477 void ApplyPolicySettingsFromHomePage(const PolicyMap& policies, |
| 460 PrefValueMap* prefs); | 478 PrefValueMap* prefs); |
| 461 | 479 |
| 462 DISALLOW_COPY_AND_ASSIGN(RestoreOnStartupPolicyHandler); | 480 DISALLOW_COPY_AND_ASSIGN(RestoreOnStartupPolicyHandler); |
| 463 }; | 481 }; |
| 464 | 482 |
| 465 } // namespace policy | 483 } // namespace policy |
| 466 | 484 |
| 467 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ | 485 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ |
| OLD | NEW |