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

Unified Diff: components/sync/driver/model_association_manager.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/sync/driver/model_association_manager.cc
diff --git a/components/sync/driver/model_association_manager.cc b/components/sync/driver/model_association_manager.cc
index 43f03a529157ae6275a6d09e7759c25223432571..86c86aef74d26f4cf295b1bdc9e8f5d09f4bb044 100644
--- a/components/sync/driver/model_association_manager.cc
+++ b/components/sync/driver/model_association_manager.cc
@@ -382,9 +382,10 @@ void ModelAssociationManager::ModelAssociationDone(State new_state) {
DataTypeController* dtc = (*it).second.get();
if (associating_types_.Has(dtc->type()) &&
dtc->state() != DataTypeController::NOT_RUNNING) {
+ // TODO(wychen): enum uma should be strongly typed. crbug.com/661401
UMA_HISTOGRAM_ENUMERATION("Sync.ConfigureFailed",
ModelTypeToHistogramInt(dtc->type()),
- MODEL_TYPE_COUNT);
+ static_cast<int>(MODEL_TYPE_COUNT));
StopDatatype(SyncError(FROM_HERE, SyncError::DATATYPE_ERROR,
"Association timed out.", dtc->type()),
dtc);
« no previous file with comments | « components/sync/driver/frontend_data_type_controller.cc ('k') | components/sync/driver/model_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698