OLD | NEW |
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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_resolver_mac.h" | 5 #include "net/proxy/proxy_resolver_mac.h" |
6 | 6 |
7 #include <CoreFoundation/CoreFoundation.h> | 7 #include <CoreFoundation/CoreFoundation.h> |
8 #include <CoreServices/CoreServices.h> | 8 #include <CoreServices/CoreServices.h> |
9 #include <SystemConfiguration/SystemConfiguration.h> | 9 #include <SystemConfiguration/SystemConfiguration.h> |
10 | 10 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } else { | 108 } else { |
109 *result_ptr = CFRetain(proxies); | 109 *result_ptr = CFRetain(proxies); |
110 } | 110 } |
111 CFRunLoopStop(CFRunLoopGetCurrent()); | 111 CFRunLoopStop(CFRunLoopGetCurrent()); |
112 } | 112 } |
113 | 113 |
114 } // namespace | 114 } // namespace |
115 | 115 |
116 namespace net { | 116 namespace net { |
117 | 117 |
118 int ProxyResolverMac::GetProxyConfig(ProxyConfig* config) { | 118 int ProxyConfigServiceMac::GetProxyConfig(ProxyConfig* config) { |
119 scoped_cftyperef<CFDictionaryRef> config_dict( | 119 scoped_cftyperef<CFDictionaryRef> config_dict( |
120 SCDynamicStoreCopyProxies(NULL)); | 120 SCDynamicStoreCopyProxies(NULL)); |
121 DCHECK(config_dict); | 121 DCHECK(config_dict); |
122 | 122 |
123 // auto-detect | 123 // auto-detect |
124 | 124 |
125 // There appears to be no UI for this configuration option, and we're not sure | 125 // There appears to be no UI for this configuration option, and we're not sure |
126 // if Apple's proxy code even takes it into account. But the constant is in | 126 // if Apple's proxy code even takes it into account. But the constant is in |
127 // the header file so we'll use it. | 127 // the header file so we'll use it. |
128 config->auto_detect = | 128 config->auto_detect = |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 | 333 |
334 if (found_proxy) | 334 if (found_proxy) |
335 results->UseNamedProxy(proxy_list); | 335 results->UseNamedProxy(proxy_list); |
336 if (allow_direct) | 336 if (allow_direct) |
337 results->UseDirect(); | 337 results->UseDirect(); |
338 | 338 |
339 return OK; | 339 return OK; |
340 } | 340 } |
341 | 341 |
342 } // namespace net | 342 } // namespace net |
OLD | NEW |