| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "ui/events/ozone/device/udev/device_manager_udev.h" | 5 #include "ui/events/ozone/device/udev/device_manager_udev.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 DeviceEvent::ActionType action_type; | 179 DeviceEvent::ActionType action_type; |
| 180 if (!action || !strcmp(action, "add")) | 180 if (!action || !strcmp(action, "add")) |
| 181 action_type = DeviceEvent::ADD; | 181 action_type = DeviceEvent::ADD; |
| 182 else if (!strcmp(action, "remove")) | 182 else if (!strcmp(action, "remove")) |
| 183 action_type = DeviceEvent::REMOVE; | 183 action_type = DeviceEvent::REMOVE; |
| 184 else if (!strcmp(action, "change")) | 184 else if (!strcmp(action, "change")) |
| 185 action_type = DeviceEvent::CHANGE; | 185 action_type = DeviceEvent::CHANGE; |
| 186 else | 186 else |
| 187 return nullptr; | 187 return nullptr; |
| 188 | 188 |
| 189 return base::WrapUnique( | 189 return base::MakeUnique<DeviceEvent>(device_type, action_type, |
| 190 new DeviceEvent(device_type, action_type, base::FilePath(path))); | 190 base::FilePath(path)); |
| 191 } | 191 } |
| 192 | 192 |
| 193 } // namespace ui | 193 } // namespace ui |
| OLD | NEW |