| 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_linux.h" | 5 #include "device/serial/serial_device_enumerator_linux.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 uint32_t int_value; | 80 uint32_t int_value; |
| 81 if (vendor_id && base::HexStringToUInt(vendor_id, &int_value)) { | 81 if (vendor_id && base::HexStringToUInt(vendor_id, &int_value)) { |
| 82 info->vendor_id = int_value; | 82 info->vendor_id = int_value; |
| 83 info->has_vendor_id = true; | 83 info->has_vendor_id = true; |
| 84 } | 84 } |
| 85 if (product_id && base::HexStringToUInt(product_id, &int_value)) { | 85 if (product_id && base::HexStringToUInt(product_id, &int_value)) { |
| 86 info->product_id = int_value; | 86 info->product_id = int_value; |
| 87 info->has_product_id = true; | 87 info->has_product_id = true; |
| 88 } | 88 } |
| 89 if (product_name) | 89 if (product_name) |
| 90 info->display_name = product_name; | 90 info->display_name.emplace(product_name); |
| 91 devices.push_back(std::move(info)); | 91 devices.push_back(std::move(info)); |
| 92 } | 92 } |
| 93 } | 93 } |
| 94 return devices; | 94 return devices; |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace device | 97 } // namespace device |
| OLD | NEW |