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

Unified Diff: components/usb_service/usb_device_handle_impl.cc

Issue 500383003: Remove implicit conversions from scoped_refptr to T* in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
Index: components/usb_service/usb_device_handle_impl.cc
diff --git a/components/usb_service/usb_device_handle_impl.cc b/components/usb_service/usb_device_handle_impl.cc
index 71883177cad6c5c9b525273c8c6ba94edde928f8..73b04b95eb7f260121ce1255951c6998d4a9fcf6 100644
--- a/components/usb_service/usb_device_handle_impl.cc
+++ b/components/usb_service/usb_device_handle_impl.cc
@@ -196,7 +196,7 @@ UsbDeviceHandleImpl::UsbDeviceHandleImpl(
context_(context) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(handle) << "Cannot create device with NULL handle.";
- DCHECK(interfaces_) << "Unable to list interfaces";
+ DCHECK(interfaces_.get()) << "Unable to list interfaces";
}
UsbDeviceHandleImpl::~UsbDeviceHandleImpl() {
@@ -532,7 +532,7 @@ void UsbDeviceHandleImpl::ControlTransfer(
const size_t resized_length = LIBUSB_CONTROL_SETUP_SIZE + length;
scoped_refptr<net::IOBuffer> resized_buffer(
new net::IOBufferWithSize(static_cast<int>(resized_length)));
- if (!resized_buffer) {
+ if (!resized_buffer.get()) {
callback.Run(USB_TRANSFER_ERROR, buffer, 0);
return;
}

Powered by Google App Engine
This is Rietveld 408576698