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

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: Extraction undone - as per Mattias' request 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 20 matching lines...) Expand all
59 kPolicyExtensionInstallForceList, 59 kPolicyExtensionInstallForceList,
60 kPolicyChromeOsLockOnIdleSuspend, 60 kPolicyChromeOsLockOnIdleSuspend,
61 kPolicyAuthSchemes, 61 kPolicyAuthSchemes,
62 kPolicyDisableAuthNegotiateCnameLookup, 62 kPolicyDisableAuthNegotiateCnameLookup,
63 kPolicyEnableAuthNegotiatePort, 63 kPolicyEnableAuthNegotiatePort,
64 kPolicyAuthServerWhitelist, 64 kPolicyAuthServerWhitelist,
65 kPolicyAuthNegotiateDelegateWhitelist, 65 kPolicyAuthNegotiateDelegateWhitelist,
66 kPolicyGSSAPILibraryName, 66 kPolicyGSSAPILibraryName,
67 }; 67 };
68 68
69 static const int kPolicyNoProxyServerMode = 0; 69
70 static const int kPolicyAutoDetectProxyMode = 1; 70 // Constants for the "Proxy Server Mode" defined in the policies.
71 static const int kPolicyManuallyConfiguredProxyMode = 2; 71 // Note that these diverge from internal presentation defined in
72 static const int kPolicyUseSystemProxyMode = 3; 72 // ProxyPrefs::ProxyMode for legacy reasons.
Mattias Nissler (ping if slow) 2010/12/21 15:54:29 You should also explain what these legacy reasons
battre (please use the other) 2010/12/21 20:14:09 Done.
73 enum PolicyProxyModeType {
74 // Disable Proxy, connect directly.
75 kPolicyNoProxyServerMode = 0,
76 // Auto detect proxy or use specific PAC script if given.
77 kPolicyAutoDetectProxyMode = 1,
78 // Use manually configured proxy servers (fixed servers).
79 kPolicyManuallyConfiguredProxyMode = 2,
80 // Use system proxy server.
81 kPolicyUseSystemProxyMode = 3,
82
83 NUM_PROXY_MODES
84 };
73 85
74 // An abstract super class for policy stores that provides a method that can be 86 // An abstract super class for policy stores that provides a method that can be
75 // called by a |ConfigurationPolicyProvider| to specify a policy. 87 // called by a |ConfigurationPolicyProvider| to specify a policy.
76 class ConfigurationPolicyStoreInterface { 88 class ConfigurationPolicyStoreInterface {
77 public: 89 public:
78 virtual ~ConfigurationPolicyStoreInterface() {} 90 virtual ~ConfigurationPolicyStoreInterface() {}
79 91
80 // A |ConfigurationPolicyProvider| specifies the value of a policy 92 // A |ConfigurationPolicyProvider| specifies the value of a policy
81 // setting through a call to |Apply|. The configuration policy pref 93 // setting through a call to |Apply|. The configuration policy pref
82 // store takes over the ownership of |value|. 94 // store takes over the ownership of |value|.
83 virtual void Apply(ConfigurationPolicyType policy, Value* value) = 0; 95 virtual void Apply(ConfigurationPolicyType policy, Value* value) = 0;
84 96
97 // Called after all values have been passed to Apply.
98 virtual void Completed() = 0;
85 protected: 99 protected:
86 ConfigurationPolicyStoreInterface() {} 100 ConfigurationPolicyStoreInterface() {}
87 101
88 private: 102 private:
89 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyStoreInterface); 103 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyStoreInterface);
90 }; 104 };
91 105
92 } // namespace policy 106 } // namespace policy
93 107
94 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_STORE_INTERFACE_H_ 108 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_STORE_INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698