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 "net/proxy/proxy_config_service_mac.h" | 5 #include "net/proxy/proxy_config_service_mac.h" |
6 | 6 |
7 #include <CoreFoundation/CoreFoundation.h> | 7 #include <CoreFoundation/CoreFoundation.h> |
8 #include <SystemConfiguration/SystemConfiguration.h> | 8 #include <SystemConfiguration/SystemConfiguration.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 kSCPropNetProxiesSOCKSEnable, | 115 kSCPropNetProxiesSOCKSEnable, |
116 false)) { | 116 false)) { |
117 ProxyServer proxy_server = | 117 ProxyServer proxy_server = |
118 ProxyServer::FromDictionary(ProxyServer::SCHEME_SOCKS5, | 118 ProxyServer::FromDictionary(ProxyServer::SCHEME_SOCKS5, |
119 config_dict.get(), | 119 config_dict.get(), |
120 kSCPropNetProxiesSOCKSProxy, | 120 kSCPropNetProxiesSOCKSProxy, |
121 kSCPropNetProxiesSOCKSPort); | 121 kSCPropNetProxiesSOCKSPort); |
122 if (proxy_server.is_valid()) { | 122 if (proxy_server.is_valid()) { |
123 config->proxy_rules().type = | 123 config->proxy_rules().type = |
124 ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME; | 124 ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME; |
125 config->proxy_rules().socks_proxy = proxy_server; | 125 config->proxy_rules().fallback_proxy = proxy_server; |
126 } | 126 } |
127 } | 127 } |
128 | 128 |
129 // proxy bypass list | 129 // proxy bypass list |
130 | 130 |
131 CFArrayRef bypass_array_ref = | 131 CFArrayRef bypass_array_ref = |
132 (CFArrayRef)mac_util::GetValueFromDictionary( | 132 (CFArrayRef)mac_util::GetValueFromDictionary( |
133 config_dict.get(), | 133 config_dict.get(), |
134 kSCPropNetProxiesExceptionsList, | 134 kSCPropNetProxiesExceptionsList, |
135 CFArrayGetTypeID()); | 135 CFArrayGetTypeID()); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 255 |
256 // Keep track of the last value we have seen. | 256 // Keep track of the last value we have seen. |
257 has_fetched_config_ = true; | 257 has_fetched_config_ = true; |
258 last_config_fetched_ = new_config; | 258 last_config_fetched_ = new_config; |
259 | 259 |
260 // Notify all the observers. | 260 // Notify all the observers. |
261 FOR_EACH_OBSERVER(Observer, observers_, OnProxyConfigChanged(new_config)); | 261 FOR_EACH_OBSERVER(Observer, observers_, OnProxyConfigChanged(new_config)); |
262 } | 262 } |
263 | 263 |
264 } // namespace net | 264 } // namespace net |
OLD | NEW |