Chromium Code Reviews| Index: chrome/browser/prefs/proxy_prefs.h |
| diff --git a/chrome/browser/prefs/proxy_prefs.h b/chrome/browser/prefs/proxy_prefs.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e6cff70e46c5f126fcb5523e1bf136cf34aee8bb |
| --- /dev/null |
| +++ b/chrome/browser/prefs/proxy_prefs.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_PREFS_PROXY_PREFS_H_ |
| +#define CHROME_BROWSER_PREFS_PROXY_PREFS_H_ |
| +#pragma once |
| + |
| +#include <string> |
| + |
| +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
|
| + public: |
| + // Possible types of specifying proxy settings. Do not change the order of |
| + // the constants, because numeric values are exposed to users. |
| + enum ProxyServerMode { |
| + // Direct connection to the network, other proxy preferences are ignored. |
| + 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
|
| + |
| + // Try to retrieve proxy settings from the following sources in the |
| + // following order: |
| + // 1. http://wpad/wpad.dat |
| + // 2. The PAC script at kProxyPacUrl. |
| + // 3. The settings specified in kProxyServer and kProxyBypassList |
| + AUTO_DETECT, |
| + |
| + // Same as AUTO_DETECT except that 1. is always skipped. |
| + MANUAL, |
| + |
| + // The system's proxy settings are used, other proxy preferences are |
| + // ignored. |
| + SYSTEM |
|
danno
2010/12/16 16:29:29
Add "PROXY_MODE_COUNT"
gfeher
2010/12/16 23:54:29
Done.
|
| + }; |
| + |
| + 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.
|
| + static bool StringToMode(const std::string& in_value, |
|
danno
2010/12/16 16:29:29
StringToProxyMode
gfeher
2010/12/16 23:54:29
Done.
|
| + ProxyServerMode* out_value); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_PREFS_PROXY_PREFS_H_ |