static_cast UMA 'enum class's to int

Otherwise, the Chromium expansions complain about not being able to add
and needing explicit conversions.

R=mark@chromium.org
BUG=crashpad:100

Change-Id: I0540a8dabff61f2189d9532422adae5c2885ae03
Reviewed-on: https://chromium-review.googlesource.com/387166
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Scott Graham 2016-09-19 16:52:23 -07:00
parent 72a12e2e94
commit 17167a1e57
2 changed files with 4 additions and 3 deletions

View File

@ -29,8 +29,9 @@ void Metrics::CrashReportSize(FileHandle file) {
// static
void Metrics::ExceptionCaptureResult(CaptureResult result) {
UMA_HISTOGRAM_ENUMERATION(
"Crashpad.ExceptionCaptureResult", result, CaptureResult::kMaxValue);
UMA_HISTOGRAM_ENUMERATION("Crashpad.ExceptionCaptureResult",
static_cast<int32_t>(result),
static_cast<int32_t>(CaptureResult::kMaxValue));
}
// static

View File

@ -36,7 +36,7 @@ class Metrics {
//! \brief The result of capturing an exception. These are used as metrics
//! enumeration values so new values should always be added at the end.
enum class CaptureResult : int {
enum class CaptureResult : int32_t {
//! \brief The exception capture succeeded normally.
kSuccess = 0,