Avoid running MetricsFinalizationTask in the background

We were kicking off MetricsFinalizationTask from the background task, and
when URLs are added to the pipeline. This CL avoids running this task from
the background.

The motivation is that we suspect metrics are being dropped when reported in
the background. When this change goes live, we expect to see an uptick in
reports. This change is safe because the metrics task has no end-user effect,
and users reliably get URLs added to the pipeline. If URLs are no longer added,
then there's no need to run this task anyway.

Bug: 944615

Change-Id: I8a5239933945d0fe75941d9c8d905749be96903f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1534361
Commit-Queue: Dan H <harringtond@google.com>
Reviewed-by: Carlos Knippschild <carlosk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#643404}
2 files changed