Initialize AccelerometerReader using a SequencedTaskRunner
commit8922efb9dcf191c669b4e5b214dd376554941b0f
authorjonross <jonross@chromium.org>
Tue, 23 Jun 2015 18:28:05 +0000 (23 11:28 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 23 Jun 2015 18:29:52 +0000 (23 18:29 +0000)
tree8b1d8645c350be092dfe85e4434acea9549043d7
parent77433551299d75383e172b026bc322dcd09976cb
Initialize AccelerometerReader using a SequencedTaskRunner

Change the initialization of the AccelerometerReader to occur using a SequencedTaskRunner. Updated the subsequent reads of the accelerometer file to also use the same SequencedTaskRunner.
This way reading and processing accelerometer values doesn't affect UI.

It already notifies observers on their own threads. So items which need to
update UI receive the updates on the UI thread.

TEST=manual testing on device
BUG=461433

Review URL: https://codereview.chromium.org/1174193002

Cr-Commit-Position: refs/heads/master@{#335711}
chrome/browser/ui/ash/ash_init.cc
chromeos/accelerometer/accelerometer_reader.cc
chromeos/accelerometer/accelerometer_reader.h