Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: chrome/browser/policy/configuration_policy_store_interface.h

Issue 5958014: Policy: Add ProxyMode and deprecate ProxyServerMode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: check final diff Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 kPolicyDefaultSearchProviderInstantURL, 26 kPolicyDefaultSearchProviderInstantURL,
27 kPolicyDefaultSearchProviderEncodings, 27 kPolicyDefaultSearchProviderEncodings,
28 kPolicyDisableSpdy, 28 kPolicyDisableSpdy,
29 kPolicyProxyMode, 29 kPolicyProxyMode,
30 kPolicyProxyServerMode,
30 kPolicyProxyServer, 31 kPolicyProxyServer,
31 kPolicyProxyPacUrl, 32 kPolicyProxyPacUrl,
32 kPolicyProxyBypassList, 33 kPolicyProxyBypassList,
33 kPolicyAlternateErrorPagesEnabled, 34 kPolicyAlternateErrorPagesEnabled,
34 kPolicySearchSuggestEnabled, 35 kPolicySearchSuggestEnabled,
35 kPolicyDnsPrefetchingEnabled, 36 kPolicyDnsPrefetchingEnabled,
36 kPolicySafeBrowsingEnabled, 37 kPolicySafeBrowsingEnabled,
37 kPolicyMetricsReportingEnabled, 38 kPolicyMetricsReportingEnabled,
38 kPolicyPasswordManagerEnabled, 39 kPolicyPasswordManagerEnabled,
39 kPolicyPasswordManagerAllowShowPasswords, 40 kPolicyPasswordManagerAllowShowPasswords,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 74
74 // Constants for the "Proxy Server Mode" defined in the policies. 75 // Constants for the "Proxy Server Mode" defined in the policies.
75 // Note that these diverge from internal presentation defined in 76 // Note that these diverge from internal presentation defined in
76 // ProxyPrefs::ProxyMode for legacy reasons. The following four 77 // ProxyPrefs::ProxyMode for legacy reasons. The following four
77 // PolicyProxyModeType types were not very precise and had overlapping use 78 // PolicyProxyModeType types were not very precise and had overlapping use
78 // cases. 79 // cases.
79 enum PolicyProxyModeType { 80 enum PolicyProxyModeType {
80 // Disable Proxy, connect directly. 81 // Disable Proxy, connect directly.
81 kPolicyNoProxyServerMode = 0, 82 kPolicyNoProxyServerMode = 0,
82 // Auto detect proxy or use specific PAC script if given. 83 // Auto detect proxy or use specific PAC script if given.
83 kPolicyAutoDetectProxyMode = 1, 84 kPolicyAutoDetectProxyServerMode = 1,
84 // Use manually configured proxy servers (fixed servers). 85 // Use manually configured proxy servers (fixed servers).
85 kPolicyManuallyConfiguredProxyMode = 2, 86 kPolicyManuallyConfiguredProxyServerMode = 2,
86 // Use system proxy server. 87 // Use system proxy server.
87 kPolicyUseSystemProxyMode = 3, 88 kPolicyUseSystemProxyServerMode = 3,
88 89
89 MODE_COUNT 90 MODE_COUNT
90 }; 91 };
91 92
92 // An abstract super class for policy stores that provides a method that can be 93 // An abstract super class for policy stores that provides a method that can be
93 // called by a |ConfigurationPolicyProvider| to specify a policy. 94 // called by a |ConfigurationPolicyProvider| to specify a policy.
94 class ConfigurationPolicyStoreInterface { 95 class ConfigurationPolicyStoreInterface {
95 public: 96 public:
96 virtual ~ConfigurationPolicyStoreInterface() {} 97 virtual ~ConfigurationPolicyStoreInterface() {}
97 98
98 // A |ConfigurationPolicyProvider| specifies the value of a policy 99 // A |ConfigurationPolicyProvider| specifies the value of a policy
99 // setting through a call to |Apply|. The configuration policy pref 100 // setting through a call to |Apply|. The configuration policy pref
100 // store takes over the ownership of |value|. 101 // store takes over the ownership of |value|.
101 virtual void Apply(ConfigurationPolicyType policy, Value* value) = 0; 102 virtual void Apply(ConfigurationPolicyType policy, Value* value) = 0;
102 103
103 protected: 104 protected:
104 ConfigurationPolicyStoreInterface() {} 105 ConfigurationPolicyStoreInterface() {}
105 106
106 private: 107 private:
107 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyStoreInterface); 108 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyStoreInterface);
108 }; 109 };
109 110
110 } // namespace policy 111 } // namespace policy
111 112
112 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_STORE_INTERFACE_H_ 113 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_STORE_INTERFACE_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_provider_win_unittest.cc ('k') | chrome/browser/prefs/pref_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698