| Index: content/browser/device_sensors/device_sensor_service.h
|
| diff --git a/content/browser/device_sensors/device_sensor_service.h b/content/browser/device_sensors/device_sensor_service.h
|
| index 00946b484ae160a329029147e4255bf3a4dd2d63..424f2706a24852da3b7f0ef54d76cbb1e02b50cf 100644
|
| --- a/content/browser/device_sensors/device_sensor_service.h
|
| +++ b/content/browser/device_sensors/device_sensor_service.h
|
| @@ -30,19 +30,20 @@ class CONTENT_EXPORT DeviceSensorService {
|
|
|
| // Increments the number of users of the provider. The Provider is running
|
| // when there's > 0 users, and is paused when the count drops to 0.
|
| - // Must be called on the I/O thread.
|
| + // Must be called on a thread that can perform I/O.
|
| void AddConsumer(ConsumerType consumer_type);
|
|
|
| // Removes a consumer. Should be matched with an AddConsumer call.
|
| - // Must be called on the I/O thread.
|
| + // Must be called on a thread that can perform I/O.
|
| void RemoveConsumer(ConsumerType cosumer_type);
|
|
|
| // Returns the shared memory handle of the device motion data.
|
| mojo::ScopedSharedBufferHandle GetSharedMemoryHandle(
|
| ConsumerType consumer_type);
|
|
|
| - // Stop/join with the background polling thread in |provider_|.
|
| - void Shutdown();
|
| + // Stop/join with the background polling thread in |provider_|. Must be
|
| + // called on the UI thread.
|
| + void ShutDownOnUIThread();
|
|
|
| // Injects a custom data fetcher for testing purposes. This class takes
|
| // ownership of the injected object.
|
| @@ -63,7 +64,9 @@ class CONTENT_EXPORT DeviceSensorService {
|
| int num_orientation_absolute_readers_;
|
| bool is_shutdown_;
|
| std::unique_ptr<DataFetcherSharedMemory> data_fetcher_;
|
| - base::ThreadChecker thread_checker_;
|
| +
|
| + // Associated with the IO thread.
|
| + base::ThreadChecker io_thread_checker_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DeviceSensorService);
|
| };
|
|
|