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_COMMON_PROXY_PREFS_H_ |
| 6 #define CHROME_COMMON_PROXY_PREFS_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <string> |
| 10 |
| 11 class ProxyPrefs { |
| 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, |
| 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 |
| 32 }; |
| 33 |
| 34 static bool IntToMode(int in_value, ProxyServerMode* out_value); |
| 35 static bool StringToMode(const std::string& in_value, |
| 36 ProxyServerMode* out_value); |
| 37 }; |
| 38 |
| 39 #endif // CHROME_COMMON_PROXY_PREFS_H_ |
OLD | NEW |