summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history
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/history
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/history')
-rw-r--r--chrome/browser/history/expire_history_backend.h11
-rw-r--r--chrome/browser/history/history_types.h7
2 files changed, 11 insertions, 7 deletions
diff --git a/chrome/browser/history/expire_history_backend.h b/chrome/browser/history/expire_history_backend.h
index 149bcce..5b7525c 100644
--- a/chrome/browser/history/expire_history_backend.h
+++ b/chrome/browser/history/expire_history_backend.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H__
-#define CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H__
+#ifndef CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H_
+#define CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H_
#include <queue>
#include <set>
@@ -36,6 +36,9 @@ class BroadcastNotificationDelegate {
// thread. The details argument will have ownership taken by this function.
virtual void BroadcastNotifications(NotificationType type,
HistoryDetails* details_deleted) = 0;
+
+ protected:
+ virtual ~BroadcastNotificationDelegate() {}
};
// Encapsulates visit expiration criteria and type of visits to expire.
@@ -277,4 +280,4 @@ class ExpireHistoryBackend {
} // namespace history
-#endif // CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H__
+#endif // CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H_
diff --git a/chrome/browser/history/history_types.h b/chrome/browser/history/history_types.h
index b064ccf..89d3851 100644
--- a/chrome/browser/history/history_types.h
+++ b/chrome/browser/history/history_types.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_HISTORY_HISTORY_TYPES_H__
-#define CHROME_BROWSER_HISTORY_HISTORY_TYPES_H__
+#ifndef CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_
+#define CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_
#include <map>
#include <set>
@@ -73,6 +73,7 @@ class URLRow {
// Initialize will not set the URL, so our initialization above will stay.
Initialize();
}
+ virtual ~URLRow() {}
URLID id() const { return id_; }
const GURL& url() const { return url_; }
@@ -521,4 +522,4 @@ struct MostVisitedURL {
} // history
-#endif // CHROME_BROWSER_HISTORY_HISTORY_TYPES_H__
+#endif // CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_