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

Unified Diff: device/serial/serial_device_enumerator_mac.cc

Issue 1576283002: mojo: Remove Pass() from MOJO_MOVE_ONLY_TYPE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mojopass: morewindows Created 4 years, 11 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 | « no previous file | device/serial/serial_device_enumerator_win.cc » ('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 3a81f1d175b6da230c05d840ca9f332ac3138dd3..456e7bbca6209961f161bd60abed67a8914eeb97 100644
--- a/device/serial/serial_device_enumerator_mac.cc
+++ b/device/serial/serial_device_enumerator_mac.cc
@@ -106,13 +106,13 @@ mojo::Array<serial::DeviceInfoPtr> GetDevicesNew() {
CFMutableDictionaryRef matchingDict =
IOServiceMatching(kIOSerialBSDServiceValue);
if (!matchingDict)
- return devices.Pass();
+ return devices;
io_iterator_t it;
kern_return_t kr =
IOServiceGetMatchingServices(kIOMasterPortDefault, matchingDict, &it);
if (kr != KERN_SUCCESS)
- return devices.Pass();
+ return devices;
base::mac::ScopedIOObject<io_iterator_t> scoped_it(it);
base::mac::ScopedIOObject<io_service_t> scoped_device;
@@ -148,18 +148,18 @@ mojo::Array<serial::DeviceInfoPtr> GetDevicesNew() {
&dialinDevice)) {
serial::DeviceInfoPtr dialin_info = callout_info.Clone();
dialin_info->path = dialinDevice;
- devices.push_back(dialin_info.Pass());
+ devices.push_back(std::move(dialin_info));
}
mojo::String calloutDevice;
if (GetStringProperty(scoped_device.get(), CFSTR(kIOCalloutDeviceKey),
&calloutDevice)) {
callout_info->path = calloutDevice;
- devices.push_back(callout_info.Pass());
+ devices.push_back(std::move(callout_info));
}
}
- return devices.Pass();
+ return devices;
}
// Returns an array of devices as retrieved through the old method of
@@ -192,12 +192,12 @@ mojo::Array<serial::DeviceInfoPtr> GetDevicesOld() {
if (base::MatchPattern(next_device, *i)) {
serial::DeviceInfoPtr info(serial::DeviceInfo::New());
info->path = next_device;
- devices.push_back(info.Pass());
+ devices.push_back(std::move(info));
break;
}
}
} while (true);
- return devices.Pass();
+ return devices;
}
} // namespace
@@ -236,7 +236,7 @@ mojo::Array<serial::DeviceInfoPtr> SerialDeviceEnumeratorMac::GetDevices() {
mojo::Array<serial::DeviceInfoPtr> devices;
deviceMap.DecomposeMapTo(&paths, &devices);
- return devices.Pass();
+ return devices;
}
} // namespace device
« no previous file with comments | « no previous file | device/serial/serial_device_enumerator_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698