diff options
Diffstat (limited to 'chrome/browser')
9 files changed, 36 insertions, 26 deletions
diff --git a/chrome/browser/jankometer.cc b/chrome/browser/jankometer.cc index df1355b..9f5e2a0 100644 --- a/chrome/browser/jankometer.cc +++ b/chrome/browser/jankometer.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -221,8 +221,6 @@ class IOJankObserver : public base::RefCountedThreadSafe<IOJankObserver>, bool watchdog_enable) : helper_(thread_name, excessive_duration, watchdog_enable) {} - ~IOJankObserver() {} - // Attaches the observer to the current thread's message loop. You can only // attach to the current thread, so this function can be invoked on another // thread to attach it. @@ -262,6 +260,8 @@ class IOJankObserver : public base::RefCountedThreadSafe<IOJankObserver>, private: friend class base::RefCountedThreadSafe<IOJankObserver>; + ~IOJankObserver() {} + JankObserverHelper helper_; DISALLOW_COPY_AND_ASSIGN(IOJankObserver); diff --git a/chrome/browser/password_manager/password_store_default_unittest.cc b/chrome/browser/password_manager/password_store_default_unittest.cc index e1f3ba1..9eb297e 100644 --- a/chrome/browser/password_manager/password_store_default_unittest.cc +++ b/chrome/browser/password_manager/password_store_default_unittest.cc @@ -64,17 +64,18 @@ class DBThreadObserverHelper done_event_.Wait(); } - virtual ~DBThreadObserverHelper() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); - registrar_.RemoveAll(); - } - content::NotificationObserverMock& observer() { return observer_; } protected: - friend class base::RefCountedThreadSafe<DBThreadObserverHelper>; + friend struct BrowserThread::DeleteOnThread<BrowserThread::DB>; + friend class base::DeleteHelper<DBThreadObserverHelper>; + + virtual ~DBThreadObserverHelper() { + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); + registrar_.RemoveAll(); + } void AddObserverTask(PasswordStore* password_store) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); diff --git a/chrome/browser/password_manager/password_store_x_unittest.cc b/chrome/browser/password_manager/password_store_x_unittest.cc index e9f33a2..29ff1c7 100644 --- a/chrome/browser/password_manager/password_store_x_unittest.cc +++ b/chrome/browser/password_manager/password_store_x_unittest.cc @@ -70,17 +70,18 @@ class DBThreadObserverHelper done_event_.Wait(); } - virtual ~DBThreadObserverHelper() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); - registrar_.RemoveAll(); - } - content::NotificationObserverMock& observer() { return observer_; } protected: - friend class base::RefCountedThreadSafe<DBThreadObserverHelper>; + friend struct BrowserThread::DeleteOnThread<BrowserThread::DB>; + friend class base::DeleteHelper<DBThreadObserverHelper>; + + virtual ~DBThreadObserverHelper() { + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); + registrar_.RemoveAll(); + } void AddObserverTask(PasswordStore* password_store) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); diff --git a/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h b/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h index 1e4ded2..01de16c 100644 --- a/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h +++ b/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h @@ -85,12 +85,13 @@ class CreateWebApplicationShortcutsDialogGtk CreateWebApplicationShortcutsDialogGtk(GtkWindow* parent, TabContentsWrapper* tab_contents); - virtual ~CreateWebApplicationShortcutsDialogGtk() {} virtual void OnCreatedShortcut(void) OVERRIDE; - private: + protected: + virtual ~CreateWebApplicationShortcutsDialogGtk() {} + private: // TabContentsWrapper for which the shortcut will be created. TabContentsWrapper* tab_contents_; @@ -107,7 +108,6 @@ class CreateChromeApplicationShortcutsDialogGtk CreateChromeApplicationShortcutsDialogGtk(GtkWindow* parent, Profile* profile, const Extension* app); - virtual ~CreateChromeApplicationShortcutsDialogGtk() {} // Implement ImageLoadingTracker::Observer. |tracker_| is used to // load the app's icon. This method recieves the icon, and adds @@ -117,6 +117,8 @@ class CreateChromeApplicationShortcutsDialogGtk int index) OVERRIDE; protected: + virtual ~CreateChromeApplicationShortcutsDialogGtk() {} + virtual void CreateDesktopShortcut( const ShellIntegration::ShortcutInfo& shortcut_info) OVERRIDE; diff --git a/chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.h b/chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.h index f1b691b..c6de467 100644 --- a/chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.h +++ b/chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.h @@ -24,11 +24,12 @@ class BundleInstalledBubbleGtk // Displays an installed bubble in the |browser| for the |bundle|. BundleInstalledBubbleGtk(const extensions::BundleInstaller* bundle, Browser* browser); - virtual ~BundleInstalledBubbleGtk(); private: friend class base::RefCounted<BundleInstalledBubbleGtk>; + virtual ~BundleInstalledBubbleGtk(); + // Assembles the content area of the bubble. void ShowInternal(const extensions::BundleInstaller* bundle); diff --git a/chrome/browser/ui/gtk/select_file_dialog_impl_gtk.cc b/chrome/browser/ui/gtk/select_file_dialog_impl_gtk.cc index 27ef28c..3544eb3 100644 --- a/chrome/browser/ui/gtk/select_file_dialog_impl_gtk.cc +++ b/chrome/browser/ui/gtk/select_file_dialog_impl_gtk.cc @@ -30,6 +30,8 @@ class SelectFileDialogImplGTK : public SelectFileDialogImpl { explicit SelectFileDialogImplGTK(Listener* listener); protected: + virtual ~SelectFileDialogImplGTK(); + // SelectFileDialog implementation. // |params| is user data we pass back via the Listener interface. virtual void SelectFileImpl(Type type, @@ -42,8 +44,6 @@ class SelectFileDialogImplGTK : public SelectFileDialogImpl { void* params) OVERRIDE; private: - virtual ~SelectFileDialogImplGTK(); - virtual bool HasMultipleFileTypeChoicesImpl() OVERRIDE; // Add the filters from |file_types_| to |chooser|. diff --git a/chrome/browser/ui/gtk/select_file_dialog_impl_kde.cc b/chrome/browser/ui/gtk/select_file_dialog_impl_kde.cc index 548c5f9..b1c1c13 100644 --- a/chrome/browser/ui/gtk/select_file_dialog_impl_kde.cc +++ b/chrome/browser/ui/gtk/select_file_dialog_impl_kde.cc @@ -42,9 +42,10 @@ class SelectFileDialogImplKDE : public SelectFileDialogImpl { public: SelectFileDialogImplKDE(Listener* listener, base::nix::DesktopEnvironment desktop); - virtual ~SelectFileDialogImplKDE(); protected: + virtual ~SelectFileDialogImplKDE(); + // SelectFileDialog implementation. // |params| is user data we pass back via the Listener interface. virtual void SelectFileImpl(Type type, diff --git a/chrome/browser/ui/login/login_prompt_gtk.cc b/chrome/browser/ui/login/login_prompt_gtk.cc index 717c0a5..6a1d3e3 100644 --- a/chrome/browser/ui/login/login_prompt_gtk.cc +++ b/chrome/browser/ui/login/login_prompt_gtk.cc @@ -45,10 +45,6 @@ class LoginHandlerGtk : public LoginHandler, ok_(NULL) { } - virtual ~LoginHandlerGtk() { - root_.Destroy(); - } - // LoginModelObserver implementation. virtual void OnAutofillDataAvailable(const string16& username, const string16& password) { @@ -142,6 +138,11 @@ class LoginHandlerGtk : public LoginHandler, ReleaseSoon(); } + protected: + virtual ~LoginHandlerGtk() { + root_.Destroy(); + } + private: friend class LoginPrompt; diff --git a/chrome/browser/ui/webui/options2/certificate_manager_handler2.cc b/chrome/browser/ui/webui/options2/certificate_manager_handler2.cc index 5129a21..af91ea5 100644 --- a/chrome/browser/ui/webui/options2/certificate_manager_handler2.cc +++ b/chrome/browser/ui/webui/options2/certificate_manager_handler2.cc @@ -174,6 +174,9 @@ class FileAccessProvider const WriteCallback& callback); private: + friend class base::RefCountedThreadSafe<FileAccessProvider>; + virtual ~FileAccessProvider() {} + void DoRead(scoped_refptr<CancelableRequest<ReadCallback> > request, FilePath path); void DoWrite(scoped_refptr<CancelableRequest<WriteCallback> > request, |