Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2126)

Unified Diff: device/generic_sensor/platform_sensor_linux.h

Issue 2569763004: [sensors](Linux) Fix tsan data race in sensor reader (Closed)
Patch Set: modify code comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/generic_sensor/platform_sensor_linux.h
diff --git a/device/generic_sensor/platform_sensor_linux.h b/device/generic_sensor/platform_sensor_linux.h
index e8555d931ee1486401d85ed2f0f3a9a19baabf52..7bf603a8bbd76b44d51ebc857786efb03b38efb8 100644
--- a/device/generic_sensor/platform_sensor_linux.h
+++ b/device/generic_sensor/platform_sensor_linux.h
@@ -23,6 +23,7 @@ class PlatformSensorLinux : public PlatformSensor {
mojo::ScopedSharedBufferMapping mapping,
PlatformSensorProvider* provider,
const SensorInfoLinux* sensor_device,
+ std::unique_ptr<SensorReader> sensor_reader,
scoped_refptr<base::SingleThreadTaskRunner> polling_thread_task_runner);
mojom::ReportingMode GetReportingMode() override;
@@ -45,6 +46,8 @@ class PlatformSensorLinux : public PlatformSensor {
const PlatformSensorConfiguration default_configuration_;
const mojom::ReportingMode reporting_mode_;
+ scoped_refptr<base::SingleThreadTaskRunner> polling_thread_task_runner_;
+
// A sensor reader that reads values from sensor files
// and stores them to a SensorReading structure.
std::unique_ptr<SensorReader> sensor_reader_;
« no previous file with comments | « no previous file | device/generic_sensor/platform_sensor_linux.cc » ('j') | device/generic_sensor/platform_sensor_provider_linux.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698