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

Unified Diff: base/time/time.cc

Issue 2569913003: [base::Time] Follow-up cl: Remove deprecated FromLocalExploded FromUTCExploded (Closed)
Patch Set: fix "control can reach out of... " Created 4 years 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/time/time.h ('k') | google_apis/drive/drive_api_requests_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time/time.cc
diff --git a/base/time/time.cc b/base/time/time.cc
index df3942cc858c5ecc7277a3a5db4e02cc0b946ccb..f5cefd49e0a2591b2656d55efeee7b62193f3551 100644
--- a/base/time/time.cc
+++ b/base/time/time.cc
@@ -235,7 +235,12 @@ Time Time::LocalMidnight() const {
exploded.minute = 0;
exploded.second = 0;
exploded.millisecond = 0;
- return FromLocalExploded(exploded);
+ Time out_time;
+ if (FromLocalExploded(exploded, &out_time))
+ return out_time;
+ // This function must not fail.
maksims (do not use this acc) 2016/12/13 11:43:55 miu, How do you think? Should a return value from
+ NOTREACHED();
+ return Time();
}
// static
« no previous file with comments | « base/time/time.h ('k') | google_apis/drive/drive_api_requests_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698