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

Unified Diff: components/variations/variations_seed_store.cc

Issue 2095553002: Make callers of FromUTC(Local)Exploded in components/ use new time API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased 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
Index: components/variations/variations_seed_store.cc
diff --git a/components/variations/variations_seed_store.cc b/components/variations/variations_seed_store.cc
index 65b1efd1b5c5346876f4ac7d0c30dc447575cd34..1242e015535d0cc9f5d7f883dca0170bcbcd1951 100644
--- a/components/variations/variations_seed_store.cc
+++ b/components/variations/variations_seed_store.cc
@@ -112,7 +112,13 @@ base::Time TruncateToUTCDay(const base::Time& time) {
exploded.second = 0;
exploded.millisecond = 0;
- return base::Time::FromUTCExploded(exploded);
+ base::Time out_time;
+ if (!base::Time::FromUTCExploded(exploded, &out_time)) {
+ // TODO(maksims): implement failure handling.
+ // We might just return |out_time|, which is Time(0).
+ NOTIMPLEMENTED();
Alexei Svitkine (slow) 2016/06/28 15:27:40 Similar comment as vabr's - how can this fail? Sho
maksims (do not use this acc) 2016/06/29 05:48:59 In this case, DCHECK should be enough here as vabr
+ }
+ return out_time;
}
VariationsSeedDateChangeState GetSeedDateChangeState(

Powered by Google App Engine
This is Rietveld 408576698