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 "device/usb/usb_service_impl.h" | 5 #include "device/usb/usb_service_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <list> | 8 #include <list> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/barrier_closure.h" | 12 #include "base/barrier_closure.h" |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/location.h" | 14 #include "base/location.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.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/thread_task_runner_handle.h" | 20 #include "base/thread_task_runner_handle.h" |
21 #include "build/build_config.h" | 21 #include "build/build_config.h" |
22 #include "components/device_event_log/device_event_log.h" | 22 #include "components/device_event_log/device_event_log.h" |
23 #include "device/usb/usb_device_handle.h" | 23 #include "device/usb/usb_device_handle.h" |
24 #include "device/usb/usb_error.h" | 24 #include "device/usb/usb_error.h" |
25 #include "device/usb/webusb_descriptors.h" | 25 #include "device/usb/webusb_descriptors.h" |
| 26 #include "net/base/io_buffer.h" |
26 #include "third_party/libusb/src/libusb/libusb.h" | 27 #include "third_party/libusb/src/libusb/libusb.h" |
27 | 28 |
28 #if defined(OS_WIN) | 29 #if defined(OS_WIN) |
29 #include <setupapi.h> | 30 #include <setupapi.h> |
30 #include <usbiodef.h> | 31 #include <usbiodef.h> |
31 | 32 |
32 #include "base/strings/string_util.h" | 33 #include "base/strings/string_util.h" |
33 #include "device/core/device_info_query_win.h" | 34 #include "device/core/device_info_query_win.h" |
34 #endif // OS_WIN | 35 #endif // OS_WIN |
35 | 36 |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 PlatformDeviceMap::iterator it = platform_devices_.find(platform_device); | 795 PlatformDeviceMap::iterator it = platform_devices_.find(platform_device); |
795 if (it != platform_devices_.end()) { | 796 if (it != platform_devices_.end()) { |
796 RemoveDevice(it->second); | 797 RemoveDevice(it->second); |
797 } else { | 798 } else { |
798 devices_being_enumerated_.erase(platform_device); | 799 devices_being_enumerated_.erase(platform_device); |
799 } | 800 } |
800 libusb_unref_device(platform_device); | 801 libusb_unref_device(platform_device); |
801 } | 802 } |
802 | 803 |
803 } // namespace device | 804 } // namespace device |
OLD | NEW |