diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-15 01:27:11 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-15 01:27:11 +0000 |
commit | 24f4babaca825d5eb07e5ad09830b77b3cd6326f (patch) | |
tree | eaf7a70589d3eb95ae4f9efa6e8bfd58892049a6 | |
parent | 493bab9a709f18d147bfac0f09861f4b33e58152 (diff) | |
download | chromium_src-24f4babaca825d5eb07e5ad09830b77b3cd6326f.zip chromium_src-24f4babaca825d5eb07e5ad09830b77b3cd6326f.tar.gz chromium_src-24f4babaca825d5eb07e5ad09830b77b3cd6326f.tar.bz2 |
Rename OSErrorForGetAddrinfo to include a suffix for the particular platform.
This makes it easier to display the symbolic names of each error code on the server side, since we specify a mapping per histogram name.
Review URL: http://codereview.chromium.org/3771005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62689 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/base/host_resolver_impl.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc index e3e3a94..ffacb22 100644 --- a/net/base/host_resolver_impl.cc +++ b/net/base/host_resolver_impl.cc @@ -42,6 +42,20 @@ namespace net { namespace { +// We use a separate histogram name for each platform to facilitate the +// display of error codes by their symbolic name (since each platform has +// different mappings). +const char kOSErrorsForGetAddrinfoHistogramName[] = +#if defined(OS_WIN) + "Net.OSErrorsForGetAddrinfo_Win"; +#elif defined(OS_MACOSX) + "Net.OSErrorsForGetAddrinfo_Mac"; +#elif defined(OS_LINUX) + "Net.OSErrorsForGetAddrinfo_Linux"; +#else + "Net.OSErrorsForGetAddrinfo"; +#endif + HostCache* CreateDefaultCache() { static const size_t kMaxHostCacheEntries = 100; @@ -484,7 +498,7 @@ class HostResolverImpl::Job } if (error_ != OK) { - UMA_HISTOGRAM_CUSTOM_ENUMERATION("Net.OSErrorsForGetAddrinfo", + UMA_HISTOGRAM_CUSTOM_ENUMERATION(kOSErrorsForGetAddrinfoHistogramName, std::abs(os_error_), GetAllGetAddrinfoOSErrors()); } |