summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 20:39:31 +0000
committerziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 20:39:31 +0000
commit1bc6c551f14f237d5d56b18afb87ea1570483c1c (patch)
tree3a5b2c22e19d3d06d82580a88754e944d3aac7c3 /chrome/browser/tab_contents
parentde1e675607fb3f8fb34f90093f3b9500cf3f2e46 (diff)
downloadchromium_src-1bc6c551f14f237d5d56b18afb87ea1570483c1c.zip
chromium_src-1bc6c551f14f237d5d56b18afb87ea1570483c1c.tar.gz
chromium_src-1bc6c551f14f237d5d56b18afb87ea1570483c1c.tar.bz2
Add undeclared virtual destructors part 3
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/3072010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54373 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/page_navigator.h3
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.h1
-rw-r--r--chrome/browser/tab_contents/web_contents_unittest.cc3
-rw-r--r--chrome/browser/tab_contents/web_drag_dest_gtk.h2
4 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/page_navigator.h b/chrome/browser/tab_contents/page_navigator.h
index 2bc9150..8773146 100644
--- a/chrome/browser/tab_contents/page_navigator.h
+++ b/chrome/browser/tab_contents/page_navigator.h
@@ -22,6 +22,9 @@ class PageNavigator {
virtual void OpenURL(const GURL& url, const GURL& referrer,
WindowOpenDisposition disposition,
PageTransition::Type transition) = 0;
+
+ protected:
+ virtual ~PageNavigator() {}
};
#endif // CHROME_BROWSER_TAB_CONTENTS_PAGE_NAVIGATOR_H_
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.h b/chrome/browser/tab_contents/render_view_host_delegate_helper.h
index d6f0cce..331f086 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.h
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.h
@@ -35,6 +35,7 @@ class TabContents;
class RenderViewHostDelegateViewHelper {
public:
RenderViewHostDelegateViewHelper() {}
+ virtual ~RenderViewHostDelegateViewHelper() {}
// Creates a new renderer for window.open. This will either be a
// BackgroundContents (if the window_container_type ==
diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc
index 3a96e1a..9b30f7b 100644
--- a/chrome/browser/tab_contents/web_contents_unittest.cc
+++ b/chrome/browser/tab_contents/web_contents_unittest.cc
@@ -53,6 +53,9 @@ class TestInterstitialPage : public InterstitialPage {
public:
virtual void TestInterstitialPageDeleted(
TestInterstitialPage* interstitial) = 0;
+
+ protected:
+ virtual ~Delegate() {}
};
// IMPORTANT NOTE: if you pass stack allocated values for |state| and
diff --git a/chrome/browser/tab_contents/web_drag_dest_gtk.h b/chrome/browser/tab_contents/web_drag_dest_gtk.h
index 3367a81..b302e79 100644
--- a/chrome/browser/tab_contents/web_drag_dest_gtk.h
+++ b/chrome/browser/tab_contents/web_drag_dest_gtk.h
@@ -24,7 +24,7 @@ class TabContents;
class WebDragDestGtk {
public:
WebDragDestGtk(TabContents* tab_contents, GtkWidget* widget);
- ~WebDragDestGtk();
+ virtual ~WebDragDestGtk();
// This is called when the renderer responds to a drag motion event. We must
// update the system drag cursor.