Fix a DCHECK failure in chrome:://policy page.
chrome://policy page calculates the elapsed time since last cloud policy fetch. However, some elpsed times are calculated based on the timestamp from server side whose clock may not be synced with the local one. This may ends up with a negative elpsed time in the page. To fix this: 1) Use last fetch timestamp in ReportScheduler if available. Because ReportScheduler will use local clock if possible. 2) We have to fallback to server clock if ReportScheduler never records a last fetch timestamp or there is no ReportScheduler instance. In this case, a negative elapsed time will be changed to 0. Bug: 1059025 Change-Id: I94fbc1b2127f81462ab389d448a9e25777edcd6d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2090731Reviewed-by:Julian Pastarmov <pastarmovj@chromium.org> Commit-Queue: Owen Min <zmin@chromium.org> Cr-Commit-Position: refs/heads/master@{#748239}
Showing
Please register or sign in to comment