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/search_engines/template_url_model.h | |
| 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/search_engines/template_url_model.h')
| -rw-r--r-- | chrome/browser/search_engines/template_url_model.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/search_engines/template_url_model.h b/chrome/browser/search_engines/template_url_model.h index 95a4a8d..885b382 100644 --- a/chrome/browser/search_engines/template_url_model.h +++ b/chrome/browser/search_engines/template_url_model.h @@ -49,6 +49,9 @@ class TemplateURLModelObserver { public: // Notification that the template url model has changed in some way. virtual void OnTemplateURLModelChanged() = 0; + + protected: + virtual ~TemplateURLModelObserver() {} }; class TemplateURLModel : public WebDataServiceConsumer, @@ -67,8 +70,7 @@ class TemplateURLModel : public WebDataServiceConsumer, explicit TemplateURLModel(Profile* profile); // The following is for testing. TemplateURLModel(const Initializer* initializers, const int count); - - ~TemplateURLModel(); + virtual ~TemplateURLModel(); // Generates a suitable keyword for the specified url. Returns an empty // string if a keyword couldn't be generated. If |autodetected| is true, we |
