Re-land: Compute image description histograms on the right thread.

Original: r648795 http://crrev.com/c/1551803
Revert: r649032 http://crrev.com/c/1559413

The revert was due to calling the Chrome OS histogram code on
the wrong thread. Fixed to use the UI thread.

Original description:

The code to compute image description histograms was
hitting a DCHECK because it was running on the wrong
thread. I temporarily disabled that code, this change
re-enables it and fixes the underlying issue.

I noticed that we had code to compute accessibility
histograms that were split by platform - on some platforms
we were running the code on the UI thread, on other platforms
on a separate thread.

To solve this, I changed the code so that we can update
histograms on either thread on any platform.

TBR=jam@chromium.org

Bug: 940805
Change-Id: I1a8402e8004c2830f66e6c4249e3f883aa1490c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1570207
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#651460}
8 files changed