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

Unified Diff: device/serial/serial_device_enumerator_mac.cc

Issue 2608513002: Remove mojo::String. (Closed)
Patch Set: rebase Created 3 years, 12 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/geolocation/geolocation_service_impl.cc ('k') | ios/web/webui/mojo_facade.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/serial_device_enumerator_mac.cc
diff --git a/device/serial/serial_device_enumerator_mac.cc b/device/serial/serial_device_enumerator_mac.cc
index 3d82328bb7fc7315a56cdf63203c2f4a004b96bb..954f575172de7070dd8f51bf6f247c36ec7614c9 100644
--- a/device/serial/serial_device_enumerator_mac.cc
+++ b/device/serial/serial_device_enumerator_mac.cc
@@ -65,7 +65,7 @@ CFNumberRef GetCFNumberProperty(io_service_t service, const CFStringRef key) {
// successful.
bool GetStringProperty(io_service_t service,
const CFStringRef key,
- mojo::String* value) {
+ std::string* value) {
CFStringRef propValue = GetCFStringProperty(service, key);
if (propValue) {
*value = base::SysCFStringRefToUTF8(propValue);
@@ -135,17 +135,17 @@ mojo::Array<serial::DeviceInfoPtr> GetDevicesNew() {
callout_info->product_id = productId;
}
- mojo::String displayName;
+ std::string display_name;
if (GetStringProperty(scoped_device.get(), CFSTR(kUSBProductString),
- &displayName)) {
- callout_info->display_name = displayName.PassStorage();
+ &display_name)) {
+ callout_info->display_name = std::move(display_name);
}
// Each serial device has two "paths" in /dev/ associated with it: a
// "dialin" path starting with "tty" and a "callout" path starting with
// "cu". Each of these is considered a different device from Chrome's
// standpoint, but both should share the device's USB properties.
- mojo::String dialinDevice;
+ std::string dialinDevice;
if (GetStringProperty(scoped_device.get(), CFSTR(kIODialinDeviceKey),
&dialinDevice)) {
serial::DeviceInfoPtr dialin_info = callout_info.Clone();
@@ -153,7 +153,7 @@ mojo::Array<serial::DeviceInfoPtr> GetDevicesNew() {
devices.push_back(std::move(dialin_info));
}
- mojo::String calloutDevice;
+ std::string calloutDevice;
if (GetStringProperty(scoped_device.get(), CFSTR(kIOCalloutDeviceKey),
&calloutDevice)) {
callout_info->path = calloutDevice;
« no previous file with comments | « device/geolocation/geolocation_service_impl.cc ('k') | ios/web/webui/mojo_facade.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698