1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_PREFS_PROXY_PREFS_H_
6 #define CHROME_BROWSER_PREFS_PROXY_PREFS_H_
10 namespace ProxyPrefs
{
12 // Possible types of specifying proxy settings. Do not change the order of
13 // the constants, because numeric values are exposed to users.
14 // If you add an enum constant, you should also add a string to
15 // kProxyModeNames in the .cc file.
17 // Direct connection to the network, other proxy preferences are ignored.
20 // Try to retrieve a PAC script from http://wpad/wpad.dat or fall back to
24 // Try to retrieve a PAC script from kProxyPacURL or fall back to direct
28 // Use the settings specified in kProxyServer and kProxyBypassList.
29 MODE_FIXED_SERVERS
= 3,
31 // The system's proxy settings are used, other proxy preferences are
38 // State of proxy configuration.
40 // Configuration is from policy.
42 // Configuration is from extension.
44 // Configuration is not from policy or extension but still precedes others.
46 // Configuration is from system.
48 // Configuration is recommended i.e there's a fallback configuration.
50 // Configuration is known to be not set.
54 // Constants for string values used to specify the proxy mode through externally
55 // visible APIs, e.g. through policy or the proxy extension API.
56 extern const char kDirectProxyModeName
[];
57 extern const char kAutoDetectProxyModeName
[];
58 extern const char kPacScriptProxyModeName
[];
59 extern const char kFixedServersProxyModeName
[];
60 extern const char kSystemProxyModeName
[];
62 bool IntToProxyMode(int in_value
, ProxyMode
* out_value
);
63 bool StringToProxyMode(const std::string
& in_value
, ProxyMode
* out_value
);
64 // Ownership of the return value is NOT passed to the caller.
65 const char* ProxyModeToString(ProxyMode mode
);
66 std::string
ConfigStateToDebugString(ConfigState state
);
68 } // namespace ProxyPrefs
70 #endif // CHROME_BROWSER_PREFS_PROXY_PREFS_H_