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

Unified Diff: components/sync/driver/frontend_data_type_controller.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/sync/driver/frontend_data_type_controller.cc
diff --git a/components/sync/driver/frontend_data_type_controller.cc b/components/sync/driver/frontend_data_type_controller.cc
index 4098642131a2cdc36a4083776293ff88f2263c3e..1bf2c1808f320686d3ac28306f9322ff21fe63f1 100644
--- a/components/sync/driver/frontend_data_type_controller.cc
+++ b/components/sync/driver/frontend_data_type_controller.cc
@@ -238,8 +238,10 @@ void FrontendDataTypeController::RecordAssociationTime(base::TimeDelta time) {
void FrontendDataTypeController::RecordStartFailure(ConfigureResult result) {
DCHECK(CalledOnValidThread());
+ // TODO(wychen): enum uma should be strongly typed. crbug.com/661401
Alexei Svitkine (slow) 2017/05/31 20:22:24 Can't all of these sync ones just use the ModelTyp
wychen 2017/07/14 23:18:44 It takes a much larger CL to do the types correctl
UMA_HISTOGRAM_ENUMERATION("Sync.DataTypeStartFailures",
- ModelTypeToHistogramInt(type()), MODEL_TYPE_COUNT);
+ ModelTypeToHistogramInt(type()),
+ static_cast<int>(MODEL_TYPE_COUNT));
#define PER_DATA_TYPE_MACRO(type_str) \
UMA_HISTOGRAM_ENUMERATION("Sync." type_str "ConfigureFailure", result, \
MAX_CONFIGURE_RESULT);

Powered by Google App Engine
This is Rietveld 408576698