summaryrefslogtreecommitdiffstats
path: root/device/usb
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-09-04 22:28:13 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-05 05:30:03 +0000
commit37fac505ffd432f088abbc5056e7c72ca59ff017 (patch)
tree0adc58a695df4a8a2b006b4222d08cef2c17bc50 /device/usb
parentd098906547cc70f8626709ae1243be7f8c1e0e22 (diff)
downloadchromium_src-37fac505ffd432f088abbc5056e7c72ca59ff017.zip
chromium_src-37fac505ffd432f088abbc5056e7c72ca59ff017.tar.gz
chromium_src-37fac505ffd432f088abbc5056e7c72ca59ff017.tar.bz2
Random fixes for scoped_refptr operator T* removal.
BUG=110610 TBR=caitkp, michaeln, rockot, sievers, sky, willchan Review URL: https://codereview.chromium.org/543893002 Cr-Commit-Position: refs/heads/master@{#293453}
Diffstat (limited to 'device/usb')
-rw-r--r--device/usb/usb_device_handle_unittest.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/device/usb/usb_device_handle_unittest.cc b/device/usb/usb_device_handle_unittest.cc
index f24f210..98523b9 100644
--- a/device/usb/usb_device_handle_unittest.cc
+++ b/device/usb/usb_device_handle_unittest.cc
@@ -30,11 +30,11 @@ class UsbDeviceHandleTest : public ::testing::Test {
ASSERT_TRUE(gadget_->SetType(UsbTestGadget::ECHO));
handle_ = gadget_->GetDevice()->Open();
- ASSERT_TRUE(handle_);
+ ASSERT_TRUE(handle_.get());
}
virtual void TearDown() {
- if (handle_) {
+ if (handle_.get()) {
handle_->Close();
}
gadget_.reset(NULL);
@@ -77,7 +77,7 @@ class TestCompletionCallback {
};
TEST_F(UsbDeviceHandleTest, InterruptTransfer) {
- if (!handle_) {
+ if (!handle_.get()) {
return;
}
@@ -85,7 +85,7 @@ TEST_F(UsbDeviceHandleTest, InterruptTransfer) {
TestCompletionCallback in_completion;
handle_->InterruptTransfer(USB_DIRECTION_INBOUND,
0x81,
- in_buffer,
+ in_buffer.get(),
in_buffer->size(),
5000, // 5 second timeout
in_completion.callback());
@@ -99,7 +99,7 @@ TEST_F(UsbDeviceHandleTest, InterruptTransfer) {
handle_->InterruptTransfer(USB_DIRECTION_OUTBOUND,
0x01,
- out_buffer,
+ out_buffer.get(),
out_buffer->size(),
5000, // 5 second timeout
out_completion.callback());
@@ -118,7 +118,7 @@ TEST_F(UsbDeviceHandleTest, InterruptTransfer) {
}
TEST_F(UsbDeviceHandleTest, BulkTransfer) {
- if (!handle_) {
+ if (!handle_.get()) {
return;
}
@@ -127,7 +127,7 @@ TEST_F(UsbDeviceHandleTest, BulkTransfer) {
TestCompletionCallback in_completion;
handle_->BulkTransfer(USB_DIRECTION_INBOUND,
0x81,
- in_buffer,
+ in_buffer.get(),
in_buffer->size(),
5000, // 5 second timeout
in_completion.callback());
@@ -141,7 +141,7 @@ TEST_F(UsbDeviceHandleTest, BulkTransfer) {
handle_->BulkTransfer(USB_DIRECTION_OUTBOUND,
0x01,
- out_buffer,
+ out_buffer.get(),
out_buffer->size(),
5000, // 5 second timeout
out_completion.callback());