summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-25 09:08:19 +0000
committerhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-25 09:08:19 +0000
commit3690ebe09a8c3cea0fd7d9ece8f5b8d8ebc65c19 (patch)
treeb26f7f81e48a95473eb4af5304301e9d8cd22fb8 /base
parenteef99b6591d82399096abdcee07dd67359eec036 (diff)
downloadchromium_src-3690ebe09a8c3cea0fd7d9ece8f5b8d8ebc65c19.zip
chromium_src-3690ebe09a8c3cea0fd7d9ece8f5b8d8ebc65c19.tar.gz
chromium_src-3690ebe09a8c3cea0fd7d9ece8f5b8d8ebc65c19.tar.bz2
Virtual destructors should have virtual keyword.
Make sure user-declared virtual destructors always have the virtual keyword. The Clang style-check plugin will check for this soon. No functionality change: virtual is only added to destructors that are already implicitly virtual. Also fix a couple of in-line destructor definitions. BUG=83408 TEST=none Review URL: http://codereview.chromium.org/7064033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86587 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/message_loop.h2
-rw-r--r--base/message_pump_default.h2
-rw-r--r--base/synchronization/waitable_event_watcher.h2
-rw-r--r--base/task_queue.h2
-rw-r--r--base/values.h2
5 files changed, 5 insertions, 5 deletions
diff --git a/base/message_loop.h b/base/message_loop.h
index c660c9e..9a03d6b 100644
--- a/base/message_loop.h
+++ b/base/message_loop.h
@@ -111,7 +111,7 @@ class BASE_API MessageLoop : public base::MessagePump::Delegate {
// Normally, it is not necessary to instantiate a MessageLoop. Instead, it
// is typical to make use of the current thread's MessageLoop instance.
explicit MessageLoop(Type type = TYPE_DEFAULT);
- ~MessageLoop();
+ virtual ~MessageLoop();
// Returns the MessageLoop object for the current thread, or null if none.
static MessageLoop* current();
diff --git a/base/message_pump_default.h b/base/message_pump_default.h
index 5030aa9..26bd554 100644
--- a/base/message_pump_default.h
+++ b/base/message_pump_default.h
@@ -15,7 +15,7 @@ namespace base {
class MessagePumpDefault : public MessagePump {
public:
MessagePumpDefault();
- ~MessagePumpDefault() {}
+ virtual ~MessagePumpDefault() {}
// MessagePump methods:
virtual void Run(Delegate* delegate);
diff --git a/base/synchronization/waitable_event_watcher.h b/base/synchronization/waitable_event_watcher.h
index aa16d0b..6e1d197 100644
--- a/base/synchronization/waitable_event_watcher.h
+++ b/base/synchronization/waitable_event_watcher.h
@@ -68,7 +68,7 @@ class BASE_API WaitableEventWatcher
public:
WaitableEventWatcher();
- ~WaitableEventWatcher();
+ virtual ~WaitableEventWatcher();
class Delegate {
public:
diff --git a/base/task_queue.h b/base/task_queue.h
index 8bd3cb7..45a43e9 100644
--- a/base/task_queue.h
+++ b/base/task_queue.h
@@ -17,7 +17,7 @@
class BASE_API TaskQueue : public Task {
public:
TaskQueue();
- ~TaskQueue();
+ virtual ~TaskQueue();
// Push the specified task onto the queue. When the queue is run, the tasks
// will be run in the order they are pushed.
diff --git a/base/values.h b/base/values.h
index 6fb3240..43894d1 100644
--- a/base/values.h
+++ b/base/values.h
@@ -355,7 +355,7 @@ class BASE_API ListValue : public Value {
typedef ValueVector::const_iterator const_iterator;
ListValue();
- ~ListValue();
+ virtual ~ListValue();
// Clears the contents of this ListValue
void Clear();