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

Unified Diff: chrome/browser/extensions/api/api_resource.h

Issue 10777003: Refactor APIResourceController to ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge/antony/fix build. Created 8 years, 5 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 | « chrome/browser/extensions/api/api_function.cc ('k') | chrome/browser/extensions/api/api_resource.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/api_resource.h
diff --git a/chrome/browser/extensions/api/api_resource.h b/chrome/browser/extensions/api/api_resource.h
index 7474a36a21dbd4acdb919216d599ccd04611a089..86b9180d466565c5f0d8b371fc0459041f12d594 100644
--- a/chrome/browser/extensions/api/api_resource.h
+++ b/chrome/browser/extensions/api/api_resource.h
@@ -10,33 +10,24 @@
namespace extensions {
-class APIResourceController;
-class APIResourceEventNotifier;
+class ApiResourceEventNotifier;
-// An APIResource represents something that an extension API manages, such as a
-// socket or a serial-port connection.
-class APIResource {
+// An ApiResource represents something that an extension API manages, such as a
+// socket or a serial-port connection. Typically, an ApiResourceManager will
+// control the lifetime of all ApiResources of a specific derived type.
+class ApiResource {
public:
- virtual ~APIResource();
+ virtual ~ApiResource();
protected:
- enum APIResourceType {
- SocketResource,
- SerialConnectionResource,
- UsbDeviceResource,
- };
- APIResource(APIResourceType api_resource_type,
- APIResourceEventNotifier* event_notifier);
+ ApiResource(ApiResourceEventNotifier* event_notifier);
- APIResourceType api_resource_type() const;
- APIResourceEventNotifier* event_notifier() const;
+ ApiResourceEventNotifier* event_notifier() const;
private:
- APIResourceType api_resource_type_;
- scoped_refptr<APIResourceEventNotifier> event_notifier_;
+ scoped_refptr<ApiResourceEventNotifier> event_notifier_;
- friend class APIResourceController;
- DISALLOW_COPY_AND_ASSIGN(APIResource);
+ DISALLOW_COPY_AND_ASSIGN(ApiResource);
};
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/api/api_function.cc ('k') | chrome/browser/extensions/api/api_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698