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

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

Issue 6004003: Introduce a separate preference for 'proxy server mode' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Eric's comments Created 10 years 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 kPolicyDefaultSearchProviderEncodings, 26 kPolicyDefaultSearchProviderEncodings,
27 kPolicyDisableSpdy, 27 kPolicyDisableSpdy,
28 kPolicyProxyServerMode, 28 kPolicyProxyMode,
29 kPolicyProxyServer, 29 kPolicyProxyServer,
30 kPolicyProxyPacUrl, 30 kPolicyProxyPacUrl,
31 kPolicyProxyBypassList, 31 kPolicyProxyBypassList,
32 kPolicyAlternateErrorPagesEnabled, 32 kPolicyAlternateErrorPagesEnabled,
33 kPolicySearchSuggestEnabled, 33 kPolicySearchSuggestEnabled,
34 kPolicyDnsPrefetchingEnabled, 34 kPolicyDnsPrefetchingEnabled,
35 kPolicySafeBrowsingEnabled, 35 kPolicySafeBrowsingEnabled,
36 kPolicyMetricsReportingEnabled, 36 kPolicyMetricsReportingEnabled,
37 kPolicyPasswordManagerEnabled, 37 kPolicyPasswordManagerEnabled,
38 kPolicyPasswordManagerAllowShowPasswords, 38 kPolicyPasswordManagerAllowShowPasswords,
(...skipping 23 matching lines...) Expand all
62 kPolicyChromeOsLockOnIdleSuspend, 62 kPolicyChromeOsLockOnIdleSuspend,
63 kPolicyAuthSchemes, 63 kPolicyAuthSchemes,
64 kPolicyDisableAuthNegotiateCnameLookup, 64 kPolicyDisableAuthNegotiateCnameLookup,
65 kPolicyEnableAuthNegotiatePort, 65 kPolicyEnableAuthNegotiatePort,
66 kPolicyAuthServerWhitelist, 66 kPolicyAuthServerWhitelist,
67 kPolicyAuthNegotiateDelegateWhitelist, 67 kPolicyAuthNegotiateDelegateWhitelist,
68 kPolicyGSSAPILibraryName, 68 kPolicyGSSAPILibraryName,
69 kPolicyDisable3DAPIs 69 kPolicyDisable3DAPIs
70 }; 70 };
71 71
72 static const int kPolicyNoProxyServerMode = 0; 72
73 static const int kPolicyAutoDetectProxyMode = 1; 73 // Constants for the "Proxy Server Mode" defined in the policies.
74 static const int kPolicyManuallyConfiguredProxyMode = 2; 74 // Note that these diverge from internal presentation defined in
75 static const int kPolicyUseSystemProxyMode = 3; 75 // ProxyPrefs::ProxyMode for legacy reasons. The following four
76 // PolicyProxyModeType types were not very precise and had overlapping use
77 // cases.
78 enum PolicyProxyModeType {
79 // Disable Proxy, connect directly.
80 kPolicyNoProxyServerMode = 0,
81 // Auto detect proxy or use specific PAC script if given.
82 kPolicyAutoDetectProxyMode = 1,
83 // Use manually configured proxy servers (fixed servers).
84 kPolicyManuallyConfiguredProxyMode = 2,
85 // Use system proxy server.
86 kPolicyUseSystemProxyMode = 3,
87
88 NUM_PROXY_MODES
Mattias Nissler (ping if slow) 2010/12/22 10:22:12 why use a CAPS_CONSTANT if all others use kCameCas
battre 2010/12/22 14:41:16 Done.
89 };
76 90
77 // An abstract super class for policy stores that provides a method that can be 91 // An abstract super class for policy stores that provides a method that can be
78 // called by a |ConfigurationPolicyProvider| to specify a policy. 92 // called by a |ConfigurationPolicyProvider| to specify a policy.
79 class ConfigurationPolicyStoreInterface { 93 class ConfigurationPolicyStoreInterface {
80 public: 94 public:
81 virtual ~ConfigurationPolicyStoreInterface() {} 95 virtual ~ConfigurationPolicyStoreInterface() {}
82 96
83 // A |ConfigurationPolicyProvider| specifies the value of a policy 97 // A |ConfigurationPolicyProvider| specifies the value of a policy
84 // setting through a call to |Apply|. The configuration policy pref 98 // setting through a call to |Apply|. The configuration policy pref
85 // store takes over the ownership of |value|. 99 // store takes over the ownership of |value|.
86 virtual void Apply(ConfigurationPolicyType policy, Value* value) = 0; 100 virtual void Apply(ConfigurationPolicyType policy, Value* value) = 0;
87 101
88 protected: 102 protected:
89 ConfigurationPolicyStoreInterface() {} 103 ConfigurationPolicyStoreInterface() {}
90 104
91 private: 105 private:
92 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyStoreInterface); 106 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyStoreInterface);
93 }; 107 };
94 108
95 } // namespace policy 109 } // namespace policy
96 110
97 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_STORE_INTERFACE_H_ 111 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_STORE_INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698