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

Unified Diff: components/metrics/stability_metrics_helper.cc

Issue 2886933003: Use stricter type checking in UMA_HISTOGRAM_ENUMERATION (Closed)
Patch Set: simplify type checking Created 3 years, 5 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 82b31d271eb9e461470779984bc5ec0a82373748..1ba27b94987ff7dd34d148541184d41170ac6db8 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);
}
@@ -179,7 +179,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) {
« no previous file with comments | « components/leveldb/public/cpp/util.cc ('k') | components/password_manager/core/browser/password_syncable_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698