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

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

Issue 2830033003: Use {To/From}JavaTime for policy timestamps (Closed)
Patch Set: Rebase Created 3 years, 8 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 a8dab4f831b3a4017f447e3b417043c74cd5330b..caef23633ab758b7cd4a48eedf746322e898ca1d 100644
--- a/chrome/browser/chromeos/policy/device_status_collector.cc
+++ b/chrome/browser/chromeos/policy/device_status_collector.cc
@@ -106,7 +106,7 @@ int64_t TimestampToDayKey(Time timestamp) {
Time out_time;
bool conversion_success = Time::FromUTCExploded(exploded, &out_time);
DCHECK(conversion_success);
- return (out_time - Time::UnixEpoch()).InMilliseconds();
+ return out_time.ToJavaTime();
}
// Helper function (invoked via blocking pool) to fetch information about

Powered by Google App Engine
This is Rietveld 408576698