From b1f498e33399652b128d9801ad7d96bbeee4ba87 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Fri, 6 Nov 2009 00:31:36 +0000 Subject: 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 --- chrome/browser/automation/automation_provider.h | 8 ++++++-- chrome/browser/automation/ui_controls_win.cc | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'chrome/browser/automation') 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, 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, // Adds the external tab passed in to the tab tracker. bool AddExternalTab(ExternalTabContainer* external_tab); + protected: + friend class base::RefCounted; + 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 { 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 { void MatchingMessageFound(); private: + friend class base::RefCounted; + + ~InputDispatcher(); + // Notifies the task and release this (which should delete it). void NotifyTask(); -- cgit v1.1