summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/infobar_delegate.h
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-21 23:20:48 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-21 23:20:48 +0000
commitb618713c323f0a5e85fb53300719e8ff1cdb410b (patch)
tree6782542670381c37d6b64667268f092470c57efc /chrome/browser/tab_contents/infobar_delegate.h
parent930eefad81129f1c8db7621f8a02e02b855adf90 (diff)
downloadchromium_src-b618713c323f0a5e85fb53300719e8ff1cdb410b.zip
chromium_src-b618713c323f0a5e85fb53300719e8ff1cdb410b.tar.gz
chromium_src-b618713c323f0a5e85fb53300719e8ff1cdb410b.tar.bz2
Fix issue 6520 by ensuring that InfoBarClosed is called whenever a tab is closed or a navigation to a URL that is not supported by the current TabContentsType takes place by invoking it on all InfoBarDelegates from TabContents::Destroy(), which is the best least-common-denominator I've found for doing this work. Alternatively I could have made InfoBarDelegate listen for TAB_CONTENTS_DESTROYED and self-invoke InfoBarClosed but that seemed unorthodox (relatively speaking).
This prevents InfoBarDelegates from leaking in these cases. BUG=6520 Review URL: http://codereview.chromium.org/18381 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8406 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/infobar_delegate.h')
-rw-r--r--chrome/browser/tab_contents/infobar_delegate.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/infobar_delegate.h b/chrome/browser/tab_contents/infobar_delegate.h
index fa3f332..5ec5309 100644
--- a/chrome/browser/tab_contents/infobar_delegate.h
+++ b/chrome/browser/tab_contents/infobar_delegate.h
@@ -85,6 +85,8 @@ class InfoBarDelegate {
// stored using StoreActiveEntryUniqueID automatically.
explicit InfoBarDelegate(TabContents* contents);
+ virtual ~InfoBarDelegate() { }
+
// Store the unique id for the active entry in the specified TabContents, to
// be used later upon navigation to determine if this InfoBarDelegate should
// be expired from |contents_|.