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

Unified Diff: components/translate/core/common/translate_metrics.cc

Issue 656363002: Type conversion fixes, components/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/translate/core/common/translate_metrics.cc
diff --git a/components/translate/core/common/translate_metrics.cc b/components/translate/core/common/translate_metrics.cc
index 12b6300b43c13038f7c215251cd8af01cff59928..f17a11eca00fcc150c4019dbef560db51c017c93 100644
--- a/components/translate/core/common/translate_metrics.cc
+++ b/components/translate/core/common/translate_metrics.cc
@@ -82,19 +82,22 @@ void ReportLanguageVerification(LanguageVerificationType type) {
void ReportTimeToBeReady(double time_in_msec) {
UMA_HISTOGRAM_MEDIUM_TIMES(
kTranslateTimeToBeReady,
- base::TimeDelta::FromMicroseconds(time_in_msec * 1000.0));
+ base::TimeDelta::FromMicroseconds(
+ static_cast<int64>(time_in_msec * 1000.0)));
}
void ReportTimeToLoad(double time_in_msec) {
UMA_HISTOGRAM_MEDIUM_TIMES(
kTranslateTimeToLoad,
- base::TimeDelta::FromMicroseconds(time_in_msec * 1000.0));
+ base::TimeDelta::FromMicroseconds(
+ static_cast<int64>(time_in_msec * 1000.0)));
}
void ReportTimeToTranslate(double time_in_msec) {
UMA_HISTOGRAM_MEDIUM_TIMES(
kTranslateTimeToTranslate,
- base::TimeDelta::FromMicroseconds(time_in_msec * 1000.0));
+ base::TimeDelta::FromMicroseconds(
+ static_cast<int64>(time_in_msec * 1000.0)));
}
void ReportUserActionDuration(base::TimeTicks begin, base::TimeTicks end) {

Powered by Google App Engine
This is Rietveld 408576698