Chromium Code Reviews| 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..4094b49a186fc44c77124c6f2a822160dbf38db3 100644 |
| --- a/chrome/browser/chromeos/policy/device_status_collector.cc |
| +++ b/chrome/browser/chromeos/policy/device_status_collector.cc |
| @@ -103,7 +103,13 @@ 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; |
| + // Returns Time(0) on failure. |
| + if (!Time::FromUTCExploded(exploded, &out_time)) { |
|
Lei Zhang
2016/07/06 17:44:29
Can values that come from another Time instance ev
maksims (do not use this acc)
2016/07/07 05:48:14
No, they shouldn't
|
| + // TODO(maksims): implement failure handling. |
| + NOTIMPLEMENTED(); |
| + } |
| + return (out_time - Time::UnixEpoch()).InMilliseconds(); |
| } |
| // Helper function (invoked via blocking pool) to fetch information about |