OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 #include "chrome/browser/importer/firefox_proxy_settings.h" | 5 #include "chrome/browser/importer/firefox_proxy_settings.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/string_tokenizer.h" | 8 #include "base/string_tokenizer.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 if (!ssl_proxy().empty()) { | 140 if (!ssl_proxy().empty()) { |
141 config->proxy_rules().proxy_for_https = net::ProxyServer( | 141 config->proxy_rules().proxy_for_https = net::ProxyServer( |
142 net::ProxyServer::SCHEME_HTTP, | 142 net::ProxyServer::SCHEME_HTTP, |
143 net::HostPortPair(ssl_proxy(), ssl_proxy_port())); | 143 net::HostPortPair(ssl_proxy(), ssl_proxy_port())); |
144 } | 144 } |
145 | 145 |
146 if (!socks_host().empty()) { | 146 if (!socks_host().empty()) { |
147 net::ProxyServer::Scheme proxy_scheme = V5 == socks_version() ? | 147 net::ProxyServer::Scheme proxy_scheme = V5 == socks_version() ? |
148 net::ProxyServer::SCHEME_SOCKS5 : net::ProxyServer::SCHEME_SOCKS4; | 148 net::ProxyServer::SCHEME_SOCKS5 : net::ProxyServer::SCHEME_SOCKS4; |
149 | 149 |
150 config->proxy_rules().socks_proxy = net::ProxyServer( | 150 config->proxy_rules().fallback_proxy = net::ProxyServer( |
151 proxy_scheme, | 151 proxy_scheme, |
152 net::HostPortPair(socks_host(), socks_port())); | 152 net::HostPortPair(socks_host(), socks_port())); |
153 } | 153 } |
154 | 154 |
155 config->proxy_rules().bypass_rules.ParseFromStringUsingSuffixMatching( | 155 config->proxy_rules().bypass_rules.ParseFromStringUsingSuffixMatching( |
156 JoinString(proxy_bypass_list_, ';')); | 156 JoinString(proxy_bypass_list_, ';')); |
157 | 157 |
158 return true; | 158 return true; |
159 } | 159 } |
160 | 160 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 while (string_tok.GetNext()) { | 214 while (string_tok.GetNext()) { |
215 std::string token = string_tok.token(); | 215 std::string token = string_tok.token(); |
216 TrimWhitespaceASCII(token, TRIM_ALL, &token); | 216 TrimWhitespaceASCII(token, TRIM_ALL, &token); |
217 if (!token.empty()) | 217 if (!token.empty()) |
218 settings->proxy_bypass_list_.push_back(token); | 218 settings->proxy_bypass_list_.push_back(token); |
219 } | 219 } |
220 } | 220 } |
221 } | 221 } |
222 return true; | 222 return true; |
223 } | 223 } |
OLD | NEW |