Chromium Code Reviews| Index: net/proxy/proxy_server_mac.cc |
| diff --git a/net/proxy/proxy_server_mac.cc b/net/proxy/proxy_server_mac.cc |
| index 4df37a47b0b1a1b43e10056c1a78b58585fa6781..eebde544b8c31b8b5f09832041fbb44590dd4fec 100644 |
| --- a/net/proxy/proxy_server_mac.cc |
| +++ b/net/proxy/proxy_server_mac.cc |
| @@ -24,9 +24,8 @@ ProxyServer ProxyServer::FromDictionary(Scheme scheme, |
| return ProxyServer(scheme, HostPortPair()); |
| } |
| - CFStringRef host_ref = |
| - (CFStringRef)base::mac::GetValueFromDictionary(dict, host_key, |
| - CFStringGetTypeID()); |
| + CFStringRef host_ref = base::mac::GetValueFromDictionary<CFStringRef>( |
|
Mark Mentovai
2011/11/15 19:18:21
Don’t you think that this would be more readable i
KushalP
2011/11/15 19:25:59
I do, but doing so would mean both lines end up be
Mark Mentovai
2011/11/15 19:40:56
KushalP wrote:
KushalP
2011/11/15 19:57:25
Fixed now. Should I also add an extra newline at l
|
| + dict, host_key); |
| if (!host_ref) { |
| LOG(WARNING) << "Could not find expected key " |
| << base::SysCFStringRefToUTF8(host_key) |
| @@ -35,9 +34,8 @@ ProxyServer ProxyServer::FromDictionary(Scheme scheme, |
| } |
| std::string host = base::SysCFStringRefToUTF8(host_ref); |
| - CFNumberRef port_ref = |
| - (CFNumberRef)base::mac::GetValueFromDictionary(dict, port_key, |
| - CFNumberGetTypeID()); |
| + CFNumberRef port_ref = base::mac::GetValueFromDictionary<CFNumberRef>( |
|
Mark Mentovai
2011/11/15 19:40:56
CFNumberRef port_ref =
base::mac::GetValueFr
|
| + dict, port_key); |
| int port; |
| if (port_ref) { |
| CFNumberGetValue(port_ref, kCFNumberIntType, &port); |