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

Unified Diff: chrome/browser/net/view_net_internals_job_factory.cc

Issue 1593015: HostResolver supports optional CNAME lookups. (Closed)
Patch Set: Addressing wtc's nits. Created 10 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/net/view_net_internals_job_factory.cc
diff --git a/chrome/browser/net/view_net_internals_job_factory.cc b/chrome/browser/net/view_net_internals_job_factory.cc
index aa39f1f9919bf458a9e5197e6e5ccc805c2c5ddd..722559afd17aef1a63a2b8aba5483451fd11b9b4 100644
--- a/chrome/browser/net/view_net_internals_job_factory.cc
+++ b/chrome/browser/net/view_net_internals_job_factory.cc
@@ -349,6 +349,7 @@ class HostResolverCacheSubSection : public SubSection {
"<th>Host</th>"
"<th>Address family</th>"
"<th>Address list</th>"
+ "<th>Canonical name</th>"
"<th>Time to live (ms)</th>"
"</tr>");
@@ -377,6 +378,7 @@ class HostResolverCacheSubSection : public SubSection {
// Stringify all of the addresses in the address list, separated
// by newlines (br).
std::string address_list_html;
+ std::string canonical_name_html;
if (entry->error != net::OK) {
address_list_html = "<span style='font-weight: bold; color:red'>" +
@@ -391,14 +393,18 @@ class HostResolverCacheSubSection : public SubSection {
net::NetAddressToString(current_address));
current_address = current_address->ai_next;
}
+ std::string canonical_name;
+ if (entry->addrlist.GetCanonicalName(&canonical_name))
+ canonical_name_html = EscapeForHTML(canonical_name);
}
StringAppendF(out,
"<td>%s</td><td>%s</td><td>%s</td>"
- "<td>%d</td></tr>",
+ "<td>%s</td><td>%d</td></tr>",
EscapeForHTML(key.hostname).c_str(),
EscapeForHTML(address_family_str).c_str(),
address_list_html.c_str(),
+ canonical_name_html.c_str(),
ttl_ms);
}

Powered by Google App Engine
This is Rietveld 408576698