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

Unified Diff: net/proxy/proxy_config_service_android.cc

Issue 796003002: do not send traffic to localhost through proxy for android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_config_service_android.cc
diff --git a/net/proxy/proxy_config_service_android.cc b/net/proxy/proxy_config_service_android.cc
index 50407fe21b7b44dd923730b2f948ab1e0b84efc8..e51f67038419756cbedd5c56d6241283461fab82 100644
--- a/net/proxy/proxy_config_service_android.cc
+++ b/net/proxy/proxy_config_service_android.cc
@@ -98,6 +98,15 @@ void AddBypassRules(const std::string& scheme,
// by | and that use * as a wildcard. For example, setting the
// http.nonProxyHosts property to *.android.com|*.kernel.org will cause
// requests to http://developer.android.com to be made without a proxy.
+
+ // There is no reasonable way to configure localhost
+ // to not go through the proxy. The Linux version of
+ // proxy_config_service does, just not the android
Torne 2014/12/11 17:44:49 Describing the reason why a change was made doesn'
+ // version. As sending communication to localhost through
+ // the proxy is silly, we force a bypass rule for
+ // localhost, causing it to never go through the proxy.
+ bypass_rules->AddRuleToBypassLocal();
+
std::string non_proxy_hosts =
get_property.Run(scheme + ".nonProxyHosts");
if (non_proxy_hosts.empty())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698