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

Unified Diff: content/browser/download/download_resource_handler.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 | « components/error_page/renderer/net_error_helper_core.cc ('k') | net/base/net_errors.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_resource_handler.cc
diff --git a/content/browser/download/download_resource_handler.cc b/content/browser/download/download_resource_handler.cc
index 045c0f0e17e90979a55dd42e1662903a220a6046..6850e1dad46c314ead790a44521f5f22266d76f3 100644
--- a/content/browser/download/download_resource_handler.cc
+++ b/content/browser/download/download_resource_handler.cc
@@ -9,7 +9,8 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/message_loop/message_loop_proxy.h"
-#include "base/metrics/histogram.h"
+#include "base/metrics/histogram_macros.h"
+#include "base/metrics/sparse_histogram.h"
#include "base/strings/stringprintf.h"
#include "content/browser/byte_stream.h"
#include "content/browser/download/download_create_info.h"
@@ -453,9 +454,8 @@ void DownloadResourceHandler::OnResponseCompleted(
// If the error mapped to something unknown, record it so that
// we can drill down.
if (reason == DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED) {
- UMA_HISTOGRAM_CUSTOM_ENUMERATION("Download.MapErrorNetworkFailed",
- std::abs(status.error()),
- net::GetAllErrorCodesForUma());
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Download.MapErrorNetworkFailed",
+ std::abs(status.error()));
}
stream_writer_.reset(); // We no longer need the stream.
« no previous file with comments | « components/error_page/renderer/net_error_helper_core.cc ('k') | net/base/net_errors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698