Chromium Code Reviews| Index: content/browser/renderer_host/p2p/socket_dispatcher_host.cc |
| diff --git a/content/browser/renderer_host/p2p/socket_dispatcher_host.cc b/content/browser/renderer_host/p2p/socket_dispatcher_host.cc |
| index ef9a094a4110d40431a88022c619e05c53192101..9c2f2938af1b477d12c0689af560cc36ee2505b4 100644 |
| --- a/content/browser/renderer_host/p2p/socket_dispatcher_host.cc |
| +++ b/content/browser/renderer_host/p2p/socket_dispatcher_host.cc |
| @@ -72,22 +72,14 @@ class P2PSocketDispatcherHost::DnsRequest { |
| return; |
| } |
| - if (addresses_.head() == NULL) { |
| + if (addresses_.empty()) { |
|
eroman
2012/05/04 01:08:41
Yuck.
I am surprised to keep seeing these checks.
|
| LOG(ERROR) << "Received 0 addresses when trying to resolve address for " |
| << host_name_; |
| done_callback_.Run(net::IPAddressNumber()); |
| return; |
| } |
| - net::IPEndPoint end_point; |
| - if (!end_point.FromSockAddr(addresses_.head()->ai_addr, |
| - addresses_.head()->ai_addrlen)) { |
| - LOG(ERROR) << "Received invalid address for " << host_name_; |
| - done_callback_.Run(net::IPAddressNumber()); |
| - return; |
| - } |
| - |
| - done_callback_.Run(end_point.address()); |
| + done_callback_.Run(addresses_.front().address()); |
| } |
| int32 routing_id_; |