Commit f97af9d1 authored by Ilya Sherman's avatar Ilya Sherman Committed by Commit Bot

[Task Scheduler] Allow the ChromeOSMetricsProvider to wait.

The InitTaskGetHardwareClassOnBackgroundThread() code calls into
StatisticsProvider::GetMachineStatistic(), which calls
WaitForStatisticsLoaded(), which uses a WaitableEvent.

Bug: 743056
Change-Id: I3da6e975b1d774f963ca4cdb9242878357bd2b78
Reviewed-on: https://chromium-review.googlesource.com/572740Reviewed-by: default avatarAlexei Svitkine (slow) <asvitkine@chromium.org>
Commit-Queue: Alexei Svitkine (slow) <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488378}
parent a52ebe0a
...@@ -173,7 +173,8 @@ void ChromeOSMetricsProvider::InitTaskGetHardwareClass( ...@@ -173,7 +173,8 @@ void ChromeOSMetricsProvider::InitTaskGetHardwareClass(
// the UI thread. // the UI thread.
base::PostTaskWithTraitsAndReply( base::PostTaskWithTraitsAndReply(
FROM_HERE, FROM_HERE,
{base::MayBlock(), base::TaskPriority::BACKGROUND, {base::MayBlock(), base::WithBaseSyncPrimitives(),
base::TaskPriority::BACKGROUND,
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}, base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN},
base::BindOnce( base::BindOnce(
&ChromeOSMetricsProvider::InitTaskGetHardwareClassOnBackgroundThread, &ChromeOSMetricsProvider::InitTaskGetHardwareClassOnBackgroundThread,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment