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

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: 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 | « no previous file | content/browser/download/download_resource_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..499146e8a62a1b89929c5e3ed108fe9708d75db0 100644
--- a/components/error_page/renderer/net_error_helper_core.cc
+++ b/components/error_page/renderer/net_error_helper_core.cc
@@ -17,7 +17,8 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/scoped_vector.h"
-#include "base/metrics/histogram.h"
+#include "base/metrics/histogram_macros.h"
+#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));
}
« no previous file with comments | « no previous file | content/browser/download/download_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698