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

Unified Diff: net/dns/host_resolver_impl.cc

Issue 1140273002: Replace GetAllErrorCodesForUma calls with UMA_HISTOGRAM_SPARSE_SLOWLY. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fallback-type
Patch Set: asvitkine comment Created 5 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
« no previous file with comments | « net/base/net_errors.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/host_resolver_impl.cc
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
index bd6e43198dca94319fe32227f5bc89475634f90a..9da6f91c29526916f5bb37a10fe850fbe82fe9c7 100644
--- a/net/dns/host_resolver_impl.cc
+++ b/net/dns/host_resolver_impl.cc
@@ -23,7 +23,8 @@
#include "base/debug/stack_trace.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/metrics/field_trial.h"
-#include "base/metrics/histogram.h"
+#include "base/metrics/histogram_macros.h"
+#include "base/metrics/sparse_histogram.h"
#include "base/profiler/scoped_tracker.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
@@ -1535,9 +1536,8 @@ class HostResolverImpl::Job : public PrioritizedDispatcher::Job,
} else {
UmaAsyncDnsResolveStatus(RESOLVE_STATUS_PROC_SUCCESS);
}
- UMA_HISTOGRAM_CUSTOM_ENUMERATION("AsyncDNS.ResolveError",
- std::abs(dns_task_error_),
- GetAllErrorCodesForUma());
+ UMA_HISTOGRAM_SPARSE_SLOWLY("AsyncDNS.ResolveError",
+ std::abs(dns_task_error_));
resolver_->OnDnsTaskResolve(dns_task_error_);
} else {
DNS_HISTOGRAM("AsyncDNS.FallbackFail", duration);
@@ -2376,9 +2376,8 @@ void HostResolverImpl::OnDnsTaskResolve(int net_error) {
AbortDnsTasks();
UMA_HISTOGRAM_BOOLEAN("AsyncDNS.DnsClientEnabled", false);
- UMA_HISTOGRAM_CUSTOM_ENUMERATION("AsyncDNS.DnsClientDisabledReason",
- std::abs(net_error),
- GetAllErrorCodesForUma());
+ UMA_HISTOGRAM_SPARSE_SLOWLY("AsyncDNS.DnsClientDisabledReason",
+ std::abs(net_error));
}
void HostResolverImpl::SetDnsClient(scoped_ptr<DnsClient> dns_client) {
« no previous file with comments | « net/base/net_errors.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698