diff options
author | ziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-24 02:47:40 +0000 |
---|---|---|
committer | ziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-24 02:47:40 +0000 |
commit | 46ebf0640d32b313618fe443a34e959059b2c3f9 (patch) | |
tree | 84b616ce5385bce6c8d4b966e74daf7648fdc8c5 /chrome/browser/tab_contents | |
parent | 7c543fd101874d1453dfcf9727dd0d39d296ef50 (diff) | |
download | chromium_src-46ebf0640d32b313618fe443a34e959059b2c3f9.zip chromium_src-46ebf0640d32b313618fe443a34e959059b2c3f9.tar.gz chromium_src-46ebf0640d32b313618fe443a34e959059b2c3f9.tar.bz2 |
Add undeclared virtual destructors.
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
Review URL: http://codereview.chromium.org/2856051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53570 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/constrained_window.h | 3 | ||||
-rw-r--r-- | chrome/browser/tab_contents/render_view_host_manager.h | 5 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_delegate.h | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/tab_contents/constrained_window.h b/chrome/browser/tab_contents/constrained_window.h index 3dc6592..7de2ade 100644 --- a/chrome/browser/tab_contents/constrained_window.h +++ b/chrome/browser/tab_contents/constrained_window.h @@ -53,6 +53,9 @@ class ConstrainedWindow { // Sets focus on the Constrained Window. virtual void FocusConstrainedWindow() {} + + protected: + virtual ~ConstrainedWindow() {} }; #endif // CHROME_BROWSER_TAB_CONTENTS_CONSTRAINED_WINDOW_H_ diff --git a/chrome/browser/tab_contents/render_view_host_manager.h b/chrome/browser/tab_contents/render_view_host_manager.h index 0fa0f26..5a6e0f7 100644 --- a/chrome/browser/tab_contents/render_view_host_manager.h +++ b/chrome/browser/tab_contents/render_view_host_manager.h @@ -67,6 +67,9 @@ class RenderViewHostManager // Focuses the location bar. virtual void SetFocusToLocationBar(bool select_all) = 0; + + protected: + virtual ~Delegate() {} }; // Both delegate pointers must be non-NULL and are not owned by this class. @@ -76,7 +79,7 @@ class RenderViewHostManager // You must call Init() before using this class. RenderViewHostManager(RenderViewHostDelegate* render_view_delegate, Delegate* delegate); - ~RenderViewHostManager(); + virtual ~RenderViewHostManager(); // For arguments, see TabContents constructor. void Init(Profile* profile, diff --git a/chrome/browser/tab_contents/tab_contents_delegate.h b/chrome/browser/tab_contents/tab_contents_delegate.h index 7854003..fdd0964 100644 --- a/chrome/browser/tab_contents/tab_contents_delegate.h +++ b/chrome/browser/tab_contents/tab_contents_delegate.h @@ -276,7 +276,7 @@ class TabContentsDelegate : public AutomationResourceRoutingDelegate { virtual void ContentTypeChanged(TabContents* source); protected: - ~TabContentsDelegate(); + virtual ~TabContentsDelegate(); }; #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |