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

Unified Diff: components/sync/model/data_type_error_handler_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/model/data_type_error_handler_impl.cc
diff --git a/components/sync/model/data_type_error_handler_impl.cc b/components/sync/model/data_type_error_handler_impl.cc
index 894fdffe78bdecd62d91e3b759bb07f8c5d2896b..ca526e2d4212a5e9e49b6679eaef2c51cbf81ca2 100644
--- a/components/sync/model/data_type_error_handler_impl.cc
+++ b/components/sync/model/data_type_error_handler_impl.cc
@@ -22,9 +22,10 @@ DataTypeErrorHandlerImpl::~DataTypeErrorHandlerImpl() {}
void DataTypeErrorHandlerImpl::OnUnrecoverableError(const SyncError& error) {
if (!dump_stack_.is_null())
dump_stack_.Run();
+ // TODO(wychen): enum uma should be strongly typed. crbug.com/661401
UMA_HISTOGRAM_ENUMERATION("Sync.DataTypeRunFailures",
ModelTypeToHistogramInt(error.model_type()),
- MODEL_TYPE_COUNT);
+ static_cast<int>(MODEL_TYPE_COUNT));
ui_thread_->PostTask(error.location(), base::Bind(sync_callback_, error));
}
« no previous file with comments | « components/sync/engine_impl/model_type_registry.cc ('k') | components/sync_bookmarks/bookmark_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698