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

Unified Diff: chrome/browser/extensions/api/socket/socket_api.h

Issue 10071035: RefCounted types should not have public destructors, chrome/browser/extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implementations Created 8 years, 8 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: chrome/browser/extensions/api/socket/socket_api.h
diff --git a/chrome/browser/extensions/api/socket/socket_api.h b/chrome/browser/extensions/api/socket/socket_api.h
index a9efeaa55a48e383625f2f0d1ca4cde4b1800314..617f43ad6b847efab1120bdb945fda3e8b2ea0e4 100644
--- a/chrome/browser/extensions/api/socket/socket_api.h
+++ b/chrome/browser/extensions/api/socket/socket_api.h
@@ -29,9 +29,14 @@ extern const char kUdpSocketType[];
class SocketCreateFunction : public AsyncIOAPIFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.create")
+
SocketCreateFunction();
protected:
+ virtual ~SocketCreateFunction();
+
+ // AsyncIOAPIFunction:
virtual bool Prepare() OVERRIDE;
virtual void Work() OVERRIDE;
virtual bool Respond() OVERRIDE;
@@ -48,64 +53,82 @@ class SocketCreateFunction : public AsyncIOAPIFunction {
std::string address_;
int port_;
APIResourceEventNotifier* event_notifier_;
-
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.create")
};
class SocketDestroyFunction : public AsyncIOAPIFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.destroy")
+
protected:
+ virtual ~SocketDestroyFunction() {}
+
+ // AsyncIOAPIFunction:
virtual bool Prepare() OVERRIDE;
virtual void Work() OVERRIDE;
virtual bool Respond() OVERRIDE;
private:
int socket_id_;
-
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.destroy")
};
class SocketConnectFunction : public AsyncIOAPIFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.connect")
+
protected:
+ virtual ~SocketConnectFunction() {}
+
+ // AsyncIOAPIFunction:
virtual bool Prepare() OVERRIDE;
virtual void Work() OVERRIDE;
virtual bool Respond() OVERRIDE;
private:
int socket_id_;
-
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.connect")
};
class SocketDisconnectFunction : public AsyncIOAPIFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.disconnect")
+
protected:
+ virtual ~SocketDisconnectFunction() {}
+
+ // AsyncIOAPIFunction:
virtual bool Prepare() OVERRIDE;
virtual void Work() OVERRIDE;
virtual bool Respond() OVERRIDE;
private:
int socket_id_;
-
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.disconnect")
};
class SocketReadFunction : public AsyncIOAPIFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.read")
+
protected:
+ virtual ~SocketReadFunction() {}
+
+ // AsyncIOAPIFunction:
virtual bool Prepare() OVERRIDE;
virtual void Work() OVERRIDE;
virtual bool Respond() OVERRIDE;
private:
int socket_id_;
-
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.read")
};
class SocketWriteFunction : public AsyncIOAPIFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.write")
+
SocketWriteFunction();
- virtual ~SocketWriteFunction();
protected:
+ virtual ~SocketWriteFunction();
+
+ // AsyncIOAPIFunction:
virtual bool Prepare() OVERRIDE;
virtual void Work() OVERRIDE;
virtual bool Respond() OVERRIDE;
@@ -113,8 +136,6 @@ class SocketWriteFunction : public AsyncIOAPIFunction {
private:
int socket_id_;
scoped_refptr<net::IOBufferWithSize> io_buffer_;
-
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.write")
};
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698