diff options
author | ziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-27 20:13:23 +0000 |
---|---|---|
committer | ziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-27 20:13:23 +0000 |
commit | c12ecab6d48f359d79312aaae5f535b0f26f8445 (patch) | |
tree | f24c364ea1906bb414d10888ff920feeaa024679 /app | |
parent | 28a5e7b166ea0eafa36d7626ad6767a365a7a332 (diff) | |
download | chromium_src-c12ecab6d48f359d79312aaae5f535b0f26f8445.zip chromium_src-c12ecab6d48f359d79312aaae5f535b0f26f8445.tar.gz chromium_src-c12ecab6d48f359d79312aaae5f535b0f26f8445.tar.bz2 |
Add undeclared virtual destructors part 2
Preventative maintainance 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.
r=jar
BUG=47469
Review URL: http://codereview.chromium.org/3032024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53831 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r-- | app/active_window_watcher_x.h | 3 | ||||
-rw-r--r-- | app/menus/button_menu_item_model.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/app/active_window_watcher_x.h b/app/active_window_watcher_x.h index 642b63d..e2612ec 100644 --- a/app/active_window_watcher_x.h +++ b/app/active_window_watcher_x.h @@ -21,6 +21,9 @@ class ActiveWindowWatcherX { public: // |active_window| will be NULL if the active window isn't one of Chrome's. virtual void ActiveWindowChanged(GdkWindow* active_window) = 0; + + protected: + virtual ~Observer() {} }; static void AddObserver(Observer* observer); diff --git a/app/menus/button_menu_item_model.h b/app/menus/button_menu_item_model.h index 8e3300e..38f8cf9 100644 --- a/app/menus/button_menu_item_model.h +++ b/app/menus/button_menu_item_model.h @@ -32,6 +32,9 @@ class ButtonMenuItemModel { // Performs the action associated with the specified command id. virtual void ExecuteCommand(int command_id) = 0; virtual bool IsCommandIdEnabled(int command_id) const { return true; } + + protected: + virtual ~Delegate() {} }; ButtonMenuItemModel(int string_id, ButtonMenuItemModel::Delegate* delegate); |