| 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/serial/serial_device_enumerator_mac.h" | 5 #include "device/serial/serial_device_enumerator_mac.h" |
| 6 | 6 |
| 7 #include <IOKit/serial/IOSerialKeys.h> | 7 #include <IOKit/serial/IOSerialKeys.h> |
| 8 #include <IOKit/usb/IOUSBLib.h> | 8 #include <IOKit/usb/IOUSBLib.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 #include <memory> | 12 #include <memory> |
| 13 #include <utility> | 13 #include <utility> |
| 14 | 14 |
| 15 #include "base/files/file_enumerator.h" | 15 #include "base/files/file_enumerator.h" |
| 16 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
| 17 #include "base/files/file_util.h" | 17 #include "base/files/file_util.h" |
| 18 #include "base/mac/scoped_cftyperef.h" | 18 #include "base/mac/scoped_cftyperef.h" |
| 19 #include "base/mac/scoped_ioobject.h" | 19 #include "base/mac/scoped_ioobject.h" |
| 20 #include "base/metrics/sparse_histogram.h" | 20 #include "base/metrics/histogram_macros.h" |
| 21 #include "base/strings/pattern.h" | 21 #include "base/strings/pattern.h" |
| 22 #include "base/strings/string_util.h" | 22 #include "base/strings/string_util.h" |
| 23 #include "base/strings/sys_string_conversions.h" | 23 #include "base/strings/sys_string_conversions.h" |
| 24 | 24 |
| 25 namespace device { | 25 namespace device { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 // Searches a service and all ancestor services for a property with the | 29 // Searches a service and all ancestor services for a property with the |
| 30 // specified key, returning NULL if no such key was found. | 30 // specified key, returning NULL if no such key was found. |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 } | 235 } |
| 236 | 236 |
| 237 mojo::Array<mojo::String> paths; | 237 mojo::Array<mojo::String> paths; |
| 238 mojo::Array<serial::DeviceInfoPtr> devices; | 238 mojo::Array<serial::DeviceInfoPtr> devices; |
| 239 deviceMap.DecomposeMapTo(&paths, &devices); | 239 deviceMap.DecomposeMapTo(&paths, &devices); |
| 240 | 240 |
| 241 return devices; | 241 return devices; |
| 242 } | 242 } |
| 243 | 243 |
| 244 } // namespace device | 244 } // namespace device |
| OLD | NEW |