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

Unified Diff: components/sync_bookmarks/bookmark_model_associator.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_bookmarks/bookmark_model_associator.cc
diff --git a/components/sync_bookmarks/bookmark_model_associator.cc b/components/sync_bookmarks/bookmark_model_associator.cc
index c710dbc1b7897141c82f98996298d4b2e356d97b..a490d4deced304ce57bfb4471c41dbd0b78b77f2 100644
--- a/components/sync_bookmarks/bookmark_model_associator.cc
+++ b/components/sync_bookmarks/bookmark_model_associator.cc
@@ -963,9 +963,10 @@ syncer::SyncError BookmarkModelAssociator::CheckModelSyncState(
if (native_version == sync_version) {
context->set_native_model_sync_state(IN_SYNC);
} else {
+ // TODO(wychen): enum uma should be strongly typed. crbug.com/661401
UMA_HISTOGRAM_ENUMERATION("Sync.LocalModelOutOfSync",
ModelTypeToHistogramInt(syncer::BOOKMARKS),
- syncer::MODEL_TYPE_COUNT);
+ static_cast<int>(syncer::MODEL_TYPE_COUNT));
// Clear version on bookmark model so that we only report error once.
bookmark_model_->SetNodeSyncTransactionVersion(
« no previous file with comments | « components/sync/model/data_type_error_handler_impl.cc ('k') | content/browser/browser_child_process_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698