diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 00:31:36 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 00:31:36 +0000 |
commit | b1f498e33399652b128d9801ad7d96bbeee4ba87 (patch) | |
tree | c6ebb70ec1495990f9f3cd028717b0742b9f4614 /chrome/browser/automation | |
parent | 666b8f577de314cfe3b232345063248878b0150e (diff) | |
download | chromium_src-b1f498e33399652b128d9801ad7d96bbeee4ba87.zip chromium_src-b1f498e33399652b128d9801ad7d96bbeee4ba87.tar.gz chromium_src-b1f498e33399652b128d9801ad7d96bbeee4ba87.tar.bz2 |
Fifth patch in making destructors of refcounted objects private.
BUG=26749
Review URL: http://codereview.chromium.org/361025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31175 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r-- | chrome/browser/automation/automation_provider.h | 8 | ||||
-rw-r--r-- | chrome/browser/automation/ui_controls_win.cc | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index dc540da..418c804 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -56,7 +56,6 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>, public IPC::Message::Sender { public: explicit AutomationProvider(Profile* profile); - virtual ~AutomationProvider(); Profile* profile() const { return profile_; } @@ -131,6 +130,10 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>, // Adds the external tab passed in to the tab tracker. bool AddExternalTab(ExternalTabContainer* external_tab); + protected: + friend class base::RefCounted<AutomationProvider>; + virtual ~AutomationProvider(); + private: // IPC Message callbacks. void CloseBrowser(int handle, IPC::Message* reply_message); @@ -567,7 +570,6 @@ class TestingAutomationProvider : public AutomationProvider, public NotificationObserver { public: explicit TestingAutomationProvider(Profile* profile); - virtual ~TestingAutomationProvider(); // BrowserList::Observer implementation // Called immediately after a browser is added to the list @@ -580,6 +582,8 @@ class TestingAutomationProvider : public AutomationProvider, virtual void OnChannelError(); private: + virtual ~TestingAutomationProvider(); + virtual void Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details); diff --git a/chrome/browser/automation/ui_controls_win.cc b/chrome/browser/automation/ui_controls_win.cc index 29ca089..43e8b32 100644 --- a/chrome/browser/automation/ui_controls_win.cc +++ b/chrome/browser/automation/ui_controls_win.cc @@ -24,8 +24,6 @@ class InputDispatcher : public base::RefCounted<InputDispatcher> { public: InputDispatcher(Task* task, WPARAM message_waiting_for); - ~InputDispatcher(); - // Invoked from the hook. If mouse_message matches message_waiting_for_ // MatchingMessageFound is invoked. void DispatchedMessage(WPARAM mouse_message); @@ -35,6 +33,10 @@ class InputDispatcher : public base::RefCounted<InputDispatcher> { void MatchingMessageFound(); private: + friend class base::RefCounted<InputDispatcher>; + + ~InputDispatcher(); + // Notifies the task and release this (which should delete it). void NotifyTask(); |