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

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

Issue 548703003: Mark HID and USB device connections as non-persistent API resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « extensions/browser/api/usb/usb_device_resource.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/usb/usb_device_resource.cc
diff --git a/extensions/browser/api/usb/usb_device_resource.cc b/extensions/browser/api/usb/usb_device_resource.cc
index 347a1a75ca73841683a198d82f963b3d7cc7078c..4825ed5b070aef530bd4ed86c24f504845710a3d 100644
--- a/extensions/browser/api/usb/usb_device_resource.cc
+++ b/extensions/browser/api/usb/usb_device_resource.cc
@@ -37,9 +37,11 @@ UsbDeviceResource::UsbDeviceResource(const std::string& owner_extension_id,
}
UsbDeviceResource::~UsbDeviceResource() {
- BrowserThread::PostTask(BrowserThread::FILE,
- FROM_HERE,
- base::Bind(&UsbDeviceHandle::Close, device_));
+ device_->Close();
+}
+
+bool UsbDeviceResource::IsPersistent() const {
+ return false;
}
} // namespace extensions
« no previous file with comments | « extensions/browser/api/usb/usb_device_resource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698