summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-02 16:34:16 +0000
committerziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-02 16:34:16 +0000
commit695092fd7614c257866347f049e28ec327d7a3d3 (patch)
treedfe6ab2c6c0deff9bb6aa82e808c93df57b5c96d /app
parent74d1397a6cd1d497fe27d6f0e27cd20d70e1ab85 (diff)
downloadchromium_src-695092fd7614c257866347f049e28ec327d7a3d3.zip
chromium_src-695092fd7614c257866347f049e28ec327d7a3d3.tar.gz
chromium_src-695092fd7614c257866347f049e28ec327d7a3d3.tar.bz2
Add undeclared virtual destructors part 5
Preventative maintenance for abstract classes that do not declare virtual destructors. Base classes that do not declare their destructors as virtual could potentially lead to memory leaks. These files were discovered using the -Wnon-virtual-dtor flag in g++. r=jar BUG=47469 Review URL: http://codereview.chromium.org/3080013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54540 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r--app/animation_container.h3
-rw-r--r--app/menus/simple_menu_model.h3
-rw-r--r--app/system_monitor.h3
3 files changed, 9 insertions, 0 deletions
diff --git a/app/animation_container.h b/app/animation_container.h
index 467e246..806b4e1 100644
--- a/app/animation_container.h
+++ b/app/animation_container.h
@@ -33,6 +33,9 @@ class AnimationContainer : public base::RefCounted<AnimationContainer> {
// Invoked when no more animations are being managed by this container.
virtual void AnimationContainerEmpty(AnimationContainer* container) = 0;
+
+ protected:
+ virtual ~Observer() {}
};
// Interface for the elements the AnimationContainer contains. This is
diff --git a/app/menus/simple_menu_model.h b/app/menus/simple_menu_model.h
index 2e732a9..c196225 100644
--- a/app/menus/simple_menu_model.h
+++ b/app/menus/simple_menu_model.h
@@ -43,6 +43,9 @@ class SimpleMenuModel : public MenuModel {
// Performs the action associated with the specified command id.
virtual void ExecuteCommand(int command_id) = 0;
+
+ protected:
+ virtual ~Delegate() {}
};
// The Delegate can be NULL, though if it is items can't be checked or
diff --git a/app/system_monitor.h b/app/system_monitor.h
index 6525b70..e5371ac 100644
--- a/app/system_monitor.h
+++ b/app/system_monitor.h
@@ -68,6 +68,9 @@ class SystemMonitor {
// Notification that the system is resuming.
virtual void OnResume() {}
+
+ protected:
+ virtual ~PowerObserver() {}
};
// Add a new observer.