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

Unified Diff: base/metrics/field_trial.cc

Issue 2086393003: Make callers of FromUTC(Local)Exploded in base/ use new time API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « base/i18n/time_formatting_unittest.cc ('k') | base/test/test_reg_util_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/field_trial.cc
diff --git a/base/metrics/field_trial.cc b/base/metrics/field_trial.cc
index 430cae0b7287d1c3f400ad64afdc272b3a4fd0dc..600b94ed48391dd483ad73e7036da7d45037c859 100644
--- a/base/metrics/field_trial.cc
+++ b/base/metrics/field_trial.cc
@@ -44,8 +44,14 @@ Time CreateTimeFromParams(int year, int month, int day_of_month) {
exploded.minute = 0;
exploded.second = 0;
exploded.millisecond = 0;
+ Time out_time;
+ if (!Time::FromLocalExploded(exploded, &out_time)) {
+ // TODO(maksims): implement failure handling.
+ // We might just return |out_time|, which is Time(0).
+ NOTIMPLEMENTED();
+ }
- return Time::FromLocalExploded(exploded);
+ return out_time;
}
// Returns the boundary value for comparing against the FieldTrial's added
« no previous file with comments | « base/i18n/time_formatting_unittest.cc ('k') | base/test/test_reg_util_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698