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

Unified Diff: components/policy/core/common/cloud/device_management_service.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/policy/core/common/cloud/device_management_service.cc
diff --git a/components/policy/core/common/cloud/device_management_service.cc b/components/policy/core/common/cloud/device_management_service.cc
index a86cd350c97a74c4a0ec70d1ca7fb5dd9895c617..24f664ff73243b7e884660ad9b044d8a1324d98f 100644
--- a/components/policy/core/common/cloud/device_management_service.cc
+++ b/components/policy/core/common/cloud/device_management_service.cc
@@ -298,9 +298,9 @@ void DeviceManagementRequestJobImpl::HandleResponse(
LOG(WARNING) << "DMServer sent an error response: " << response_code;
} else {
// Success with retries_count_ retries.
- UMA_HISTOGRAM_ENUMERATION("Enterprise.DMServerRequestSuccess",
- retries_count_,
- DMServerRequestSuccess::REQUEST_MAX);
+ UMA_HISTOGRAM_EXACT_LINEAR(
+ "Enterprise.DMServerRequestSuccess", retries_count_,
+ static_cast<int>(DMServerRequestSuccess::REQUEST_MAX));
}
switch (response_code) {

Powered by Google App Engine
This is Rietveld 408576698