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

Unified Diff: components/usb_service/usb_device_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_impl.cc
diff --git a/components/usb_service/usb_device_impl.cc b/components/usb_service/usb_device_impl.cc
index aaba7e34f09440ca455f991c2e6c3aae6d598c23..243d25d39e187f3102b0194768294419e117baa8 100644
--- a/components/usb_service/usb_device_impl.cc
+++ b/components/usb_service/usb_device_impl.cc
@@ -97,7 +97,7 @@ scoped_refptr<UsbDeviceHandle> UsbDeviceImpl::Open() {
const int rv = libusb_open(platform_device_, &handle);
if (LIBUSB_SUCCESS == rv) {
scoped_refptr<UsbConfigDescriptor> interfaces = ListInterfaces();
- if (!interfaces)
+ if (!interfaces.get())
return NULL;
scoped_refptr<UsbDeviceHandleImpl> device_handle =
new UsbDeviceHandleImpl(context_, this, handle, interfaces);
@@ -114,7 +114,7 @@ bool UsbDeviceImpl::Close(scoped_refptr<UsbDeviceHandle> handle) {
for (HandlesVector::iterator it = handles_.begin(); it != handles_.end();
++it) {
- if (*it == handle) {
+ if (it->get() == handle.get()) {
(*it)->InternalClose();
handles_.erase(it);
return true;

Powered by Google App Engine
This is Rietveld 408576698