| Index: components/policy/core/browser/configuration_policy_handler.h
|
| diff --git a/chrome/browser/policy/configuration_policy_handler.h b/components/policy/core/browser/configuration_policy_handler.h
|
| similarity index 88%
|
| rename from chrome/browser/policy/configuration_policy_handler.h
|
| rename to components/policy/core/browser/configuration_policy_handler.h
|
| index f7b7eae5d1035070ce6a7f9aea36f7fa350f5e50..2c9c5df5c2d92c31efca1c3176c985692690341f 100644
|
| --- a/chrome/browser/policy/configuration_policy_handler.h
|
| +++ b/components/policy/core/browser/configuration_policy_handler.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_
|
| -#define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_
|
| +#ifndef COMPONENTS_POLICY_CORE_BROWSER_CONFIGURATION_POLICY_HANDLER_H_
|
| +#define COMPONENTS_POLICY_CORE_BROWSER_CONFIGURATION_POLICY_HANDLER_H_
|
|
|
| #include <string>
|
| #include <vector>
|
| @@ -11,6 +11,7 @@
|
| #include "base/basictypes.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/values.h"
|
| +#include "components/policy/policy_export.h"
|
|
|
| class PrefValueMap;
|
|
|
| @@ -20,7 +21,7 @@ class PolicyErrorMap;
|
| class PolicyMap;
|
|
|
| // Maps a policy type to a preference path, and to the expected value type.
|
| -struct PolicyToPreferenceMapEntry {
|
| +struct POLICY_EXPORT PolicyToPreferenceMapEntry {
|
| const char* const policy_name;
|
| const char* const preference_path;
|
| const base::Value::Type value_type;
|
| @@ -28,7 +29,7 @@ struct PolicyToPreferenceMapEntry {
|
|
|
| // An abstract super class that subclasses should implement to map policies to
|
| // their corresponding preferences, and to check whether the policies are valid.
|
| -class ConfigurationPolicyHandler {
|
| +class POLICY_EXPORT ConfigurationPolicyHandler {
|
| public:
|
| static std::string ValueTypeToString(Value::Type type);
|
|
|
| @@ -58,7 +59,8 @@ class ConfigurationPolicyHandler {
|
|
|
| // Abstract class derived from ConfigurationPolicyHandler that should be
|
| // subclassed to handle a single policy (not a combination of policies).
|
| -class TypeCheckingPolicyHandler : public ConfigurationPolicyHandler {
|
| +class POLICY_EXPORT TypeCheckingPolicyHandler
|
| + : public ConfigurationPolicyHandler {
|
| public:
|
| TypeCheckingPolicyHandler(const char* policy_name,
|
| base::Value::Type value_type);
|
| @@ -89,7 +91,8 @@ class TypeCheckingPolicyHandler : public ConfigurationPolicyHandler {
|
| // Abstract class derived from TypeCheckingPolicyHandler that ensures an int
|
| // policy's value lies in an allowed range. Either clamps or rejects values
|
| // outside the range.
|
| -class IntRangePolicyHandlerBase : public TypeCheckingPolicyHandler {
|
| +class POLICY_EXPORT IntRangePolicyHandlerBase
|
| + : public TypeCheckingPolicyHandler {
|
| public:
|
| IntRangePolicyHandlerBase(const char* policy_name,
|
| int min,
|
| @@ -125,7 +128,7 @@ class IntRangePolicyHandlerBase : public TypeCheckingPolicyHandler {
|
| };
|
|
|
| // ConfigurationPolicyHandler for policies that map directly to a preference.
|
| -class SimplePolicyHandler : public TypeCheckingPolicyHandler {
|
| +class POLICY_EXPORT SimplePolicyHandler : public TypeCheckingPolicyHandler {
|
| public:
|
| SimplePolicyHandler(const char* policy_name,
|
| const char* pref_path,
|
| @@ -145,9 +148,10 @@ class SimplePolicyHandler : public TypeCheckingPolicyHandler {
|
|
|
| // A policy handler implementation that maps a string enum list to an int enum
|
| // list as specified by a mapping table.
|
| -class StringToIntEnumListPolicyHandler : public TypeCheckingPolicyHandler {
|
| +class POLICY_EXPORT StringToIntEnumListPolicyHandler
|
| + : public TypeCheckingPolicyHandler {
|
| public:
|
| - struct MappingEntry {
|
| + struct POLICY_EXPORT MappingEntry {
|
| const char* enum_value;
|
| int int_value;
|
| };
|
| @@ -182,7 +186,7 @@ class StringToIntEnumListPolicyHandler : public TypeCheckingPolicyHandler {
|
|
|
| // A policy handler implementation that ensures an int policy's value lies in an
|
| // allowed range.
|
| -class IntRangePolicyHandler : public IntRangePolicyHandlerBase {
|
| +class POLICY_EXPORT IntRangePolicyHandler : public IntRangePolicyHandlerBase {
|
| public:
|
| IntRangePolicyHandler(const char* policy_name,
|
| const char* pref_path,
|
| @@ -204,7 +208,8 @@ class IntRangePolicyHandler : public IntRangePolicyHandlerBase {
|
|
|
| // A policy handler implementation that maps an int percentage value to a
|
| // double.
|
| -class IntPercentageToDoublePolicyHandler : public IntRangePolicyHandlerBase {
|
| +class POLICY_EXPORT IntPercentageToDoublePolicyHandler
|
| + : public IntRangePolicyHandlerBase {
|
| public:
|
| IntPercentageToDoublePolicyHandler(const char* policy_name,
|
| const char* pref_path,
|
| @@ -226,4 +231,4 @@ class IntPercentageToDoublePolicyHandler : public IntRangePolicyHandlerBase {
|
|
|
| } // namespace policy
|
|
|
| -#endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_
|
| +#endif // COMPONENTS_POLICY_CORE_BROWSER_CONFIGURATION_POLICY_HANDLER_H_
|
|
|