commit | 01f7205e196ef47e8aa11e93d2b62687fc6977f2 | [log] [tgz] |
---|---|---|
author | Alexei Svitkine <[email protected]> | Thu Nov 01 23:45:04 2018 |
committer | Commit Bot <[email protected]> | Thu Nov 01 23:45:04 2018 |
tree | d20548c7c958bbc4cd9520473d195109364abcd1 | |
parent | f86769a5f7318d66a0f87e3620f9e05459bd3747 [diff] |
Fix UMA/UKM ActualLogUploadInterval metrics some more. https://chromium-review.googlesource.com/c/chromium/src/+/1278226 attempted to fix these, but there was still an issue because last_upload_finish_time_ was being set to TimeTicks() instead of Now(). Bug: 894909 Change-Id: Ibacc8755e53ed6a67fa0ba5a52cea1f281f32c36 Reviewed-on: https://chromium-review.googlesource.com/c/1310639 Reviewed-by: Steven Holte <[email protected]> Commit-Queue: Alexei Svitkine <[email protected]> Cr-Commit-Position: refs/heads/master@{#604756}
diff --git a/components/metrics/reporting_service.cc b/components/metrics/reporting_service.cc index cb61d660..4045492 100644 --- a/components/metrics/reporting_service.cc +++ b/components/metrics/reporting_service.cc
@@ -99,11 +99,11 @@ DVLOG(1) << "SendNextLog"; DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + const base::TimeTicks now = base::TimeTicks::Now(); LogActualUploadInterval(last_upload_finish_time_.is_null() ? base::TimeDelta() - : base::TimeTicks::Now() - - last_upload_finish_time_); - last_upload_finish_time_ = base::TimeTicks(); + : now - last_upload_finish_time_); + last_upload_finish_time_ = now; if (!reporting_active()) { upload_scheduler_->StopAndUploadCancelled();