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

Unified Diff: chrome/browser/chromeos/policy/device_status_collector.cc

Issue 2111103002: Make callers of FromUTC(Local)Exploded in chrome/ use new time API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Lei Zhang's comments Created 4 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
Index: chrome/browser/chromeos/policy/device_status_collector.cc
diff --git a/chrome/browser/chromeos/policy/device_status_collector.cc b/chrome/browser/chromeos/policy/device_status_collector.cc
index fdf71837622a40c30c5dd91fe7ad5fa26240213d..d731df43bf15008572b7ec328779f816b498680e 100644
--- a/chrome/browser/chromeos/policy/device_status_collector.cc
+++ b/chrome/browser/chromeos/policy/device_status_collector.cc
@@ -103,7 +103,10 @@ const char kCPUTempFilePattern[] = "temp*_input";
int64_t TimestampToDayKey(Time timestamp) {
Time::Exploded exploded;
timestamp.LocalMidnight().LocalExplode(&exploded);
- return (Time::FromUTCExploded(exploded) - Time::UnixEpoch()).InMilliseconds();
+ Time out_time;
+ bool conversion_success = Time::FromUTCExploded(exploded, &out_time);
+ DCHECK(conversion_success);
+ return (out_time - Time::UnixEpoch()).InMilliseconds();
}
// Helper function (invoked via blocking pool) to fetch information about

Powered by Google App Engine
This is Rietveld 408576698