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

Unified Diff: components/metrics/stability_metrics_helper.cc

Issue 2886933003: Use stricter type checking in UMA_HISTOGRAM_ENUMERATION (Closed)
Patch Set: nocompile test Created 3 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/metrics/stability_metrics_helper.cc
diff --git a/components/metrics/stability_metrics_helper.cc b/components/metrics/stability_metrics_helper.cc
index f6254872b03d1bb0e3ab77313357fe704389bd38..9f0d7eec2646ccdb5d75ea6fac75261dbeda4fb2 100644
--- a/components/metrics/stability_metrics_helper.cc
+++ b/components/metrics/stability_metrics_helper.cc
@@ -53,7 +53,7 @@ int MapCrashExitCodeForHistogram(int exit_code) {
return std::abs(exit_code);
}
-void RecordChildKills(int histogram_type) {
+void RecordChildKills(RendererType histogram_type) {
UMA_HISTOGRAM_ENUMERATION("BrowserRenderProcessHost.ChildKills",
histogram_type, RENDERER_TYPE_COUNT);
}
@@ -181,7 +181,7 @@ void StabilityMetricsHelper::LogLoadStarted() {
void StabilityMetricsHelper::LogRendererCrash(bool was_extension_process,
base::TerminationStatus status,
int exit_code) {
- int histogram_type =
+ RendererType histogram_type =
was_extension_process ? RENDERER_TYPE_EXTENSION : RENDERER_TYPE_RENDERER;
switch (status) {

Powered by Google App Engine
This is Rietveld 408576698