Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Unified Diff: net/proxy/proxy_config_service_linux.cc

Issue 149191: Whenever proxy configurations contain socks and http/https/ftp proxies, socks... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/proxy/proxy_config_service_common_unittest.cc ('k') | net/proxy/proxy_config_service_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_config_service_linux.cc
===================================================================
--- net/proxy/proxy_config_service_linux.cc (revision 20472)
+++ net/proxy/proxy_config_service_linux.cc (working copy)
@@ -55,6 +55,7 @@
// an appropriate proxy server scheme prefix.
// scheme indicates the desired proxy scheme: usually http, with
// socks 4 or 5 as special cases.
+// TODO(arindam): Remove URI string manipulation by using MapUrlSchemeToProxy.
std::string FixupProxyHostScheme(ProxyServer::Scheme scheme,
std::string host) {
if (scheme == ProxyServer::SCHEME_SOCKS4 &&
@@ -94,7 +95,8 @@
if (env_var_getter_->Getenv(variable, &env_value)) {
if (!env_value.empty()) {
env_value = FixupProxyHostScheme(scheme, env_value);
- ProxyServer proxy_server = ProxyServer::FromURI(env_value);
+ ProxyServer proxy_server =
+ ProxyServer::FromURI(env_value, ProxyServer::SCHEME_HTTP);
if (proxy_server.is_valid() && !proxy_server.is_direct()) {
*result_server = proxy_server;
return true;
@@ -386,7 +388,8 @@
host = FixupProxyHostScheme(
is_socks ? ProxyServer::SCHEME_SOCKS4 : ProxyServer::SCHEME_HTTP,
host);
- ProxyServer proxy_server = ProxyServer::FromURI(host);
+ ProxyServer proxy_server = ProxyServer::FromURI(host,
+ ProxyServer::SCHEME_HTTP);
if (proxy_server.is_valid()) {
*result_server = proxy_server;
return true;
« no previous file with comments | « net/proxy/proxy_config_service_common_unittest.cc ('k') | net/proxy/proxy_config_service_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698