chromeos: Fix autotestPrivate.getHistograms for other procs.

Make the chrome.autotestPrivate API's getHistograms function
call content::FetchHistogramsAsynchronously() and
base::StatisticsRecorder::ImportProvidedHistograms() to
fetch and incorporate histogram data from other processes,
similar to what chrome://histograms does.

Without this, the function (which is called over the Chrome
DevTools Protocol by Chrome OS integration tests) serves
stale data. For example,
Media.GpuVideoDecoderInitializeStatus samples are missing
since that histogram is recorded from renderer processes.

Bug: 893937
Change-Id: Id6415f1a32b41ad7ddeb251216f09b2314eb5980
Reviewed-on: https://chromium-review.googlesource.com/c/1274892
Commit-Queue: Dan Erat <derat@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599035}
2 files changed