Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(462)

Side by Side Diff: device/serial/serial_device_enumerator_linux.cc

Issue 2492013005: Mojo C++ bindings: switch device/serial mojom target to use STL types. (Closed)
Patch Set: \ Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/serial/BUILD.gn ('k') | device/serial/serial_device_enumerator_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « device/serial/BUILD.gn ('k') | device/serial/serial_device_enumerator_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698