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

Unified Diff: chrome/browser/extensions/api/dns/dns_api.cc

Issue 10309002: Reimplements net::AddressList without struct addrinfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make inheritance private in AddressList. Fix: MockTCPClientSocket, redefined symbols on MSVS2010. Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/dns/dns_api.cc
diff --git a/chrome/browser/extensions/api/dns/dns_api.cc b/chrome/browser/extensions/api/dns/dns_api.cc
index 44c4064130f792f3c5f133cbbd9b2ee6021ff8a8..2c5e51a9f6cb191356e9e4c94923923fa9f21a3d 100644
--- a/chrome/browser/extensions/api/dns/dns_api.cc
+++ b/chrome/browser/extensions/api/dns/dns_api.cc
@@ -12,7 +12,6 @@
#include "content/public/browser/browser_thread.h"
#include "net/base/host_port_pair.h"
#include "net/base/net_errors.h"
-#include "net/base/net_util.h"
using content::BrowserThread;
using extensions::api::experimental_dns::ResolveCallbackResolveInfo;
@@ -96,10 +95,9 @@ void DnsResolveFunction::OnLookupFinished(int resolve_result) {
new ResolveCallbackResolveInfo());
resolve_info->result_code = resolve_result;
if (resolve_result == net::OK) {
- const struct addrinfo* head = addresses_->head();
- DCHECK(head);
+ DCHECK(!addresses_->empty());
resolve_info->address.reset(
- new std::string(net::NetAddressToString(head)));
+ new std::string(addresses_->front().ToStringWithoutPort()));
}
result_.reset(Resolve::Result::Create(*resolve_info));
response_ = true;

Powered by Google App Engine
This is Rietveld 408576698