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

Original: r648795
Revert: r649032

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.

Bug: 940805
Change-Id: I1a8402e8004c2830f66e6c4249e3f883aa1490c6
Reviewed-by: Dominic Mazzoni <>
Commit-Queue: Dominic Mazzoni <>
Cr-Commit-Position: refs/heads/master@{#651460}
8 files changed