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

Unified Diff: chrome/browser/chromeos/proxy_config_service_impl.cc

Issue 7256003: Bypass proxy for local addresses on chromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: avoid direct rule Created 9 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/proxy_config_service_impl.cc
diff --git a/chrome/browser/chromeos/proxy_config_service_impl.cc b/chrome/browser/chromeos/proxy_config_service_impl.cc
index 9e6e90be8d849664d9771d68ccfa83e949bd3d06..681688c39365ab90262bcd5db07ce54ec3fe6a29 100644
--- a/chrome/browser/chromeos/proxy_config_service_impl.cc
+++ b/chrome/browser/chromeos/proxy_config_service_impl.cc
@@ -415,10 +415,9 @@ bool ProxyConfigServiceImpl::UISetProxyConfigBypassRules(
const net::ProxyBypassRules& bypass_rules) {
// Should be called from UI thread.
CheckCurrentlyOnUIThread();
- DCHECK(reference_config_.mode == ProxyConfig::MODE_SINGLE_PROXY ||
- reference_config_.mode == ProxyConfig::MODE_PROXY_PER_SCHEME);
if (reference_config_.mode != ProxyConfig::MODE_SINGLE_PROXY &&
reference_config_.mode != ProxyConfig::MODE_PROXY_PER_SCHEME) {
+ NOTREACHED();
VLOG(1) << "Cannot set bypass rules for proxy mode ["
<< reference_config_.mode << "]";
return false;
@@ -535,6 +534,10 @@ void ProxyConfigServiceImpl::IOSetProxyConfig(
// Notify observers of new proxy config.
net::ProxyConfig net_config;
cached_config_.ToNetProxyConfig(&net_config);
+ if (net_config.proxy_rules().type !=
+ net::ProxyConfig::ProxyRules::TYPE_NO_RULES) {
+ net_config.proxy_rules().bypass_rules.AddRuleToBypassLocal();
+ }
FOR_EACH_OBSERVER(net::ProxyConfigService::Observer, observers_,
OnProxyConfigChanged(net_config, config_availability_));
}
« 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