| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 10 #include "base/bind.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 } | 147 } |
| 148 } | 148 } |
| 149 | 149 |
| 150 // proxy bypass boolean | 150 // proxy bypass boolean |
| 151 | 151 |
| 152 if (GetBoolFromDictionary(config_dict.get(), | 152 if (GetBoolFromDictionary(config_dict.get(), |
| 153 kSCPropNetProxiesExcludeSimpleHostnames, | 153 kSCPropNetProxiesExcludeSimpleHostnames, |
| 154 false)) { | 154 false)) { |
| 155 config->proxy_rules().bypass_rules.AddRuleToBypassLocal(); | 155 config->proxy_rules().bypass_rules.AddRuleToBypassLocal(); |
| 156 } | 156 } |
| 157 |
| 158 // Source |
| 159 config->set_source(PROXY_CONFIG_SOURCE_SYSTEM); |
| 157 } | 160 } |
| 158 | 161 |
| 159 } // namespace | 162 } // namespace |
| 160 | 163 |
| 161 // Reference-counted helper for posting a task to | 164 // Reference-counted helper for posting a task to |
| 162 // ProxyConfigServiceMac::OnProxyConfigChanged between the notifier and IO | 165 // ProxyConfigServiceMac::OnProxyConfigChanged between the notifier and IO |
| 163 // thread. This helper object may outlive the ProxyConfigServiceMac. | 166 // thread. This helper object may outlive the ProxyConfigServiceMac. |
| 164 class ProxyConfigServiceMac::Helper | 167 class ProxyConfigServiceMac::Helper |
| 165 : public base::RefCountedThreadSafe<ProxyConfigServiceMac::Helper> { | 168 : public base::RefCountedThreadSafe<ProxyConfigServiceMac::Helper> { |
| 166 public: | 169 public: |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 // Keep track of the last value we have seen. | 265 // Keep track of the last value we have seen. |
| 263 has_fetched_config_ = true; | 266 has_fetched_config_ = true; |
| 264 last_config_fetched_ = new_config; | 267 last_config_fetched_ = new_config; |
| 265 | 268 |
| 266 // Notify all the observers. | 269 // Notify all the observers. |
| 267 FOR_EACH_OBSERVER(Observer, observers_, | 270 FOR_EACH_OBSERVER(Observer, observers_, |
| 268 OnProxyConfigChanged(new_config, CONFIG_VALID)); | 271 OnProxyConfigChanged(new_config, CONFIG_VALID)); |
| 269 } | 272 } |
| 270 | 273 |
| 271 } // namespace net | 274 } // namespace net |
| OLD | NEW |