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

Unified Diff: device/devices_app/usb/device_impl.cc

Issue 1544323002: Convert Pass()→std::move() in //device (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/devices_app/devices_app.cc ('k') | device/devices_app/usb/device_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/devices_app/usb/device_impl.cc
diff --git a/device/devices_app/usb/device_impl.cc b/device/devices_app/usb/device_impl.cc
index c8268e621de8ee150382606c0bddb30b940fe659..bc1cf1765540aad86c9962734aca1b1c40e7bba1 100644
--- a/device/devices_app/usb/device_impl.cc
+++ b/device/devices_app/usb/device_impl.cc
@@ -5,6 +5,7 @@
#include "device/devices_app/usb/device_impl.h"
#include <stddef.h>
+#include <utility>
#include "base/bind.h"
#include "base/callback.h"
@@ -74,7 +75,7 @@ void OnTransferIn(scoped_ptr<MojoTransferInCallback> callback,
std::copy(buffer->data(), buffer->data() + buffer_size, bytes.begin());
data.Swap(&bytes);
}
- callback->Run(mojo::ConvertTo<TransferStatus>(status), data.Pass());
+ callback->Run(mojo::ConvertTo<TransferStatus>(status), std::move(data));
}
void OnControlTransferInPermissionCheckComplete(
@@ -94,7 +95,7 @@ void OnControlTransferInPermissionCheckComplete(
base::Bind(&OnTransferIn, base::Passed(&callback)));
} else {
mojo::Array<uint8_t> data;
- callback->Run(TRANSFER_STATUS_PERMISSION_DENIED, data.Pass());
+ callback->Run(TRANSFER_STATUS_PERMISSION_DENIED, std::move(data));
}
}
@@ -144,7 +145,7 @@ void OnIsochronousTransferIn(
packets[i].Swap(&bytes);
}
}
- callback->Run(mojo::ConvertTo<TransferStatus>(status), packets.Pass());
+ callback->Run(mojo::ConvertTo<TransferStatus>(status), std::move(packets));
}
void OnIsochronousTransferOut(
@@ -160,9 +161,9 @@ void OnIsochronousTransferOut(
DeviceImpl::DeviceImpl(scoped_refptr<UsbDevice> device,
PermissionProviderPtr permission_provider,
mojo::InterfaceRequest<Device> request)
- : binding_(this, request.Pass()),
+ : binding_(this, std::move(request)),
device_(device),
- permission_provider_(permission_provider.Pass()),
+ permission_provider_(std::move(permission_provider)),
weak_factory_(this) {
// This object owns itself and will be destroyed if either the message pipe
// it is bound to is closed or the PermissionProvider it depends on is
« no previous file with comments | « device/devices_app/devices_app.cc ('k') | device/devices_app/usb/device_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698