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

Side by Side Diff: device/generic_sensor/linux/sensor_device_manager.h

Issue 2878653002: Remove base::NonThreadSafe from //device/generic_sensor/ (Closed)
Patch Set: Remove base::NonThreadSafe from //device/generic_sensor/ Created 3 years, 7 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | device/generic_sensor/linux/sensor_device_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_GENERIC_SENSOR_LINUX_SENSOR_DEVICE_MANAGER_H_ 5 #ifndef DEVICE_GENERIC_SENSOR_LINUX_SENSOR_DEVICE_MANAGER_H_
6 #define DEVICE_GENERIC_SENSOR_LINUX_SENSOR_DEVICE_MANAGER_H_ 6 #define DEVICE_GENERIC_SENSOR_LINUX_SENSOR_DEVICE_MANAGER_H_
7 7
8 #include "base/scoped_observer.h" 8 #include "base/scoped_observer.h"
9 9
10 #include "device/base/device_monitor_linux.h" 10 #include "device/base/device_monitor_linux.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 virtual std::string GetUdevDeviceGetDevnode(udev_device* dev); 61 virtual std::string GetUdevDeviceGetDevnode(udev_device* dev);
62 62
63 // DeviceMonitorLinux::Observer: 63 // DeviceMonitorLinux::Observer:
64 void OnDeviceAdded(udev_device* udev_device) override; 64 void OnDeviceAdded(udev_device* udev_device) override;
65 void OnDeviceRemoved(udev_device* device) override; 65 void OnDeviceRemoved(udev_device* device) override;
66 66
67 // Represents a map of sensors that are already known to this manager after 67 // Represents a map of sensors that are already known to this manager after
68 // initial enumeration. 68 // initial enumeration.
69 SensorDeviceMap sensors_by_node_; 69 SensorDeviceMap sensors_by_node_;
70 70
71 base::ThreadChecker thread_checker_; 71 THREAD_CHECKER(thread_checker_);
72
72 ScopedObserver<DeviceMonitorLinux, DeviceMonitorLinux::Observer> observer_; 73 ScopedObserver<DeviceMonitorLinux, DeviceMonitorLinux::Observer> observer_;
73 74
74 Delegate* delegate_; 75 Delegate* delegate_;
75 76
76 // A task runner, which |delegate_| lives on. 77 // A task runner, which |delegate_| lives on.
77 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 78 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
78 79
79 DISALLOW_COPY_AND_ASSIGN(SensorDeviceManager); 80 DISALLOW_COPY_AND_ASSIGN(SensorDeviceManager);
80 }; 81 };
81 82
82 } // namespace device 83 } // namespace device
83 84
84 #endif // DEVICE_GENERIC_SENSOR_LINUX_SENSOR_DEVICE_MANAGER_H_ 85 #endif // DEVICE_GENERIC_SENSOR_LINUX_SENSOR_DEVICE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | device/generic_sensor/linux/sensor_device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698