OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_PREFS_PROXY_PREFS_H_ | |
6 #define CHROME_BROWSER_PREFS_PROXY_PREFS_H_ | |
7 #pragma once | |
8 | |
9 #include <string> | |
10 | |
11 class ProxyPrefs { | |
danno
2010/12/16 16:29:29
Put these in the prefs namespace
gfeher
2010/12/16 23:54:29
The prefs namespace currently only contains the co
| |
12 public: | |
13 // Possible types of specifying proxy settings. Do not change the order of | |
14 // the constants, because numeric values are exposed to users. | |
15 enum ProxyServerMode { | |
16 // Direct connection to the network, other proxy preferences are ignored. | |
17 DISABLED, | |
danno
2010/12/16 16:29:29
In order to not pollute the namespace, prefix with
danno
2010/12/16 16:29:29
Maybe add specific = values here? might obviate th
gfeher
2010/12/16 23:54:29
extension.h and session_startup_pref.h have simila
gfeher
2010/12/16 23:54:29
Specific int values are encouraged by the style gu
| |
18 | |
19 // Try to retrieve proxy settings from the following sources in the | |
20 // following order: | |
21 // 1. http://wpad/wpad.dat | |
22 // 2. The PAC script at kProxyPacUrl. | |
23 // 3. The settings specified in kProxyServer and kProxyBypassList | |
24 AUTO_DETECT, | |
25 | |
26 // Same as AUTO_DETECT except that 1. is always skipped. | |
27 MANUAL, | |
28 | |
29 // The system's proxy settings are used, other proxy preferences are | |
30 // ignored. | |
31 SYSTEM | |
danno
2010/12/16 16:29:29
Add "PROXY_MODE_COUNT"
gfeher
2010/12/16 23:54:29
Done.
| |
32 }; | |
33 | |
34 static bool IntToMode(int in_value, ProxyServerMode* out_value); | |
danno
2010/12/16 16:29:29
IntToProxyMode
gfeher
2010/12/16 23:54:29
Done.
| |
35 static bool StringToMode(const std::string& in_value, | |
danno
2010/12/16 16:29:29
StringToProxyMode
gfeher
2010/12/16 23:54:29
Done.
| |
36 ProxyServerMode* out_value); | |
37 }; | |
38 | |
39 #endif // CHROME_BROWSER_PREFS_PROXY_PREFS_H_ | |
OLD | NEW |