diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-29 03:53:13 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-29 03:53:13 +0000 |
commit | affdf81e2fb15ade3c660d249c4278202487a346 (patch) | |
tree | 3872eaa6a538746e5df98ddfc90725e074c748e6 /chrome/browser/resources/net_internals | |
parent | 4d321ae5644f72dda066fa0fc59ae0c5a3d7ec40 (diff) | |
download | chromium_src-affdf81e2fb15ade3c660d249c4278202487a346.zip chromium_src-affdf81e2fb15ade3c660d249c4278202487a346.tar.gz chromium_src-affdf81e2fb15ade3c660d249c4278202487a346.tar.bz2 |
[polish] Remove ADDRESS_FAMILY_* prefix on about:net-internals.
This was redundant and making the resolver cache table unpleasantly wide.
Review URL: http://codereview.chromium.org/9476023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124109 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/net_internals')
-rw-r--r-- | chrome/browser/resources/net_internals/dns_view.js | 4 | ||||
-rw-r--r-- | chrome/browser/resources/net_internals/main.js | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/chrome/browser/resources/net_internals/dns_view.js b/chrome/browser/resources/net_internals/dns_view.js index 90867b3..9ae4ea0 100644 --- a/chrome/browser/resources/net_internals/dns_view.js +++ b/chrome/browser/resources/net_internals/dns_view.js @@ -81,7 +81,7 @@ var DnsView = (function() { var family = hostResolverInfo.default_address_family; addTextNode($(DnsView.DEFAULT_FAMILY_SPAN_ID), - getKeyWithValue(AddressFamily, family)); + addressFamilyToString(family)); var ipv6Disabled = (family == AddressFamily.ADDRESS_FAMILY_IPV4); setNodeDisplay($(DnsView.IPV6_DISABLED_SPAN_ID), ipv6Disabled); @@ -117,7 +117,7 @@ var DnsView = (function() { var familyCell = addNode(tr, 'td'); addTextNode(familyCell, - getKeyWithValue(AddressFamily, e.address_family)); + addressFamilyToString(e.address_family)); var addressesCell = addNode(tr, 'td'); diff --git a/chrome/browser/resources/net_internals/main.js b/chrome/browser/resources/net_internals/main.js index 99177b3..e5a3891 100644 --- a/chrome/browser/resources/net_internals/main.js +++ b/chrome/browser/resources/net_internals/main.js @@ -289,3 +289,13 @@ function netErrorToString(netError) { return str; return 'ERR_' + str; } + +/** + * Returns a string representation of |family|. + */ +function addressFamilyToString(family) { + var str = getKeyWithValue(AddressFamily, family); + // All the address family start with ADDRESS_FAMILY_*. + // Strip that prefix since it is redundant and only clutters the output. + return str.replace(/^ADDRESS_FAMILY_/, ''); +} |