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

Unified Diff: extensions/browser/api/usb/usb_api.cc

Issue 881363004: Remove extra call to UsbDeviceHandle::Close in chrome.usb.closeDevice. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | extensions/browser/api/usb/usb_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/usb/usb_api.cc
diff --git a/extensions/browser/api/usb/usb_api.cc b/extensions/browser/api/usb/usb_api.cc
index 44d6f4cd3be6df5bd7078e6a89c2c3526417f417..329287cd2f73536017b478553cc67e8b830a89fc 100644
--- a/extensions/browser/api/usb/usb_api.cc
+++ b/extensions/browser/api/usb/usb_api.cc
@@ -940,7 +940,7 @@ void UsbCloseDeviceFunction::AsyncWorkStart() {
if (!device_handle.get())
return;
- device_handle->Close();
+ // The device handle is closed when the resource is destroyed.
RemoveUsbDeviceResource(parameters_->handle.handle);
AsyncWorkCompleted();
}
« no previous file with comments | « no previous file | extensions/browser/api/usb/usb_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698