Index: net/proxy/proxy_resolver_mac.cc |
diff --git a/net/proxy/proxy_resolver_mac.cc b/net/proxy/proxy_resolver_mac.cc |
index 6c5946c9987255f00e9d19295f844ffc4f0cf8a1..1fca86f1b90793a6f2869e24adc7a347cfe95834 100644 |
--- a/net/proxy/proxy_resolver_mac.cc |
+++ b/net/proxy/proxy_resolver_mac.cc |
@@ -131,7 +131,8 @@ int ProxyResolverMac::GetProxyForURL(const GURL& query_url, |
return ERR_FAILED; |
} |
DCHECK(CFGetTypeID(result) == CFArrayGetTypeID()); |
- base::mac::ScopedCFTypeRef<CFArrayRef> proxy_array_ref((CFArrayRef)result); |
+ base::mac::ScopedCFTypeRef<CFArrayRef> proxy_array_ref( |
+ base::mac::CFCastStrict<CFArrayRef>(result)); |
// This string will be an ordered list of <proxy-uri> entries, separated by |
// semi-colons. It is the format that ProxyInfo::UseNamedProxy() expects. |
@@ -142,7 +143,8 @@ int ProxyResolverMac::GetProxyForURL(const GURL& query_url, |
CFIndex proxy_array_count = CFArrayGetCount(proxy_array_ref.get()); |
for (CFIndex i = 0; i < proxy_array_count; ++i) { |
CFDictionaryRef proxy_dictionary = |
- (CFDictionaryRef)CFArrayGetValueAtIndex(proxy_array_ref.get(), i); |
+ base::mac::CFCastStrict<CFDictionaryRef>( |
Ryan Sleevi
2011/11/11 00:26:42
nit: You can also re-align here and 165-168
|
+ CFArrayGetValueAtIndex(proxy_array_ref.get(), i)); |
DCHECK(CFGetTypeID(proxy_dictionary) == CFDictionaryGetTypeID()); |
// The dictionary may have the following keys: |
@@ -160,9 +162,10 @@ int ProxyResolverMac::GetProxyForURL(const GURL& query_url, |
// PAC file, I'm going home. |
CFStringRef proxy_type = |
- (CFStringRef)base::mac::GetValueFromDictionary(proxy_dictionary, |
- kCFProxyTypeKey, |
- CFStringGetTypeID()); |
+ base::mac::CFCastStrict<CFStringRef>( |
+ base::mac::GetValueFromDictionary(proxy_dictionary, |
+ kCFProxyTypeKey, |
+ CFStringGetTypeID())); |
ProxyServer proxy_server = ProxyServer::FromDictionary( |
GetProxyServerScheme(proxy_type), |
proxy_dictionary, |