| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CHROMEOS_UI_PROXY_CONFIG_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_UI_PROXY_CONFIG_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_UI_PROXY_CONFIG_H_ | 6 #define CHROME_BROWSER_CHROMEOS_UI_PROXY_CONFIG_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "components/proxy_config/proxy_prefs.h" | 10 #include "components/proxy_config/proxy_prefs.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 bool FromNetProxyConfig(const net::ProxyConfig& net_config); | 72 bool FromNetProxyConfig(const net::ProxyConfig& net_config); |
| 73 | 73 |
| 74 // Converts |this| to Dictionary of ProxyConfigDictionary format (which | 74 // Converts |this| to Dictionary of ProxyConfigDictionary format (which |
| 75 // is the same format used by prefs). | 75 // is the same format used by prefs). |
| 76 base::DictionaryValue* ToPrefProxyConfig() const; | 76 base::DictionaryValue* ToPrefProxyConfig() const; |
| 77 | 77 |
| 78 // Map |scheme| (one of "http", "https", "ftp" or "socks") to the correct | 78 // Map |scheme| (one of "http", "https", "ftp" or "socks") to the correct |
| 79 // ManualProxy. Returns NULL if scheme is invalid. | 79 // ManualProxy. Returns NULL if scheme is invalid. |
| 80 ManualProxy* MapSchemeToProxy(const std::string& scheme); | 80 ManualProxy* MapSchemeToProxy(const std::string& scheme); |
| 81 | 81 |
| 82 // Encodes the proxy server as "<url-scheme>=<proxy-scheme>://<proxy>" | |
| 83 static void EncodeAndAppendProxyServer(const std::string& url_scheme, | |
| 84 const net::ProxyServer& server, | |
| 85 std::string* spec); | |
| 86 | |
| 87 Mode mode; | 82 Mode mode; |
| 88 | 83 |
| 89 ProxyPrefs::ConfigState state; | 84 ProxyPrefs::ConfigState state; |
| 90 | 85 |
| 91 // True if user can modify proxy settings via UI. | 86 // True if user can modify proxy settings via UI. |
| 92 // If proxy is managed by policy or extension or other_precde or is for | 87 // If proxy is managed by policy or extension or other_precde or is for |
| 93 // shared network but kUseSharedProxies is turned off, it can't be modified | 88 // shared network but kUseSharedProxies is turned off, it can't be modified |
| 94 // by user. | 89 // by user. |
| 95 bool user_modifiable; | 90 bool user_modifiable; |
| 96 | 91 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 107 // Set if mode is MODE_PROXY_PER_SCHEME and has socks proxy. | 102 // Set if mode is MODE_PROXY_PER_SCHEME and has socks proxy. |
| 108 ManualProxy socks_proxy; | 103 ManualProxy socks_proxy; |
| 109 | 104 |
| 110 // Exceptions for when not to use a proxy. | 105 // Exceptions for when not to use a proxy. |
| 111 net::ProxyBypassRules bypass_rules; | 106 net::ProxyBypassRules bypass_rules; |
| 112 }; | 107 }; |
| 113 | 108 |
| 114 } // namespace chromeos | 109 } // namespace chromeos |
| 115 | 110 |
| 116 #endif // CHROME_BROWSER_CHROMEOS_UI_PROXY_CONFIG_H_ | 111 #endif // CHROME_BROWSER_CHROMEOS_UI_PROXY_CONFIG_H_ |
| OLD | NEW |