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

Unified Diff: extensions/browser/api/hid/hid_connection_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
« no previous file with comments | « extensions/browser/api/hid/hid_api.h ('k') | extensions/browser/api/hid/hid_connection_resource.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/hid/hid_connection_resource.h
diff --git a/extensions/browser/api/hid/hid_connection_resource.h b/extensions/browser/api/hid/hid_connection_resource.h
index 13d6a116b6beaf7e08790ea02395b902c7ac2958..9c9dc6cceea95cb2077d1cc498ebbe98377f8e3d 100644
--- a/extensions/browser/api/hid/hid_connection_resource.h
+++ b/extensions/browser/api/hid/hid_connection_resource.h
@@ -13,10 +13,17 @@
#include "extensions/browser/api/api_resource.h"
#include "extensions/browser/api/api_resource_manager.h"
+namespace device {
+class HidConnection;
+}
+
namespace extensions {
class HidConnectionResource : public ApiResource {
public:
+ static const content::BrowserThread::ID kThreadId =
+ content::BrowserThread::FILE;
+
HidConnectionResource(const std::string& owner_extension_id,
scoped_refptr<device::HidConnection> connection);
virtual ~HidConnectionResource();
@@ -25,10 +32,9 @@ class HidConnectionResource : public ApiResource {
return connection_;
}
- static const char* service_name() { return "HidConnectionResourceManager"; }
+ virtual bool IsPersistent() const OVERRIDE;
- static const content::BrowserThread::ID kThreadId =
- content::BrowserThread::FILE;
+ static const char* service_name() { return "HidConnectionResourceManager"; }
private:
scoped_refptr<device::HidConnection> connection_;
« no previous file with comments | « extensions/browser/api/hid/hid_api.h ('k') | extensions/browser/api/hid/hid_connection_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698