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

Unified Diff: chrome/browser/ui/webui/net_internals/net_internals_ui.cc

Issue 10309002: Reimplements net::AddressList without struct addrinfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: get_canonical_name -> canonical_name. iterator to indexing Created 8 years, 7 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/ui/webui/net_internals/net_internals_ui.cc
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
index 88cb9d1331c153ec6a7a5f6c7e94b0bd2feb3c64..728daf52e902515b963a5753a12eab4e93445c50 100644
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -58,7 +58,6 @@
#include "net/base/host_resolver.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
-#include "net/base/sys_addrinfo.h"
#include "net/base/transport_security_state.h"
#include "net/base/x509_cert_types.h"
#include "net/disk_cache/disk_cache.h"
@@ -953,11 +952,9 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetHostResolverInfo(
} else {
// Append all of the resolved addresses.
ListValue* address_list = new ListValue();
- const struct addrinfo* current_address = entry.addrlist.head();
- while (current_address) {
- address_list->Append(Value::CreateStringValue(
- net::NetAddressToStringWithPort(current_address)));
- current_address = current_address->ai_next;
+ for (size_t i = 0; i < entry.addrlist.size(); ++i) {
+ address_list->Append(
+ Value::CreateStringValue(entry.addrlist[i].ToStringWithoutPort()));
}
entry_dict->Set("addresses", address_list);
}
« no previous file with comments | « chrome/browser/net/network_stats.cc ('k') | chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698