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

Side by Side Diff: webrtc/base/proxydetect.cc

Issue 2321493002: Reland of move all reference to carbon api (Closed)
Patch Set: fix chromium build issues Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « webrtc/base/macwindowpicker.cc ('k') | webrtc/base/unixfilesystem.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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.
1176 CFRelease(proxyDict); 1173 CFRelease(proxyDict);
1177 } else { 1174 } else {
1178 LOG(LS_ERROR) << "SCDynamicStoreCopyProxies failed"; 1175 LOG(LS_ERROR) << "SCDynamicStoreCopyProxies failed";
1179 } 1176 }
1180 1177
1181 return result; 1178 return result;
1182 } 1179 }
1183 #endif // WEBRTC_MAC && !defined(WEBRTC_IOS) 1180 #endif // WEBRTC_MAC && !defined(WEBRTC_IOS)
1184 1181
1185 #ifdef WEBRTC_IOS 1182 #ifdef WEBRTC_IOS
(...skipping 30 matching lines...) Expand all
1216 // Finally, try HTTP proxy. Note that flute doesn't 1213 // Finally, try HTTP proxy. Note that flute doesn't
1217 // differentiate between HTTPS and HTTP, hence we are using the 1214 // differentiate between HTTPS and HTTP, hence we are using the
1218 // same flute type here, ie. PROXY_HTTPS. 1215 // same flute type here, ie. PROXY_HTTPS.
1219 proxy->type = PROXY_HTTPS; 1216 proxy->type = PROXY_HTTPS;
1220 1217
1221 proxy->address.SetIP(hostname); 1218 proxy->address.SetIP(hostname);
1222 proxy->address.SetPort(port); 1219 proxy->address.SetPort(port);
1223 result = true; 1220 result = true;
1224 } 1221 }
1225 1222
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.
1229 CFRelease(proxy_dict); 1223 CFRelease(proxy_dict);
1230 1224
1231 return result; 1225 return result;
1232 } 1226 }
1233 #endif // WEBRTC_IOS 1227 #endif // WEBRTC_IOS
1234 1228
1235 bool AutoDetectProxySettings(const char* agent, const char* url, 1229 bool AutoDetectProxySettings(const char* agent, const char* url,
1236 ProxyInfo* proxy) { 1230 ProxyInfo* proxy) {
1237 #if defined(WEBRTC_WIN) 1231 #if defined(WEBRTC_WIN)
1238 return WinHttpAutoDetectProxyForUrl(agent, url, proxy); 1232 return WinHttpAutoDetectProxyForUrl(agent, url, proxy);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 if (!result) { 1286 if (!result) {
1293 // Either auto detection is not supported or we simply didn't 1287 // Either auto detection is not supported or we simply didn't
1294 // find any proxy, reset type. 1288 // find any proxy, reset type.
1295 proxy->type = rtc::PROXY_NONE; 1289 proxy->type = rtc::PROXY_NONE;
1296 } 1290 }
1297 } 1291 }
1298 return result; 1292 return result;
1299 } 1293 }
1300 1294
1301 } // namespace rtc 1295 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/macwindowpicker.cc ('k') | webrtc/base/unixfilesystem.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698