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

Unified Diff: components/error_page/renderer/net_error_helper_core.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: 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
Index: components/error_page/renderer/net_error_helper_core.cc
diff --git a/components/error_page/renderer/net_error_helper_core.cc b/components/error_page/renderer/net_error_helper_core.cc
index 9a92d742e6c40c2ca0eff58a64c0c39069189026..574012f0df3497efd059c18839625602e9de972b 100644
--- a/components/error_page/renderer/net_error_helper_core.cc
+++ b/components/error_page/renderer/net_error_helper_core.cc
@@ -18,6 +18,7 @@
#include "base/logging.h"
#include "base/memory/scoped_vector.h"
#include "base/metrics/histogram.h"
Alexei Svitkine (slow) 2015/05/15 20:38:27 Nit: While you're here, can you update this to his
davidben 2015/05/15 20:41:01 Done.
+#include "base/metrics/sparse_histogram.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "base/values.h"
@@ -346,24 +347,19 @@ scoped_ptr<ErrorPageParams> CreateErrorPageParams(
void ReportAutoReloadSuccess(const blink::WebURLError& error, size_t count) {
if (error.domain.utf8() != net::kErrorDomain)
return;
- UMA_HISTOGRAM_CUSTOM_ENUMERATION("Net.AutoReload.ErrorAtSuccess",
- -error.reason,
- net::GetAllErrorCodesForUma());
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Net.AutoReload.ErrorAtSuccess", -error.reason);
UMA_HISTOGRAM_COUNTS("Net.AutoReload.CountAtSuccess",
static_cast<base::HistogramBase::Sample>(count));
if (count == 1) {
- UMA_HISTOGRAM_CUSTOM_ENUMERATION("Net.AutoReload.ErrorAtFirstSuccess",
- -error.reason,
- net::GetAllErrorCodesForUma());
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Net.AutoReload.ErrorAtFirstSuccess",
+ -error.reason);
}
}
void ReportAutoReloadFailure(const blink::WebURLError& error, size_t count) {
if (error.domain.utf8() != net::kErrorDomain)
return;
- UMA_HISTOGRAM_CUSTOM_ENUMERATION("Net.AutoReload.ErrorAtStop",
- -error.reason,
- net::GetAllErrorCodesForUma());
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Net.AutoReload.ErrorAtStop", -error.reason);
UMA_HISTOGRAM_COUNTS("Net.AutoReload.CountAtStop",
static_cast<base::HistogramBase::Sample>(count));
}

Powered by Google App Engine
This is Rietveld 408576698