| Index: device/hid/hid_service_linux.cc
|
| diff --git a/device/hid/hid_service_linux.cc b/device/hid/hid_service_linux.cc
|
| index f02a550e5a9d3822f9c7e8035fcd379499d3807e..812228909f9d73e4934e663da503ac51fe0824a7 100644
|
| --- a/device/hid/hid_service_linux.cc
|
| +++ b/device/hid/hid_service_linux.cc
|
| @@ -110,14 +110,14 @@ void HidServiceLinux::Enumerate() {
|
| ScopedUdevDevicePtr hid_dev(
|
| udev_device_new_from_syspath(udev_.get(), udev_list_entry_get_name(i)));
|
| if (hid_dev) {
|
| - PlatformDeviceAdd(hid_dev.get());
|
| + PlatformAddDevice(hid_dev.get());
|
| }
|
| }
|
|
|
| initialized_ = true;
|
| }
|
|
|
| -void HidServiceLinux::PlatformDeviceAdd(udev_device* device) {
|
| +void HidServiceLinux::PlatformAddDevice(udev_device* device) {
|
| if (!device)
|
| return;
|
|
|
| @@ -161,7 +161,7 @@ void HidServiceLinux::PlatformDeviceAdd(udev_device* device) {
|
| AddDevice(device_info);
|
| }
|
|
|
| -void HidServiceLinux::PlatformDeviceRemove(udev_device* raw_dev) {
|
| +void HidServiceLinux::PlatformRemoveDevice(udev_device* raw_dev) {
|
| // The returned the device is not referenced.
|
| udev_device* hid_dev =
|
| udev_device_get_parent_with_subsystem_devtype(raw_dev, "hid", NULL);
|
| @@ -177,7 +177,8 @@ void HidServiceLinux::PlatformDeviceRemove(udev_device* raw_dev) {
|
| RemoveDevice(device_id);
|
| }
|
|
|
| -scoped_refptr<HidConnection> HidServiceLinux::Connect(std::string device_id) {
|
| +scoped_refptr<HidConnection> HidServiceLinux::Connect(
|
| + const std::string& device_id) {
|
| if (!ContainsKey(devices_, device_id))
|
| return NULL;
|
| ScopedUdevDevicePtr hid_device(
|
| @@ -200,9 +201,9 @@ void HidServiceLinux::OnFileCanReadWithoutBlocking(int fd) {
|
|
|
| std::string action(udev_device_get_action(dev.get()));
|
| if (action == kUdevActionAdd) {
|
| - PlatformDeviceAdd(dev.get());
|
| + PlatformAddDevice(dev.get());
|
| } else if (action == kUdevActionRemove) {
|
| - PlatformDeviceRemove(dev.get());
|
| + PlatformRemoveDevice(dev.get());
|
| }
|
| }
|
|
|
|
|