sensors: Remove bogus DCHECK from SensorReader::Create()
There is no reason to require SensorReader instances to be created in a thread/task that allows blocking: SensorReader already uses a ThreadChecker and all methods verify they are being called from the right thread (i.e. one that can block). The call to base::AssertBlockingAllowedDeprecated() has been there since the code was added in commit 061d113d ("[sensors](CrOS/Linux) Implement Sensor device manager for sensors"), but the existing unit tests behaved differently from the production code paths and not many people seem to have used a Linux or ChromeOS build with DCHECKs enabled on a machine with sensors. PlatformSensorAndProviderLinuxTest has been adjusted and now almost all code runs within a base::ScopedDisallowBlocking scope to better mimic production conditions. Care has been taken to avoid changing too much code: porting classes and tests to base::PostTask() and reducing the amount of task runners passed around will be done separately. Bug: 896382 Change-Id: I374acba4ec982cf5ae49eb44e410607e57ac85c0 Reviewed-on: https://chromium-review.googlesource.com/c/1329921Reviewed-by:Reilly Grant <reillyg@chromium.org> Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Cr-Commit-Position: refs/heads/master@{#606978}
Showing
Please register or sign in to comment