summaryrefslogtreecommitdiffstats
path: root/chrome/browser/location_bar.h
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-16 01:07:08 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-16 01:07:08 +0000
commit135fd3b65dac543c78543f85f83b4d0ea83d5184 (patch)
tree154c664fec0b39e5f263cc7a8616c4cdcb983d1d /chrome/browser/location_bar.h
parent20cb5f48d36abeb25bbf6cdd6a5f6debe014e8b1 (diff)
downloadchromium_src-135fd3b65dac543c78543f85f83b4d0ea83d5184.zip
chromium_src-135fd3b65dac543c78543f85f83b4d0ea83d5184.tar.gz
chromium_src-135fd3b65dac543c78543f85f83b4d0ea83d5184.tar.bz2
Give classes with virtual methods virtual protected d'tors instead of non-virtual public implicit d'tors.
Was originally: Replace public nonvirtual destructors in classes with virtual members with protected nonvirtual destructors where possible, and with public virtual destructors where destruction of a derived class occurs. (chrome/browser/[a-m]* only) (Part 4 of http://www.gotw.ca/publications/mill18.htm has a rationale for why public nonvirtual destructors in classes with virtual members is dangerous.) BUG=none TEST=base_unittests & app_unittests Review URL: http://codereview.chromium.org/201100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34634 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/location_bar.h')
-rw-r--r--chrome/browser/location_bar.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/location_bar.h b/chrome/browser/location_bar.h
index 71dba9c..d3f4019 100644
--- a/chrome/browser/location_bar.h
+++ b/chrome/browser/location_bar.h
@@ -69,6 +69,9 @@ class LocationBar {
// Returns a pointer to the testing interface.
virtual LocationBarTesting* GetLocationBarForTesting() = 0;
+
+ protected:
+ virtual ~LocationBar() {}
};
class LocationBarTesting {
@@ -87,6 +90,9 @@ class LocationBarTesting {
// Simulates a left mouse pressed on the visible page action at |index|.
virtual void TestPageActionPressed(size_t index) = 0;
+
+ protected:
+ virtual ~LocationBarTesting() {}
};
#endif // CHROME_BROWSER_LOCATION_BAR_H_