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

Unified Diff: device/devices_app/usb/device_impl_unittest.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/usb/device_impl.cc ('k') | device/devices_app/usb/device_manager_impl.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_unittest.cc
diff --git a/device/devices_app/usb/device_impl_unittest.cc b/device/devices_app/usb/device_impl_unittest.cc
index 15ece7c84ba22cc27d52263175cc02733a4f13a3..3fbc702aefec8d6f7c0aa0f19acf762a6ed8fdab 100644
--- a/device/devices_app/usb/device_impl_unittest.cc
+++ b/device/devices_app/usb/device_impl_unittest.cc
@@ -2,12 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "device/devices_app/usb/device_impl.h"
+
#include <stddef.h>
#include <stdint.h>
-
#include <map>
#include <queue>
#include <set>
+#include <utility>
#include <vector>
#include "base/bind.h"
@@ -15,7 +17,6 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/stl_util.h"
-#include "device/devices_app/usb/device_impl.h"
#include "device/devices_app/usb/fake_permission_provider.h"
#include "device/usb/mock_usb_device.h"
#include "device/usb/mock_usb_device_handle.h"
@@ -157,7 +158,7 @@ class USBDeviceImplTest : public testing::Test {
PermissionProviderPtr permission_provider;
permission_provider_.Bind(mojo::GetProxy(&permission_provider));
DevicePtr proxy;
- new DeviceImpl(mock_device_, permission_provider.Pass(),
+ new DeviceImpl(mock_device_, std::move(permission_provider),
mojo::GetProxy(&proxy));
// Set up mock handle calls to respond based on mock device configs
@@ -187,7 +188,7 @@ class USBDeviceImplTest : public testing::Test {
ON_CALL(mock_handle(), IsochronousTransfer(_, _, _, _, _, _, _, _))
.WillByDefault(Invoke(this, &USBDeviceImplTest::IsochronousTransfer));
- return proxy.Pass();
+ return proxy;
}
DevicePtr GetMockDeviceProxy() {
@@ -662,7 +663,7 @@ TEST_F(USBDeviceImplTest, ControlTransfer) {
params->index = 7;
base::RunLoop loop;
device->ControlTransferIn(
- params.Pass(), static_cast<uint32_t>(fake_data.size()), 0,
+ std::move(params), static_cast<uint32_t>(fake_data.size()), 0,
base::Bind(&ExpectTransferInAndThen, TRANSFER_STATUS_COMPLETED,
fake_data, loop.QuitClosure()));
loop.Run();
@@ -684,7 +685,7 @@ TEST_F(USBDeviceImplTest, ControlTransfer) {
params->index = 7;
base::RunLoop loop;
device->ControlTransferOut(
- params.Pass(), mojo::Array<uint8_t>::From(fake_data), 0,
+ std::move(params), mojo::Array<uint8_t>::From(fake_data), 0,
base::Bind(&ExpectTransferStatusAndThen, TRANSFER_STATUS_COMPLETED,
loop.QuitClosure()));
loop.Run();
@@ -785,7 +786,7 @@ TEST_F(USBDeviceImplTest, IsochronousTransfer) {
packets[i].Swap(&bytes);
}
device->IsochronousTransferOut(
- 1, packets.Pass(), 0,
+ 1, std::move(packets), 0,
base::Bind(&ExpectTransferStatusAndThen, TRANSFER_STATUS_COMPLETED,
loop.QuitClosure()));
loop.Run();
« no previous file with comments | « device/devices_app/usb/device_impl.cc ('k') | device/devices_app/usb/device_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698