diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-16 01:07:08 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-16 01:07:08 +0000 |
commit | 135fd3b65dac543c78543f85f83b4d0ea83d5184 (patch) | |
tree | 154c664fec0b39e5f263cc7a8616c4cdcb983d1d /chrome | |
parent | 20cb5f48d36abeb25bbf6cdd6a5f6debe014e8b1 (diff) | |
download | chromium_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')
29 files changed, 121 insertions, 30 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.h b/chrome/browser/autocomplete/autocomplete.h index 2a8f1b0..f7de326 100644 --- a/chrome/browser/autocomplete/autocomplete.h +++ b/chrome/browser/autocomplete/autocomplete.h @@ -472,6 +472,9 @@ class AutocompleteProvider // them all again when this is called anyway, so such a parameter wouldn't // actually be useful. virtual void OnProviderUpdate(bool updated_matches) = 0; + + protected: + virtual ~ACProviderListener() {} }; AutocompleteProvider(ACProviderListener* listener, diff --git a/chrome/browser/autocomplete/autocomplete_edit.h b/chrome/browser/autocomplete/autocomplete_edit.h index a4f4e69..1a0386c 100644 --- a/chrome/browser/autocomplete/autocomplete_edit.h +++ b/chrome/browser/autocomplete/autocomplete_edit.h @@ -1,4 +1,4 @@ -// 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. @@ -58,6 +58,9 @@ class AutocompleteEditController { // Returns the title of the current page. virtual std::wstring GetTitle() const = 0; + + protected: + virtual ~AutocompleteEditController() {} }; class AutocompleteEditModel : public NotificationObserver { diff --git a/chrome/browser/autocomplete/autocomplete_edit_view.h b/chrome/browser/autocomplete/autocomplete_edit_view.h index 7a410b6..021b5cd 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view.h +++ b/chrome/browser/autocomplete/autocomplete_edit_view.h @@ -1,4 +1,4 @@ -// 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. @@ -128,6 +128,9 @@ class AutocompleteEditView { // Returns the gfx::NativeView of the edit view. virtual gfx::NativeView GetNativeView() const = 0; + + protected: + virtual ~AutocompleteEditView() {} }; #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_H_ diff --git a/chrome/browser/autocomplete/autocomplete_popup_view.h b/chrome/browser/autocomplete/autocomplete_popup_view.h index 57670c5..f030a9b 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_view.h +++ b/chrome/browser/autocomplete/autocomplete_popup_view.h @@ -27,7 +27,7 @@ class Profile; class AutocompletePopupView { public: - virtual ~AutocompletePopupView() { } + virtual ~AutocompletePopupView() {} // Returns true if the popup is currently open. virtual bool IsOpen() const = 0; diff --git a/chrome/browser/blocked_popup_container.h b/chrome/browser/blocked_popup_container.h index 2d5ef6a..c3c5682 100644 --- a/chrome/browser/blocked_popup_container.h +++ b/chrome/browser/blocked_popup_container.h @@ -52,6 +52,8 @@ class BlockedPopupContainerView { // Called by the BlockedPopupContainer that owns us. Destroys the view or // starts a delayed Task to destroy the View at some later time. virtual void Destroy() = 0; + + virtual ~BlockedPopupContainerView() {} }; // Takes ownership of TabContents that are unrequested popup windows and @@ -160,7 +162,7 @@ class BlockedPopupContainer : public TabContentsDelegate, // Ignored; BlockedPopupContainer doesn't display a throbber. virtual void NavigationStateChanged(const TabContents* source, - unsigned changed_flags) { } + unsigned changed_flags) {} // Forwards AddNewContents to our |owner_|. virtual void AddNewContents(TabContents* source, @@ -170,10 +172,10 @@ class BlockedPopupContainer : public TabContentsDelegate, bool user_gesture); // Ignore activation requests from the TabContents we're blocking. - virtual void ActivateContents(TabContents* contents) { } + virtual void ActivateContents(TabContents* contents) {} // Ignored; BlockedPopupContainer doesn't display a throbber. - virtual void LoadingStateChanged(TabContents* source) { } + virtual void LoadingStateChanged(TabContents* source) {} // Removes |source| from our internal list of blocked popups. virtual void CloseContents(TabContents* source); @@ -188,13 +190,13 @@ class BlockedPopupContainer : public TabContentsDelegate, virtual TabContents* GetConstrainingContents(TabContents* source); // Ignored; BlockedPopupContainer doesn't display a toolbar. - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) { } + virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} // Ignored; BlockedPopupContainer doesn't display a bookmarking star. - virtual void URLStarredChanged(TabContents* source, bool starred) { } + virtual void URLStarredChanged(TabContents* source, bool starred) {} // Ignored; BlockedPopupContainer doesn't display a URL bar. - virtual void UpdateTargetURL(TabContents* source, const GURL& url) { } + virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} // A number larger than the internal popup count on the Renderer; meant for // preventing a compromised renderer from exhausting GDI memory by spawning diff --git a/chrome/browser/bookmarks/bookmark_model_observer.h b/chrome/browser/bookmarks/bookmark_model_observer.h index 1b85fe3..e850cb3 100644 --- a/chrome/browser/bookmarks/bookmark_model_observer.h +++ b/chrome/browser/bookmarks/bookmark_model_observer.h @@ -15,7 +15,7 @@ class BookmarkModelObserver { virtual void Loaded(BookmarkModel* model) = 0; // Invoked from the destructor of the BookmarkModel. - virtual void BookmarkModelBeingDeleted(BookmarkModel* model) { } + virtual void BookmarkModelBeingDeleted(BookmarkModel* model) {} // Invoked when a node has moved. virtual void BookmarkNodeMoved(BookmarkModel* model, @@ -51,6 +51,9 @@ class BookmarkModelObserver { // |node| have been reordered in some way, such as sorted. virtual void BookmarkNodeChildrenReordered(BookmarkModel* model, const BookmarkNode* node) = 0; + + protected: + virtual ~BookmarkModelObserver() {} }; #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_OBSERVER_H_ diff --git a/chrome/browser/bookmarks/bookmark_service.h b/chrome/browser/bookmarks/bookmark_service.h index 2de91cf..baa898b 100644 --- a/chrome/browser/bookmarks/bookmark_service.h +++ b/chrome/browser/bookmarks/bookmark_service.h @@ -1,4 +1,4 @@ -// Copyright 2008, Google Inc. +// Copyright 2009, The Chromium Authors // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -56,6 +56,9 @@ class BookmarkService { // Blocks until loaded. This is intended for usage on a thread other than // the main thread. virtual void BlockTillLoaded() = 0; + + protected: + virtual ~BookmarkService() {} }; #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_SERVICE_H_ diff --git a/chrome/browser/browser_list.h b/chrome/browser/browser_list.h index a1e1d5d..8dbe0bd 100644 --- a/chrome/browser/browser_list.h +++ b/chrome/browser/browser_list.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_BROWSER_LIST_H__ -#define CHROME_BROWSER_BROWSER_LIST_H__ +#ifndef CHROME_BROWSER_BROWSER_LIST_H_ +#define CHROME_BROWSER_BROWSER_LIST_H_ #include <vector> @@ -28,7 +28,10 @@ class BrowserList { virtual void OnBrowserRemoving(const Browser* browser) = 0; // Called immediately after a browser is set active (SetLastActive) - virtual void OnBrowserSetLastActive(const Browser* browser) { } + virtual void OnBrowserSetLastActive(const Browser* browser) {} + + protected: + virtual ~Observer() {} }; // Adds and removes browsers from the global list. The browser object should @@ -199,4 +202,4 @@ class TabContentsIterator { TabContents* cur_; }; -#endif // CHROME_BROWSER_BROWSER_LIST_H__ +#endif // CHROME_BROWSER_BROWSER_LIST_H_ diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h index 320c7d3..8fccfe0 100644 --- a/chrome/browser/browsing_data_remover.h +++ b/chrome/browser/browsing_data_remover.h @@ -1,4 +1,4 @@ -// 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. @@ -41,6 +41,9 @@ class BrowsingDataRemover : public NotificationObserver { class Observer { public: virtual void OnBrowsingDataRemoverDone() = 0; + + protected: + virtual ~Observer() {} }; // Creates a BrowsingDataRemover to remove browser data from the specified diff --git a/chrome/browser/command_updater.h b/chrome/browser/command_updater.h index ebe271e..1ef1ee6 100644 --- a/chrome/browser/command_updater.h +++ b/chrome/browser/command_updater.h @@ -1,4 +1,4 @@ -// 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. @@ -24,6 +24,9 @@ class CommandUpdater { public: // Perform the action associated with the command with the specified ID. virtual void ExecuteCommand(int id) = 0; + + protected: + virtual ~CommandUpdaterDelegate() {} }; // Create a CommandUpdater with a CommandUpdaterDelegate to handle execution @@ -50,6 +53,9 @@ class CommandUpdater { // Notifies the observer that the enabled state has changed for the // specified command id. virtual void EnabledStateChangedForCommand(int id, bool enabled) = 0; + + protected: + virtual ~CommandObserver() {} }; // Adds an observer to the state of a particular command. If the command does diff --git a/chrome/browser/dock_info.h b/chrome/browser/dock_info.h index bc02612..043abd7 100644 --- a/chrome/browser/dock_info.h +++ b/chrome/browser/dock_info.h @@ -1,4 +1,4 @@ -// 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. @@ -32,6 +32,9 @@ class DockInfo { virtual gfx::NativeWindow GetLocalProcessWindowAtPoint( const gfx::Point& screen_point, const std::set<gfx::NativeView>& ignore) = 0; + + protected: + virtual ~Factory() {} }; // Possible dock positions. diff --git a/chrome/browser/download/download_manager.h b/chrome/browser/download/download_manager.h index 042c427..81588ee 100644 --- a/chrome/browser/download/download_manager.h +++ b/chrome/browser/download/download_manager.h @@ -97,6 +97,9 @@ class DownloadItem { // Called when a downloaded file has been opened. virtual void OnDownloadOpened(DownloadItem* download) = 0; + + protected: + virtual ~Observer() {} }; // Constructing from persistent store: @@ -326,6 +329,9 @@ class DownloadManager : public base::RefCountedThreadSafe<DownloadManager>, // downloads. The DownloadManagerObserver must copy the vector, but does not // own the individual DownloadItems, when this call is made. virtual void SetDownloads(std::vector<DownloadItem*>& downloads) = 0; + + protected: + virtual ~Observer() {} }; // Public API diff --git a/chrome/browser/download/download_request_manager.h b/chrome/browser/download/download_request_manager.h index 270f539..cea0536 100644 --- a/chrome/browser/download/download_request_manager.h +++ b/chrome/browser/download/download_request_manager.h @@ -1,4 +1,4 @@ -// 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. @@ -57,6 +57,9 @@ class DownloadRequestManager virtual void ContinueDownload() = 0; virtual void CancelDownload() = 0; virtual int GetRequestId() = 0; + + protected: + virtual ~Callback() {} }; // TabDownloadState maintains the download state for a particular tab. @@ -74,7 +77,7 @@ class DownloadRequestManager TabDownloadState(DownloadRequestManager* host, NavigationController* controller, NavigationController* originating_controller); - ~TabDownloadState(); + virtual ~TabDownloadState(); // Status of the download. void set_download_status(DownloadRequestManager::DownloadStatus status) { @@ -179,6 +182,9 @@ class DownloadRequestManager class TestingDelegate { public: virtual bool ShouldAllowDownload() = 0; + + protected: + virtual ~TestingDelegate() {} }; static void SetTestingDelegate(TestingDelegate* delegate); diff --git a/chrome/browser/extensions/extension_function_dispatcher.h b/chrome/browser/extensions/extension_function_dispatcher.h index b35c069..38376e7 100644 --- a/chrome/browser/extensions/extension_function_dispatcher.h +++ b/chrome/browser/extensions/extension_function_dispatcher.h @@ -42,6 +42,9 @@ class ExtensionFunctionDispatcher { virtual ExtensionHost* GetExtensionHost() { return NULL; } virtual ExtensionDOMUI* GetExtensionDOMUI() { return NULL; } + + protected: + virtual ~Delegate() {} }; // The peer object allows us to notify ExtensionFunctions when we are diff --git a/chrome/browser/extensions/extension_shelf_model.h b/chrome/browser/extensions/extension_shelf_model.h index 67de937..934ec3b 100644 --- a/chrome/browser/extensions/extension_shelf_model.h +++ b/chrome/browser/extensions/extension_shelf_model.h @@ -158,6 +158,9 @@ class ExtensionShelfModelObserver { // The model is being destroyed. virtual void ShelfModelDeleting() {} + + protected: + virtual ~ExtensionShelfModelObserver() {} }; diff --git a/chrome/browser/extensions/external_extension_provider.h b/chrome/browser/extensions/external_extension_provider.h index f431bfc..ffbb654 100644 --- a/chrome/browser/extensions/external_extension_provider.h +++ b/chrome/browser/extensions/external_extension_provider.h @@ -27,6 +27,9 @@ class ExternalExtensionProvider { const Version* version, const FilePath& path, Extension::Location location) = 0; + + protected: + virtual ~Visitor() {} }; virtual ~ExternalExtensionProvider() {} diff --git a/chrome/browser/gtk/constrained_window_gtk.h b/chrome/browser/gtk/constrained_window_gtk.h index 91fa9ac..f3ad8ec 100644 --- a/chrome/browser/gtk/constrained_window_gtk.h +++ b/chrome/browser/gtk/constrained_window_gtk.h @@ -22,6 +22,9 @@ class ConstrainedWindowGtkDelegate { // Tells the delegate to either delete itself or set up a task to delete // itself later. virtual void DeleteDelegate() = 0; + + protected: + virtual ~ConstrainedWindowGtkDelegate() {} }; // Constrained window implementation for the GTK port. Unlike the Win32 system, diff --git a/chrome/browser/gtk/info_bubble_gtk.h b/chrome/browser/gtk/info_bubble_gtk.h index 0d882ee..dd9c178 100644 --- a/chrome/browser/gtk/info_bubble_gtk.h +++ b/chrome/browser/gtk/info_bubble_gtk.h @@ -35,6 +35,9 @@ class InfoBubbleGtkDelegate { // NOTE: The Views interface has CloseOnEscape, except I can't find a place // where it ever returns false, so we always allow you to close via escape. + + protected: + virtual ~InfoBubbleGtkDelegate() {} }; class InfoBubbleGtk : public NotificationObserver { diff --git a/chrome/browser/gtk/slide_animator_gtk.h b/chrome/browser/gtk/slide_animator_gtk.h index 9e53ba8..d41f130 100644 --- a/chrome/browser/gtk/slide_animator_gtk.h +++ b/chrome/browser/gtk/slide_animator_gtk.h @@ -28,6 +28,9 @@ class SlideAnimatorGtk : public AnimationDelegate { public: // Called when a call to Close() finishes animating. virtual void Closed() = 0; + + protected: + virtual ~Delegate() {} }; enum Direction { diff --git a/chrome/browser/gtk/tabs/tab_gtk.h b/chrome/browser/gtk/tabs/tab_gtk.h index 75a7945..a82742f 100644 --- a/chrome/browser/gtk/tabs/tab_gtk.h +++ b/chrome/browser/gtk/tabs/tab_gtk.h @@ -73,6 +73,9 @@ class TabGtk : public TabRendererGtk, // Returns the theme provider for icons and colors. virtual ThemeProvider* GetThemeProvider() = 0; + + protected: + ~TabDelegate() {} }; explicit TabGtk(TabDelegate* delegate); diff --git a/chrome/browser/gtk/view_id_util.h b/chrome/browser/gtk/view_id_util.h index 23e67a6..2640d15 100644 --- a/chrome/browser/gtk/view_id_util.h +++ b/chrome/browser/gtk/view_id_util.h @@ -15,6 +15,9 @@ class ViewIDUtil { class Delegate { public: virtual GtkWidget* GetWidgetForViewID(ViewID id) = 0; + + protected: + virtual ~Delegate() {} }; // If you set the ID via this function, it will also set the name of your 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_ diff --git a/chrome/browser/icon_loader.h b/chrome/browser/icon_loader.h index a88b268..a954274 100644 --- a/chrome/browser/icon_loader.h +++ b/chrome/browser/icon_loader.h @@ -43,6 +43,9 @@ class IconLoader : public base::RefCountedThreadSafe<IconLoader> { // icon has been successfully loaded, result is non-null. This method must // return true if it is taking ownership of the returned bitmap. virtual bool OnBitmapLoaded(IconLoader* source, SkBitmap* result) = 0; + + protected: + virtual ~Delegate() {} }; IconLoader(const IconGroupID& group, IconSize size, Delegate* delegate); diff --git a/chrome/browser/importer/firefox_importer_utils.cc b/chrome/browser/importer/firefox_importer_utils.cc index 28a9365..624a4e9 100644 --- a/chrome/browser/importer/firefox_importer_utils.cc +++ b/chrome/browser/importer/firefox_importer_utils.cc @@ -21,8 +21,8 @@ namespace { // the search URL when importing search engines. class FirefoxURLParameterFilter : public TemplateURLParser::ParameterFilter { public: - FirefoxURLParameterFilter() { } - ~FirefoxURLParameterFilter() { } + FirefoxURLParameterFilter() {} + virtual ~FirefoxURLParameterFilter() {} // TemplateURLParser::ParameterFilter method. virtual bool KeepParameter(const std::string& key, diff --git a/chrome/browser/input_window_dialog.h b/chrome/browser/input_window_dialog.h index c95869e..182f7fb 100644 --- a/chrome/browser/input_window_dialog.h +++ b/chrome/browser/input_window_dialog.h @@ -43,6 +43,7 @@ class InputWindowDialog { protected: InputWindowDialog() {} + virtual ~InputWindowDialog() {} private: DISALLOW_COPY_AND_ASSIGN(InputWindowDialog); 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_ diff --git a/chrome/browser/login_model.h b/chrome/browser/login_model.h index cbd2fef..22c50c5 100644 --- a/chrome/browser/login_model.h +++ b/chrome/browser/login_model.h @@ -15,6 +15,9 @@ class LoginModelObserver { // as a match for the pending login prompt. virtual void OnAutofillDataAvailable(const std::wstring& username, const std::wstring& password) = 0; + + protected: + virtual ~LoginModelObserver() {} }; class LoginModel { @@ -23,6 +26,9 @@ class LoginModel { // observer can be null, signifying there is no longer any observer // interested in the data. virtual void SetObserver(LoginModelObserver* observer) = 0; + + protected: + virtual ~LoginModel() {} }; #endif // CHROME_BROWSER_LOGIN_MODEL_H_ diff --git a/chrome/browser/login_prompt.h b/chrome/browser/login_prompt.h index 9cfa264..9f610a7 100644 --- a/chrome/browser/login_prompt.h +++ b/chrome/browser/login_prompt.h @@ -1,4 +1,4 @@ -// 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. @@ -63,6 +63,9 @@ class LoginHandler { // Notify the handler that the request was cancelled. // This function can only be called from the IO thread. virtual void OnRequestCancelled() = 0; + + protected: + virtual ~LoginHandler() {} }; // Details to provide the NotificationObserver. Used by the automation proxy |