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 CHROMEOS_NETWORK_PROXY_UI_PROXY_CONFIG_H_ | 5 #ifndef CHROMEOS_NETWORK_PROXY_UI_PROXY_CONFIG_H_ |
6 #define CHROMEOS_NETWORK_PROXY_UI_PROXY_CONFIG_H_ | 6 #define CHROMEOS_NETWORK_PROXY_UI_PROXY_CONFIG_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
jdoerrie
2017/03/30 11:00:39
Nit: add #include <memory>
vabr (Chromium)
2017/03/30 12:07:41
Done.
| |
9 | 9 |
10 #include "chromeos/chromeos_export.h" | 10 #include "chromeos/chromeos_export.h" |
11 #include "components/proxy_config/proxy_prefs.h" | 11 #include "components/proxy_config/proxy_prefs.h" |
12 #include "net/proxy/proxy_bypass_rules.h" | 12 #include "net/proxy/proxy_bypass_rules.h" |
13 #include "net/proxy/proxy_server.h" | 13 #include "net/proxy/proxy_server.h" |
14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class DictionaryValue; | 17 class DictionaryValue; |
18 } | 18 } |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 const net::ProxyServer& server); | 67 const net::ProxyServer& server); |
68 | 68 |
69 // Only valid for MODE_SINGLE_PROXY or MODE_PROXY_PER_SCHEME. | 69 // Only valid for MODE_SINGLE_PROXY or MODE_PROXY_PER_SCHEME. |
70 void SetBypassRules(const net::ProxyBypassRules& rules); | 70 void SetBypassRules(const net::ProxyBypassRules& rules); |
71 | 71 |
72 // Converts net::ProxyConfig to |this|. | 72 // Converts net::ProxyConfig to |this|. |
73 bool FromNetProxyConfig(const net::ProxyConfig& net_config); | 73 bool FromNetProxyConfig(const net::ProxyConfig& net_config); |
74 | 74 |
75 // Converts |this| to Dictionary of ProxyConfigDictionary format (which | 75 // Converts |this| to Dictionary of ProxyConfigDictionary format (which |
76 // is the same format used by prefs). | 76 // is the same format used by prefs). |
77 base::DictionaryValue* ToPrefProxyConfig() const; | 77 std::unique_ptr<base::DictionaryValue> ToPrefProxyConfig() const; |
78 | 78 |
79 // Map |scheme| (one of "http", "https", "ftp" or "socks") to the correct | 79 // Map |scheme| (one of "http", "https", "ftp" or "socks") to the correct |
80 // ManualProxy. Returns NULL if scheme is invalid. | 80 // ManualProxy. Returns NULL if scheme is invalid. |
81 ManualProxy* MapSchemeToProxy(const std::string& scheme); | 81 ManualProxy* MapSchemeToProxy(const std::string& scheme); |
82 | 82 |
83 Mode mode; | 83 Mode mode; |
84 | 84 |
85 ProxyPrefs::ConfigState state; | 85 ProxyPrefs::ConfigState state; |
86 | 86 |
87 // True if user can modify proxy settings via UI. | 87 // True if user can modify proxy settings via UI. |
(...skipping 15 matching lines...) Expand all Loading... | |
103 // Set if mode is MODE_PROXY_PER_SCHEME and has socks proxy. | 103 // Set if mode is MODE_PROXY_PER_SCHEME and has socks proxy. |
104 ManualProxy socks_proxy; | 104 ManualProxy socks_proxy; |
105 | 105 |
106 // Exceptions for when not to use a proxy. | 106 // Exceptions for when not to use a proxy. |
107 net::ProxyBypassRules bypass_rules; | 107 net::ProxyBypassRules bypass_rules; |
108 }; | 108 }; |
109 | 109 |
110 } // namespace chromeos | 110 } // namespace chromeos |
111 | 111 |
112 #endif // CHROMEOS_NETWORK_PROXY_UI_PROXY_CONFIG_H_ | 112 #endif // CHROMEOS_NETWORK_PROXY_UI_PROXY_CONFIG_H_ |
OLD | NEW |