| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1163 | 1163 |
| 1164 if (proxyDict != NULL) { | 1164 if (proxyDict != NULL) { |
| 1165 // sending it off to another function makes it easier to unit test | 1165 // sending it off to another function makes it easier to unit test |
| 1166 // since we can make our own dictionary to hand to that function. | 1166 // since we can make our own dictionary to hand to that function. |
| 1167 result = GetMacProxySettingsFromDictionary(proxy, proxyDict); | 1167 result = GetMacProxySettingsFromDictionary(proxy, proxyDict); |
| 1168 | 1168 |
| 1169 if (result) { | 1169 if (result) { |
| 1170 result = p_putPasswordInProxyInfo(proxy); | 1170 result = p_putPasswordInProxyInfo(proxy); |
| 1171 } | 1171 } |
| 1172 | 1172 |
| 1173 // We created the dictionary with something that had the |
| 1174 // word 'copy' in it, so we have to release it, according |
| 1175 // to the Carbon memory management standards. |
| 1173 CFRelease(proxyDict); | 1176 CFRelease(proxyDict); |
| 1174 } else { | 1177 } else { |
| 1175 LOG(LS_ERROR) << "SCDynamicStoreCopyProxies failed"; | 1178 LOG(LS_ERROR) << "SCDynamicStoreCopyProxies failed"; |
| 1176 } | 1179 } |
| 1177 | 1180 |
| 1178 return result; | 1181 return result; |
| 1179 } | 1182 } |
| 1180 #endif // WEBRTC_MAC && !defined(WEBRTC_IOS) | 1183 #endif // WEBRTC_MAC && !defined(WEBRTC_IOS) |
| 1181 | 1184 |
| 1182 #ifdef WEBRTC_IOS | 1185 #ifdef WEBRTC_IOS |
| (...skipping 30 matching lines...) Expand all Loading... |
| 1213 // Finally, try HTTP proxy. Note that flute doesn't | 1216 // Finally, try HTTP proxy. Note that flute doesn't |
| 1214 // differentiate between HTTPS and HTTP, hence we are using the | 1217 // differentiate between HTTPS and HTTP, hence we are using the |
| 1215 // same flute type here, ie. PROXY_HTTPS. | 1218 // same flute type here, ie. PROXY_HTTPS. |
| 1216 proxy->type = PROXY_HTTPS; | 1219 proxy->type = PROXY_HTTPS; |
| 1217 | 1220 |
| 1218 proxy->address.SetIP(hostname); | 1221 proxy->address.SetIP(hostname); |
| 1219 proxy->address.SetPort(port); | 1222 proxy->address.SetPort(port); |
| 1220 result = true; | 1223 result = true; |
| 1221 } | 1224 } |
| 1222 | 1225 |
| 1226 // We created the dictionary with something that had the |
| 1227 // word 'copy' in it, so we have to release it, according |
| 1228 // to the Carbon memory management standards. |
| 1223 CFRelease(proxy_dict); | 1229 CFRelease(proxy_dict); |
| 1224 | 1230 |
| 1225 return result; | 1231 return result; |
| 1226 } | 1232 } |
| 1227 #endif // WEBRTC_IOS | 1233 #endif // WEBRTC_IOS |
| 1228 | 1234 |
| 1229 bool AutoDetectProxySettings(const char* agent, const char* url, | 1235 bool AutoDetectProxySettings(const char* agent, const char* url, |
| 1230 ProxyInfo* proxy) { | 1236 ProxyInfo* proxy) { |
| 1231 #if defined(WEBRTC_WIN) | 1237 #if defined(WEBRTC_WIN) |
| 1232 return WinHttpAutoDetectProxyForUrl(agent, url, proxy); | 1238 return WinHttpAutoDetectProxyForUrl(agent, url, proxy); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1286 if (!result) { | 1292 if (!result) { |
| 1287 // Either auto detection is not supported or we simply didn't | 1293 // Either auto detection is not supported or we simply didn't |
| 1288 // find any proxy, reset type. | 1294 // find any proxy, reset type. |
| 1289 proxy->type = rtc::PROXY_NONE; | 1295 proxy->type = rtc::PROXY_NONE; |
| 1290 } | 1296 } |
| 1291 } | 1297 } |
| 1292 return result; | 1298 return result; |
| 1293 } | 1299 } |
| 1294 | 1300 |
| 1295 } // namespace rtc | 1301 } // namespace rtc |
| OLD | NEW |