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

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

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
Index: extensions/browser/api/usb/usb_device_resource.h
diff --git a/extensions/browser/api/usb/usb_device_resource.h b/extensions/browser/api/usb/usb_device_resource.h
index dfa4bf4dc6d7f33e1600258b2848b40c1619362f..ef9a7cc8f9b01d30b023602dfb8ff6fd59e745b0 100644
--- a/extensions/browser/api/usb/usb_device_resource.h
+++ b/extensions/browser/api/usb/usb_device_resource.h
@@ -5,36 +5,35 @@
#ifndef EXTENSIONS_BROWSER_API_USB_USB_DEVICE_RESOURCE_H_
#define EXTENSIONS_BROWSER_API_USB_USB_DEVICE_RESOURCE_H_
-#include <set>
#include <string>
#include "base/basictypes.h"
-#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "content/public/browser/browser_thread.h"
#include "device/usb/usb_device_handle.h"
#include "extensions/browser/api/api_resource.h"
#include "extensions/browser/api/api_resource_manager.h"
-#include "extensions/common/api/usb.h"
-namespace net {
-class IOBuffer;
-} // namespace net
+namespace usb_service {
+class UsbDeviceHandle;
+}
namespace extensions {
// A UsbDeviceResource is an ApiResource wrapper for a UsbDevice.
class UsbDeviceResource : public ApiResource {
public:
+ static const content::BrowserThread::ID kThreadId =
+ content::BrowserThread::FILE;
+
UsbDeviceResource(const std::string& owner_extension_id,
scoped_refptr<device::UsbDeviceHandle> device);
virtual ~UsbDeviceResource();
scoped_refptr<device::UsbDeviceHandle> device() { return device_; }
- static const content::BrowserThread::ID kThreadId =
- content::BrowserThread::FILE;
+ virtual bool IsPersistent() const OVERRIDE;
private:
friend class ApiResourceManager<UsbDeviceResource>;
« no previous file with comments | « extensions/browser/api/hid/hid_connection_resource.cc ('k') | extensions/browser/api/usb/usb_device_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698