From 95bbcc75d1e793d85cda714e640c1ddb36dd4c59 Mon Sep 17 00:00:00 2001 From: "rsleevi@chromium.org" Date: Wed, 11 Jul 2012 00:07:54 +0000 Subject: RefCounted types should not have public destructors BUG=123295 TEST=existing unittests Review URL: https://chromiumcodereview.appspot.com/10694111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146001 0039d316-1c4b-4281-b951-d872f2087c98 --- ipc/ipc_listener.h | 5 +++-- ipc/ipc_sender.h | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'ipc') diff --git a/ipc/ipc_listener.h b/ipc/ipc_listener.h index 49c1228..9189eec 100644 --- a/ipc/ipc_listener.h +++ b/ipc/ipc_listener.h @@ -16,8 +16,6 @@ class Message; // Implemented by consumers of a Channel to receive messages. class IPC_EXPORT Listener { public: - virtual ~Listener() {} - // Called when a message is received. Returns true iff the message was // handled. virtual bool OnMessageReceived(const Message& message) = 0; @@ -39,6 +37,9 @@ class IPC_EXPORT Listener { // has an error that causes the listening channel to close. virtual void OnChannelListenError() {} #endif // OS_POSIX + + protected: + virtual ~Listener() {} }; } // namespace IPC diff --git a/ipc/ipc_sender.h b/ipc/ipc_sender.h index f70f709..9c26bf3 100644 --- a/ipc/ipc_sender.h +++ b/ipc/ipc_sender.h @@ -13,13 +13,14 @@ class Message; class IPC_EXPORT Sender { public: - virtual ~Sender() {} - // Sends the given IPC message. The implementor takes ownership of the // given Message regardless of whether or not this method succeeds. This // is done to make this method easier to use. Returns true on success and // false otherwise. virtual bool Send(Message* msg) = 0; + + protected: + virtual ~Sender() {} }; } // namespace IPC -- cgit v1.1