| 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_POLICY_CONFIGURATION_POLICY_STORE_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_STORE_INTERFACE_H_ |
| 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_STORE_INTERFACE_H_ | 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_STORE_INTERFACE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 | 10 |
| 11 class Value; | 11 class Value; |
| 12 | 12 |
| 13 namespace policy { | 13 namespace policy { |
| 14 | 14 |
| 15 enum ConfigurationPolicyType { | 15 enum ConfigurationPolicyType { |
| 16 kPolicyHomePage, | 16 kPolicyHomePage, |
| 17 kPolicyHomepageIsNewTabPage, | 17 kPolicyHomepageIsNewTabPage, |
| 18 kPolicyRestoreOnStartup, | 18 kPolicyRestoreOnStartup, |
| 19 kPolicyURLsToRestoreOnStartup, | 19 kPolicyURLsToRestoreOnStartup, |
| 20 kPolicyDefaultSearchProviderEnabled, | 20 kPolicyDefaultSearchProviderEnabled, |
| 21 kPolicyDefaultSearchProviderName, | 21 kPolicyDefaultSearchProviderName, |
| 22 kPolicyDefaultSearchProviderKeyword, | 22 kPolicyDefaultSearchProviderKeyword, |
| 23 kPolicyDefaultSearchProviderSearchURL, | 23 kPolicyDefaultSearchProviderSearchURL, |
| 24 kPolicyDefaultSearchProviderSuggestURL, | 24 kPolicyDefaultSearchProviderSuggestURL, |
| 25 kPolicyDefaultSearchProviderIconURL, | 25 kPolicyDefaultSearchProviderIconURL, |
| 26 kPolicyDefaultSearchProviderEncodings, | 26 kPolicyDefaultSearchProviderEncodings, |
| 27 kPolicyDisableSpdy, | 27 kPolicyDisableSpdy, |
| 28 kPolicyProxyMode, | 28 kPolicyProxyMode, |
| 29 kPolicyProxyServerMode, |
| 29 kPolicyProxyServer, | 30 kPolicyProxyServer, |
| 30 kPolicyProxyPacUrl, | 31 kPolicyProxyPacUrl, |
| 31 kPolicyProxyBypassList, | 32 kPolicyProxyBypassList, |
| 32 kPolicyAlternateErrorPagesEnabled, | 33 kPolicyAlternateErrorPagesEnabled, |
| 33 kPolicySearchSuggestEnabled, | 34 kPolicySearchSuggestEnabled, |
| 34 kPolicyDnsPrefetchingEnabled, | 35 kPolicyDnsPrefetchingEnabled, |
| 35 kPolicySafeBrowsingEnabled, | 36 kPolicySafeBrowsingEnabled, |
| 36 kPolicyMetricsReportingEnabled, | 37 kPolicyMetricsReportingEnabled, |
| 37 kPolicyPasswordManagerEnabled, | 38 kPolicyPasswordManagerEnabled, |
| 38 kPolicyPasswordManagerAllowShowPasswords, | 39 kPolicyPasswordManagerAllowShowPasswords, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 73 |
| 73 // Constants for the "Proxy Server Mode" defined in the policies. | 74 // Constants for the "Proxy Server Mode" defined in the policies. |
| 74 // Note that these diverge from internal presentation defined in | 75 // Note that these diverge from internal presentation defined in |
| 75 // ProxyPrefs::ProxyMode for legacy reasons. The following four | 76 // ProxyPrefs::ProxyMode for legacy reasons. The following four |
| 76 // PolicyProxyModeType types were not very precise and had overlapping use | 77 // PolicyProxyModeType types were not very precise and had overlapping use |
| 77 // cases. | 78 // cases. |
| 78 enum PolicyProxyModeType { | 79 enum PolicyProxyModeType { |
| 79 // Disable Proxy, connect directly. | 80 // Disable Proxy, connect directly. |
| 80 kPolicyNoProxyServerMode = 0, | 81 kPolicyNoProxyServerMode = 0, |
| 81 // Auto detect proxy or use specific PAC script if given. | 82 // Auto detect proxy or use specific PAC script if given. |
| 82 kPolicyAutoDetectProxyMode = 1, | 83 kPolicyAutoDetectProxyServerMode = 1, |
| 83 // Use manually configured proxy servers (fixed servers). | 84 // Use manually configured proxy servers (fixed servers). |
| 84 kPolicyManuallyConfiguredProxyMode = 2, | 85 kPolicyManuallyConfiguredProxyServerMode = 2, |
| 85 // Use system proxy server. | 86 // Use system proxy server. |
| 86 kPolicyUseSystemProxyMode = 3, | 87 kPolicyUseSystemProxyServerMode = 3, |
| 87 | 88 |
| 88 MODE_COUNT | 89 MODE_COUNT |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 // An abstract super class for policy stores that provides a method that can be | 92 // An abstract super class for policy stores that provides a method that can be |
| 92 // called by a |ConfigurationPolicyProvider| to specify a policy. | 93 // called by a |ConfigurationPolicyProvider| to specify a policy. |
| 93 class ConfigurationPolicyStoreInterface { | 94 class ConfigurationPolicyStoreInterface { |
| 94 public: | 95 public: |
| 95 virtual ~ConfigurationPolicyStoreInterface() {} | 96 virtual ~ConfigurationPolicyStoreInterface() {} |
| 96 | 97 |
| 97 // A |ConfigurationPolicyProvider| specifies the value of a policy | 98 // A |ConfigurationPolicyProvider| specifies the value of a policy |
| 98 // setting through a call to |Apply|. The configuration policy pref | 99 // setting through a call to |Apply|. The configuration policy pref |
| 99 // store takes over the ownership of |value|. | 100 // store takes over the ownership of |value|. |
| 100 virtual void Apply(ConfigurationPolicyType policy, Value* value) = 0; | 101 virtual void Apply(ConfigurationPolicyType policy, Value* value) = 0; |
| 101 | 102 |
| 102 protected: | 103 protected: |
| 103 ConfigurationPolicyStoreInterface() {} | 104 ConfigurationPolicyStoreInterface() {} |
| 104 | 105 |
| 105 private: | 106 private: |
| 106 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyStoreInterface); | 107 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyStoreInterface); |
| 107 }; | 108 }; |
| 108 | 109 |
| 109 } // namespace policy | 110 } // namespace policy |
| 110 | 111 |
| 111 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_STORE_INTERFACE_H_ | 112 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_STORE_INTERFACE_H_ |
| OLD | NEW |