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

Unified Diff: content/renderer/usb/web_usb_client_impl.cc

Issue 1755683004: Skip attempting to bind a DevicePtr for a removed device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | content/renderer/usb/web_usb_device_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/usb/web_usb_client_impl.cc
diff --git a/content/renderer/usb/web_usb_client_impl.cc b/content/renderer/usb/web_usb_client_impl.cc
index ed9246a0aefc0b5baf37c44c442576d23e3cefbb..cf30b9d9f4e60f648626c38d33d3d4721271c3a3 100644
--- a/content/renderer/usb/web_usb_client_impl.cc
+++ b/content/renderer/usb/web_usb_client_impl.cc
@@ -161,11 +161,8 @@ void WebUSBClientImpl::OnDeviceChangeNotification(
for (size_t i = 0; i < notification->devices_removed.size(); ++i) {
const device::usb::DeviceInfoPtr& device_info =
notification->devices_removed[i];
- device::usb::DevicePtr device;
- device_manager_->GetDevice(device_info->guid, mojo::GetProxy(&device));
observer_->onDeviceDisconnected(blink::adoptWebPtr(new WebUSBDeviceImpl(
- std::move(device),
- mojo::ConvertTo<blink::WebUSBDeviceInfo>(device_info))));
+ nullptr, mojo::ConvertTo<blink::WebUSBDeviceInfo>(device_info))));
}
}
« no previous file with comments | « no previous file | content/renderer/usb/web_usb_device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698