| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_CONFIGURATION_POLICY_STORE_H_ | 5 #ifndef CHROME_BROWSER_CONFIGURATION_POLICY_STORE_H_ |
| 6 #define CHROME_BROWSER_CONFIGURATION_POLICY_STORE_H_ | 6 #define CHROME_BROWSER_CONFIGURATION_POLICY_STORE_H_ |
| 7 | 7 |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 | 9 |
| 10 // An abstract super class for policy stores that provides a method that can be | 10 // An abstract super class for policy stores that provides a method that can be |
| 11 // called by a |ConfigurationPolicyProvider| to specify a policy. | 11 // called by a |ConfigurationPolicyProvider| to specify a policy. |
| 12 class ConfigurationPolicyStore { | 12 class ConfigurationPolicyStore { |
| 13 public: | 13 public: |
| 14 ConfigurationPolicyStore() {} | 14 ConfigurationPolicyStore() {} |
| 15 virtual ~ConfigurationPolicyStore() {} | 15 virtual ~ConfigurationPolicyStore() {} |
| 16 | 16 |
| 17 enum PolicyType { | 17 enum PolicyType { |
| 18 kPolicyHomePage, | 18 kPolicyHomePage, |
| 19 kPolicyHomepageIsNewTabPage, | 19 kPolicyHomepageIsNewTabPage, |
| 20 kPolicyProxyServerMode, | 20 kPolicyProxyServerMode, |
| 21 kPolicyProxyServer, | 21 kPolicyProxyServer, |
| 22 kPolicyProxyPacUrl, | 22 kPolicyProxyPacUrl, |
| 23 kPolicyProxyBypassList, | 23 kPolicyProxyBypassList, |
| 24 kPolicyAlternateErrorPagesEnabled, | 24 kPolicyAlternateErrorPagesEnabled, |
| 25 kPolicySearchSuggestEnabled, | 25 kPolicySearchSuggestEnabled, |
| 26 kPolicyDnsPrefetchingEnabled, | 26 kPolicyDnsPrefetchingEnabled, |
| 27 kPolicySafeBrowsingEnabled, | 27 kPolicySafeBrowsingEnabled, |
| 28 kPolicyMetricsReportingEnabled, | 28 kPolicyMetricsReportingEnabled, |
| 29 kPolicySyncDisabled |
| 29 }; | 30 }; |
| 30 | 31 |
| 31 static const int kPolicyNoProxyServerMode = 0; | 32 static const int kPolicyNoProxyServerMode = 0; |
| 32 static const int kPolicyAutoDetectProxyMode = 1; | 33 static const int kPolicyAutoDetectProxyMode = 1; |
| 33 static const int kPolicyManuallyConfiguredProxyMode = 2; | 34 static const int kPolicyManuallyConfiguredProxyMode = 2; |
| 34 static const int kPolicyUseSystemProxyMode = 3; | 35 static const int kPolicyUseSystemProxyMode = 3; |
| 35 | 36 |
| 36 // A |ConfigurationPolicyProvider| specifes the value of a policy setting | 37 // A |ConfigurationPolicyProvider| specifes the value of a policy setting |
| 37 // through a call to |Apply|. | 38 // through a call to |Apply|. |
| 38 // The configuration policy pref store takes over the ownership of |value|. | 39 // The configuration policy pref store takes over the ownership of |value|. |
| 39 virtual void Apply(PolicyType policy, Value* value) = 0; | 40 virtual void Apply(PolicyType policy, Value* value) = 0; |
| 40 | 41 |
| 41 private: | 42 private: |
| 42 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyStore); | 43 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyStore); |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 #endif // CHROME_BROWSER_CONFIGURATION_POLICY_STORE_H_ | 46 #endif // CHROME_BROWSER_CONFIGURATION_POLICY_STORE_H_ |
| 46 | |
| OLD | NEW |