| OLD | NEW |
| 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 #include "device/usb/usb_service_linux.h" | 5 #include "device/usb/usb_service_linux.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
| 13 #include "base/location.h" | 13 #include "base/location.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/scoped_observer.h" | 15 #include "base/scoped_observer.h" |
| 16 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
| 17 #include "base/stl_util.h" | 17 #include "base/stl_util.h" |
| 18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
| 19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
| 20 #include "base/threading/thread_restrictions.h" | 20 #include "base/threading/thread_restrictions.h" |
| 21 #include "base/threading/thread_task_runner_handle.h" | 21 #include "base/threading/thread_task_runner_handle.h" |
| 22 #include "build/build_config.h" | 22 #include "build/build_config.h" |
| 23 #include "components/device_event_log/device_event_log.h" | 23 #include "components/device_event_log/device_event_log.h" |
| 24 #include "device/core/device_monitor_linux.h" | 24 #include "device/base/device_monitor_linux.h" |
| 25 #include "device/usb/usb_device_handle.h" | 25 #include "device/usb/usb_device_handle.h" |
| 26 #include "device/usb/usb_device_linux.h" | 26 #include "device/usb/usb_device_linux.h" |
| 27 #include "device/usb/webusb_descriptors.h" | 27 #include "device/usb/webusb_descriptors.h" |
| 28 | 28 |
| 29 namespace device { | 29 namespace device { |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 // Standard USB requests and descriptor types: | 33 // Standard USB requests and descriptor types: |
| 34 const uint16_t kUsbVersion2_1 = 0x0210; | 34 const uint16_t kUsbVersion2_1 = 0x0210; |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 result.reserve(devices().size()); | 312 result.reserve(devices().size()); |
| 313 for (const auto& map_entry : devices()) | 313 for (const auto& map_entry : devices()) |
| 314 result.push_back(map_entry.second); | 314 result.push_back(map_entry.second); |
| 315 for (const auto& callback : enumeration_callbacks_) | 315 for (const auto& callback : enumeration_callbacks_) |
| 316 callback.Run(result); | 316 callback.Run(result); |
| 317 enumeration_callbacks_.clear(); | 317 enumeration_callbacks_.clear(); |
| 318 } | 318 } |
| 319 } | 319 } |
| 320 | 320 |
| 321 } // namespace device | 321 } // namespace device |
| OLD | NEW |