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

Unified Diff: components/sync/driver/startup_controller.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
« no previous file with comments | « components/sync/driver/model_type_controller.cc ('k') | components/sync/engine_impl/model_type_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/startup_controller.cc
diff --git a/components/sync/driver/startup_controller.cc b/components/sync/driver/startup_controller.cc
index 6131e2807dbc13b1659f102e3310295851674a3a..f465a7c85e81ecfd45922369207f238ef2aa4431 100644
--- a/components/sync/driver/startup_controller.cc
+++ b/components/sync/driver/startup_controller.cc
@@ -186,8 +186,10 @@ void StartupController::OnDataTypeRequestsSyncStartup(ModelType type) {
// Measure the time spent waiting for init and the type that triggered it.
// We could measure the time spent deferred on a per-datatype basis, but
// for now this is probably sufficient.
+ // TODO(wychen): enum uma should be strongly typed. crbug.com/661401
UMA_HISTOGRAM_ENUMERATION("Sync.Startup.TypeTriggeringInit",
- ModelTypeToHistogramInt(type), MODEL_TYPE_COUNT);
+ ModelTypeToHistogramInt(type),
+ static_cast<int>(MODEL_TYPE_COUNT));
if (!start_up_time_.is_null()) {
RecordTimeDeferred();
UMA_HISTOGRAM_ENUMERATION("Sync.Startup.DeferredInitTrigger",
« no previous file with comments | « components/sync/driver/model_type_controller.cc ('k') | components/sync/engine_impl/model_type_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698