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

Unified Diff: components/sync/driver/data_type_manager_impl.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/data_type_manager_impl.cc
diff --git a/components/sync/driver/data_type_manager_impl.cc b/components/sync/driver/data_type_manager_impl.cc
index 07a376c25c97e4f536e5e59279f736b2569c90fa..81cbb05e4a4b06b381e1b1894cc65824dd80b7e4 100644
--- a/components/sync/driver/data_type_manager_impl.cc
+++ b/components/sync/driver/data_type_manager_impl.cc
@@ -253,9 +253,10 @@ void DataTypeManagerImpl::Restart(ConfigureReason reason) {
reason == CONFIGURE_REASON_NEWLY_ENABLED_DATA_TYPE) {
for (ModelTypeSet::Iterator iter = last_requested_types_.First();
iter.Good(); iter.Inc()) {
+ // TODO(wychen): enum uma should be strongly typed. crbug.com/661401
UMA_HISTOGRAM_ENUMERATION("Sync.ConfigureDataTypes",
ModelTypeToHistogramInt(iter.Get()),
- MODEL_TYPE_COUNT);
+ static_cast<int>(MODEL_TYPE_COUNT));
}
}
« no previous file with comments | « components/sync/driver/async_directory_type_controller.cc ('k') | components/sync/driver/frontend_data_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698