summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/message_pump_glib.cc14
-rw-r--r--base/message_pump_glib.h5
-rw-r--r--base/message_pump_gtk.cc12
-rw-r--r--base/message_pump_gtk.h6
-rw-r--r--base/message_pump_x.cc48
-rw-r--r--base/message_pump_x.h4
-rw-r--r--chrome/browser/jankometer.cc6
-rw-r--r--chrome/browser/password_manager/password_store_default_unittest.cc13
-rw-r--r--chrome/browser/password_manager/password_store_x_unittest.cc13
-rw-r--r--chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h8
-rw-r--r--chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.h3
-rw-r--r--chrome/browser/ui/gtk/select_file_dialog_impl_gtk.cc4
-rw-r--r--chrome/browser/ui/gtk/select_file_dialog_impl_kde.cc3
-rw-r--r--chrome/browser/ui/login/login_prompt_gtk.cc9
-rw-r--r--chrome/browser/ui/webui/options2/certificate_manager_handler2.cc3
-rw-r--r--chrome/renderer/pepper/ppb_pdf_impl.cc5
-rw-r--r--content/browser/power_save_blocker_linux.cc15
-rw-r--r--dbus/mock_bus.h4
-rw-r--r--dbus/mock_exported_object.h4
-rw-r--r--dbus/mock_object_proxy.h4
-rw-r--r--gpu/command_buffer/service/gl_surface_mock.h4
-rw-r--r--media/base/stream_parser_buffer.h1
-rw-r--r--media/tools/player_x11/data_source_logger.cc4
-rw-r--r--media/tools/player_x11/data_source_logger.h4
-rw-r--r--net/curvecp/server_packetizer.cc7
-rw-r--r--net/curvecp/server_packetizer.h7
-rw-r--r--remoting/host/policy_hack/nat_policy_linux.cc3
-rw-r--r--ui/gl/gl_context_egl.cc26
-rw-r--r--ui/gl/gl_context_egl.h4
-rw-r--r--ui/gl/gl_context_glx.cc8
-rw-r--r--ui/gl/gl_context_glx.h4
-rw-r--r--ui/gl/gl_surface_egl.cc24
-rw-r--r--ui/gl/gl_surface_egl.h9
-rw-r--r--ui/gl/gl_surface_glx.cc34
-rw-r--r--ui/gl/gl_surface_glx.h10
-rw-r--r--ui/gl/gl_surface_linux.cc12
36 files changed, 197 insertions, 147 deletions
diff --git a/base/message_pump_glib.cc b/base/message_pump_glib.cc
index 07db124..fb318b7 100644
--- a/base/message_pump_glib.cc
+++ b/base/message_pump_glib.cc
@@ -161,13 +161,6 @@ MessagePumpGlib::MessagePumpGlib()
g_source_attach(work_source_, context_);
}
-MessagePumpGlib::~MessagePumpGlib() {
- g_source_destroy(work_source_);
- g_source_unref(work_source_);
- close(wakeup_pipe_read_);
- close(wakeup_pipe_write_);
-}
-
void MessagePumpGlib::RunWithDispatcher(Delegate* delegate,
MessagePumpDispatcher* dispatcher) {
#ifndef NDEBUG
@@ -323,6 +316,13 @@ void MessagePumpGlib::ScheduleDelayedWork(const TimeTicks& delayed_work_time) {
ScheduleWork();
}
+MessagePumpGlib::~MessagePumpGlib() {
+ g_source_destroy(work_source_);
+ g_source_unref(work_source_);
+ close(wakeup_pipe_read_);
+ close(wakeup_pipe_write_);
+}
+
MessagePumpDispatcher* MessagePumpGlib::GetDispatcher() {
return state_ ? state_->dispatcher : NULL;
}
diff --git a/base/message_pump_glib.h b/base/message_pump_glib.h
index f2b6616..9991a79 100644
--- a/base/message_pump_glib.h
+++ b/base/message_pump_glib.h
@@ -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.
@@ -35,7 +35,6 @@ class MessagePumpDispatcher;
class MessagePumpGlib : public MessagePump {
public:
MessagePumpGlib();
- virtual ~MessagePumpGlib();
// Like MessagePump::Run, but events are routed through dispatcher.
virtual void RunWithDispatcher(Delegate* delegate,
@@ -65,6 +64,8 @@ class MessagePumpGlib : public MessagePump {
virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE;
protected:
+ virtual ~MessagePumpGlib();
+
// Returns the dispatcher for the current run state (|state_->dispatcher|).
MessagePumpDispatcher* GetDispatcher();
diff --git a/base/message_pump_gtk.cc b/base/message_pump_gtk.cc
index d56922f..780b4d8 100644
--- a/base/message_pump_gtk.cc
+++ b/base/message_pump_gtk.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.
@@ -65,11 +65,6 @@ MessagePumpGtk::MessagePumpGtk() : MessagePumpGlib() {
gdk_event_handler_set(&EventDispatcher, this, NULL);
}
-MessagePumpGtk::~MessagePumpGtk() {
- gdk_event_handler_set(reinterpret_cast<GdkEventFunc>(gtk_main_do_event),
- this, NULL);
-}
-
void MessagePumpGtk::DispatchEvents(GdkEvent* event) {
UNSHIPPED_TRACE_EVENT1("task", "MessagePumpGtk::DispatchEvents",
"type", EventToTypeString(event));
@@ -97,6 +92,11 @@ Display* MessagePumpGtk::GetDefaultXDisplay() {
return GDK_DISPLAY_XDISPLAY(display);
}
+MessagePumpGtk::~MessagePumpGtk() {
+ gdk_event_handler_set(reinterpret_cast<GdkEventFunc>(gtk_main_do_event),
+ this, NULL);
+}
+
void MessagePumpGtk::WillProcessEvent(GdkEvent* event) {
FOR_EACH_OBSERVER(MessagePumpObserver, observers(), WillProcessEvent(event));
}
diff --git a/base/message_pump_gtk.h b/base/message_pump_gtk.h
index ea1630f0..e60eeaf 100644
--- a/base/message_pump_gtk.h
+++ b/base/message_pump_gtk.h
@@ -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.
@@ -44,7 +44,6 @@ class MessagePumpDispatcher {
class BASE_EXPORT MessagePumpGtk : public MessagePumpGlib {
public:
MessagePumpGtk();
- virtual ~MessagePumpGtk();
// Dispatch an available GdkEvent. Essentially this allows a subclass to do
// some task before/after calling the default handler (EventDispatcher).
@@ -53,6 +52,9 @@ class BASE_EXPORT MessagePumpGtk : public MessagePumpGlib {
// Returns default X Display.
static Display* GetDefaultXDisplay();
+ protected:
+ virtual ~MessagePumpGtk();
+
private:
// Invoked from EventDispatcher. Notifies all observers we're about to
// process an event.
diff --git a/base/message_pump_x.cc b/base/message_pump_x.cc
index 67e0b6c..b16cf35 100644
--- a/base/message_pump_x.cc
+++ b/base/message_pump_x.cc
@@ -93,13 +93,6 @@ MessagePumpX::MessagePumpX() : MessagePumpGlib(),
InitXSource();
}
-MessagePumpX::~MessagePumpX() {
- g_source_destroy(x_source_);
- g_source_unref(x_source_);
- XCloseDisplay(g_xdisplay);
- g_xdisplay = NULL;
-}
-
// static
Display* MessagePumpX::GetDefaultXDisplay() {
if (!g_xdisplay)
@@ -118,6 +111,30 @@ void MessagePumpX::SetDefaultDispatcher(MessagePumpDispatcher* dispatcher) {
g_default_dispatcher = dispatcher;
}
+gboolean MessagePumpX::DispatchXEvents() {
+ Display* display = GetDefaultXDisplay();
+ DCHECK(display);
+ MessagePumpDispatcher* dispatcher =
+ GetDispatcher() ? GetDispatcher() : g_default_dispatcher;
+
+ // In the general case, we want to handle all pending events before running
+ // the tasks. This is what happens in the message_pump_glib case.
+ while (XPending(display)) {
+ XEvent xev;
+ XNextEvent(display, &xev);
+ if (dispatcher && ProcessXEvent(dispatcher, &xev))
+ return TRUE;
+ }
+ return TRUE;
+}
+
+MessagePumpX::~MessagePumpX() {
+ g_source_destroy(x_source_);
+ g_source_unref(x_source_);
+ XCloseDisplay(g_xdisplay);
+ g_xdisplay = NULL;
+}
+
void MessagePumpX::InitXSource() {
// CHECKs are to help track down crbug.com/113106.
CHECK(!x_source_);
@@ -160,23 +177,6 @@ bool MessagePumpX::ProcessXEvent(MessagePumpDispatcher* dispatcher,
return should_quit;
}
-gboolean MessagePumpX::DispatchXEvents() {
- Display* display = GetDefaultXDisplay();
- DCHECK(display);
- MessagePumpDispatcher* dispatcher =
- GetDispatcher() ? GetDispatcher() : g_default_dispatcher;
-
- // In the general case, we want to handle all pending events before running
- // the tasks. This is what happens in the message_pump_glib case.
- while (XPending(display)) {
- XEvent xev;
- XNextEvent(display, &xev);
- if (dispatcher && ProcessXEvent(dispatcher, &xev))
- return TRUE;
- }
- return TRUE;
-}
-
bool MessagePumpX::WillProcessXEvent(XEvent* xevent) {
if (!observers().might_have_observers())
return false;
diff --git a/base/message_pump_x.h b/base/message_pump_x.h
index 85f7c8d..c9cfda8 100644
--- a/base/message_pump_x.h
+++ b/base/message_pump_x.h
@@ -23,7 +23,6 @@ namespace base {
class BASE_EXPORT MessagePumpX : public MessagePumpGlib {
public:
MessagePumpX();
- virtual ~MessagePumpX();
// Returns default X Display.
static Display* GetDefaultXDisplay();
@@ -38,6 +37,9 @@ class BASE_EXPORT MessagePumpX : public MessagePumpGlib {
// all available X events.
gboolean DispatchXEvents();
+ protected:
+ virtual ~MessagePumpX();
+
private:
// Initializes the glib event source for X.
void InitXSource();
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,
diff --git a/chrome/renderer/pepper/ppb_pdf_impl.cc b/chrome/renderer/pepper/ppb_pdf_impl.cc
index f99f4ff..ff3baea 100644
--- a/chrome/renderer/pepper/ppb_pdf_impl.cc
+++ b/chrome/renderer/pepper/ppb_pdf_impl.cc
@@ -50,8 +50,6 @@ class PrivateFontFile : public ppapi::Resource {
: Resource(ppapi::OBJECT_IS_IMPL, instance),
fd_(fd) {
}
- virtual ~PrivateFontFile() {
- }
bool GetFontTable(uint32_t table,
void* output,
@@ -63,6 +61,9 @@ class PrivateFontFile : public ppapi::Resource {
return rv;
}
+ protected:
+ virtual ~PrivateFontFile() {}
+
private:
int fd_;
};
diff --git a/content/browser/power_save_blocker_linux.cc b/content/browser/power_save_blocker_linux.cc
index 3d232da..b0c3ae0 100644
--- a/content/browser/power_save_blocker_linux.cc
+++ b/content/browser/power_save_blocker_linux.cc
@@ -71,9 +71,14 @@ class DBusPowerSaveBlocker {
class Delegate : public base::RefCountedThreadSafe<Delegate> {
public:
Delegate() {}
- virtual ~Delegate() {}
virtual void ApplyBlock(PowerSaveBlocker::PowerSaveBlockerType type) = 0;
+
+ protected:
+ virtual ~Delegate() {}
+
private:
+ friend class base::RefCountedThreadSafe<Delegate>;
+
DISALLOW_COPY_AND_ASSIGN(Delegate);
};
@@ -120,7 +125,6 @@ class KDEPowerSaveBlocker : public DBusPowerSaveBlocker::Delegate {
pending_inhibit_call_(false),
postponed_uninhibit_call_(false) {
}
- ~KDEPowerSaveBlocker() {}
virtual void ApplyBlock(
PowerSaveBlocker::PowerSaveBlockerType type) OVERRIDE {
@@ -195,6 +199,9 @@ class KDEPowerSaveBlocker : public DBusPowerSaveBlocker::Delegate {
bus_callback);
}
+ protected:
+ virtual ~KDEPowerSaveBlocker() {}
+
private:
// Inhibit() response callback.
// Stores the cookie so we can use it later when calling UnInhibit().
@@ -258,7 +265,6 @@ class GnomePowerSaveBlocker : public DBusPowerSaveBlocker::Delegate {
: inhibit_cookie_(0),
pending_inhibit_calls_(0),
postponed_uninhibit_calls_(0) {}
- ~GnomePowerSaveBlocker() {}
virtual void ApplyBlock(
PowerSaveBlocker::PowerSaveBlockerType type) OVERRIDE {
@@ -368,6 +374,9 @@ class GnomePowerSaveBlocker : public DBusPowerSaveBlocker::Delegate {
bus_callback);
}
+ protected:
+ virtual ~GnomePowerSaveBlocker() {}
+
private:
// Inhibit() response callback.
// Stores the cookie so we can use it later when calling UnInhibit().
diff --git a/dbus/mock_bus.h b/dbus/mock_bus.h
index bc25fb6..6a228a6 100644
--- a/dbus/mock_bus.h
+++ b/dbus/mock_bus.h
@@ -18,7 +18,6 @@ namespace dbus {
class MockBus : public Bus {
public:
MockBus(Bus::Options& options);
- virtual ~MockBus();
MOCK_METHOD2(GetObjectProxy, ObjectProxy*(const std::string& service_name,
const ObjectPath& object_path));
@@ -71,6 +70,9 @@ class MockBus : public Bus {
MOCK_METHOD0(HasDBusThread, bool());
MOCK_METHOD0(AssertOnOriginThread, void());
MOCK_METHOD0(AssertOnDBusThread, void());
+
+ protected:
+ virtual ~MockBus();
};
} // namespace dbus
diff --git a/dbus/mock_exported_object.h b/dbus/mock_exported_object.h
index 07b2f00..e57a83a 100644
--- a/dbus/mock_exported_object.h
+++ b/dbus/mock_exported_object.h
@@ -19,7 +19,6 @@ class MockExportedObject : public ExportedObject {
public:
MockExportedObject(Bus* bus,
const ObjectPath& object_path);
- virtual ~MockExportedObject();
MOCK_METHOD3(ExportMethodAndBlock,
bool(const std::string& interface_name,
@@ -32,6 +31,9 @@ class MockExportedObject : public ExportedObject {
OnExportedCallback on_exported_callback));
MOCK_METHOD1(SendSignal, void(Signal* signal));
MOCK_METHOD0(Unregister, void());
+
+ protected:
+ virtual ~MockExportedObject();
};
} // namespace dbus
diff --git a/dbus/mock_object_proxy.h b/dbus/mock_object_proxy.h
index ff0dcff..1383232 100644
--- a/dbus/mock_object_proxy.h
+++ b/dbus/mock_object_proxy.h
@@ -20,7 +20,6 @@ class MockObjectProxy : public ObjectProxy {
MockObjectProxy(Bus* bus,
const std::string& service_name,
const ObjectPath& object_path);
- virtual ~MockObjectProxy();
MOCK_METHOD2(CallMethodAndBlock, Response*(MethodCall* method_call,
int timeout_ms));
@@ -37,6 +36,9 @@ class MockObjectProxy : public ObjectProxy {
SignalCallback signal_callback,
OnConnectedCallback on_connected_callback));
MOCK_METHOD0(Detach, void());
+
+ protected:
+ virtual ~MockObjectProxy();
};
} // namespace dbus
diff --git a/gpu/command_buffer/service/gl_surface_mock.h b/gpu/command_buffer/service/gl_surface_mock.h
index 791e946..f3ab342c 100644
--- a/gpu/command_buffer/service/gl_surface_mock.h
+++ b/gpu/command_buffer/service/gl_surface_mock.h
@@ -14,7 +14,6 @@ namespace gpu {
class GLSurfaceMock : public gfx::GLSurface {
public:
GLSurfaceMock();
- virtual ~GLSurfaceMock();
MOCK_METHOD0(Initialize, bool());
MOCK_METHOD0(Destroy, void());
@@ -34,6 +33,9 @@ class GLSurfaceMock : public gfx::GLSurface {
MOCK_METHOD0(GetConfig, void*());
MOCK_METHOD0(GetFormat, unsigned());
+ protected:
+ virtual ~GLSurfaceMock();
+
private:
DISALLOW_COPY_AND_ASSIGN(GLSurfaceMock);
};
diff --git a/media/base/stream_parser_buffer.h b/media/base/stream_parser_buffer.h
index 1122e91..fb36213 100644
--- a/media/base/stream_parser_buffer.h
+++ b/media/base/stream_parser_buffer.h
@@ -22,6 +22,7 @@ class MEDIA_EXPORT StreamParserBuffer : public DataBuffer {
private:
StreamParserBuffer(const uint8* data, int data_size, bool is_keyframe);
+ virtual ~StreamParserBuffer() {}
bool is_keyframe_;
DISALLOW_COPY_AND_ASSIGN(StreamParserBuffer);
diff --git a/media/tools/player_x11/data_source_logger.cc b/media/tools/player_x11/data_source_logger.cc
index 03c0a3d..8a6c29e 100644
--- a/media/tools/player_x11/data_source_logger.cc
+++ b/media/tools/player_x11/data_source_logger.cc
@@ -25,8 +25,6 @@ DataSourceLogger::DataSourceLogger(
streaming_(streaming) {
}
-DataSourceLogger::~DataSourceLogger() {}
-
void DataSourceLogger::set_host(media::DataSourceHost* host) {
VLOG(1) << "set_host(" << host << ")";
data_source_->set_host(host);
@@ -67,3 +65,5 @@ void DataSourceLogger::SetBitrate(int bitrate) {
VLOG(1) << "SetBitrate(" << bitrate << ")";
data_source_->SetBitrate(bitrate);
}
+
+DataSourceLogger::~DataSourceLogger() {}
diff --git a/media/tools/player_x11/data_source_logger.h b/media/tools/player_x11/data_source_logger.h
index 8e08f0f..08e0857b 100644
--- a/media/tools/player_x11/data_source_logger.h
+++ b/media/tools/player_x11/data_source_logger.h
@@ -19,7 +19,6 @@ class DataSourceLogger : public media::DataSource {
// |data_source|.
DataSourceLogger(const scoped_refptr<DataSource>& data_source,
bool force_streaming);
- virtual ~DataSourceLogger();
// media::DataSource implementation.
virtual void set_host(media::DataSourceHost* host) OVERRIDE;
@@ -31,6 +30,9 @@ class DataSourceLogger : public media::DataSource {
virtual bool IsStreaming() OVERRIDE;
virtual void SetBitrate(int bitrate) OVERRIDE;
+ protected:
+ virtual ~DataSourceLogger();
+
private:
scoped_refptr<media::DataSource> data_source_;
bool streaming_;
diff --git a/net/curvecp/server_packetizer.cc b/net/curvecp/server_packetizer.cc
index d387933..b4c81d0 100644
--- a/net/curvecp/server_packetizer.cc
+++ b/net/curvecp/server_packetizer.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.
@@ -18,9 +18,6 @@ ServerPacketizer::ServerPacketizer()
read_buffer_(new IOBuffer(kMaxPacketLength)) {
}
-ServerPacketizer::~ServerPacketizer() {
-}
-
int ServerPacketizer::Listen(const IPEndPoint& endpoint,
Packetizer::Listener* listener) {
DCHECK(!listener_);
@@ -231,6 +228,8 @@ int ServerPacketizer::ReadPackets() {
return rv;
}
+ServerPacketizer::~ServerPacketizer() {}
+
void ServerPacketizer::OnReadComplete(int result) {
if (result > 0)
ProcessRead(result);
diff --git a/net/curvecp/server_packetizer.h b/net/curvecp/server_packetizer.h
index ba42586..f2cc994 100644
--- a/net/curvecp/server_packetizer.h
+++ b/net/curvecp/server_packetizer.h
@@ -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.
@@ -25,7 +25,6 @@ class ServerPacketizer : public base::RefCounted<ServerPacketizer>,
public Packetizer {
public:
ServerPacketizer();
- virtual ~ServerPacketizer();
// Listen for new connections from the Packetizer.
int Listen(const IPEndPoint& endpoint, Packetizer::Listener* listener);
@@ -44,6 +43,8 @@ class ServerPacketizer : public base::RefCounted<ServerPacketizer>,
virtual int max_message_payload() const OVERRIDE;
private:
+ friend class base::RefCounted<ServerPacketizer>;
+
enum State {
NONE, // The initial state, before listen.
LISTENING, // Listening for packets.
@@ -52,6 +53,8 @@ class ServerPacketizer : public base::RefCounted<ServerPacketizer>,
typedef std::map<ConnectionKey, Packetizer::Listener*> ListenerMap;
typedef std::map<ConnectionKey, IPEndPoint> ConnectionMap;
+ virtual ~ServerPacketizer();
+
// Callbacks when an internal IO is completed.
void OnReadComplete(int result);
void OnWriteComplete(int result);
diff --git a/remoting/host/policy_hack/nat_policy_linux.cc b/remoting/host/policy_hack/nat_policy_linux.cc
index eb40f4a..534fdb4 100644
--- a/remoting/host/policy_hack/nat_policy_linux.cc
+++ b/remoting/host/policy_hack/nat_policy_linux.cc
@@ -119,6 +119,9 @@ class NatPolicyLinux : public NatPolicy {
}
}
+ protected:
+ virtual ~FilePathWatcherDelegate() {}
+
private:
base::WeakPtr<NatPolicyLinux> policy_watcher_;
};
diff --git a/ui/gl/gl_context_egl.cc b/ui/gl/gl_context_egl.cc
index fa655a0..f77c9f9 100644
--- a/ui/gl/gl_context_egl.cc
+++ b/ui/gl/gl_context_egl.cc
@@ -24,15 +24,6 @@ extern "C" {
namespace gfx {
-std::string GLContextEGL::GetExtensions() {
- const char* extensions = eglQueryString(display_,
- EGL_EXTENSIONS);
- if (!extensions)
- return GLContext::GetExtensions();
-
- return GLContext::GetExtensions() + " " + extensions;
-}
-
GLContextEGL::GLContextEGL(GLShareGroup* share_group)
: GLContext(share_group),
context_(NULL),
@@ -40,10 +31,6 @@ GLContextEGL::GLContextEGL(GLShareGroup* share_group)
config_(NULL) {
}
-GLContextEGL::~GLContextEGL() {
- Destroy();
-}
-
bool GLContextEGL::Initialize(
GLSurface* compatible_surface, GpuPreference gpu_preference) {
DCHECK(compatible_surface);
@@ -157,4 +144,17 @@ void GLContextEGL::SetSwapInterval(int interval) {
}
}
+std::string GLContextEGL::GetExtensions() {
+ const char* extensions = eglQueryString(display_,
+ EGL_EXTENSIONS);
+ if (!extensions)
+ return GLContext::GetExtensions();
+
+ return GLContext::GetExtensions() + " " + extensions;
+}
+
+GLContextEGL::~GLContextEGL() {
+ Destroy();
+}
+
} // namespace gfx
diff --git a/ui/gl/gl_context_egl.h b/ui/gl/gl_context_egl.h
index 4e98da8..33e8c94 100644
--- a/ui/gl/gl_context_egl.h
+++ b/ui/gl/gl_context_egl.h
@@ -23,7 +23,6 @@ class GLSurface;
class GLContextEGL : public GLContext {
public:
explicit GLContextEGL(GLShareGroup* share_group);
- virtual ~GLContextEGL();
// Implement GLContext.
virtual bool Initialize(
@@ -36,6 +35,9 @@ class GLContextEGL : public GLContext {
virtual void SetSwapInterval(int interval) OVERRIDE;
virtual std::string GetExtensions() OVERRIDE;
+ protected:
+ virtual ~GLContextEGL();
+
private:
EGLContext context_;
EGLDisplay display_;
diff --git a/ui/gl/gl_context_glx.cc b/ui/gl/gl_context_glx.cc
index af94040..b8d13892 100644
--- a/ui/gl/gl_context_glx.cc
+++ b/ui/gl/gl_context_glx.cc
@@ -38,10 +38,6 @@ GLContextGLX::GLContextGLX(GLShareGroup* share_group)
display_(NULL) {
}
-GLContextGLX::~GLContextGLX() {
- Destroy();
-}
-
Display* GLContextGLX::display() {
return display_;
}
@@ -250,4 +246,8 @@ bool GLContextGLX::WasAllocatedUsingARBRobustness() {
return GLSurfaceGLX::IsCreateContextRobustnessSupported();
}
+GLContextGLX::~GLContextGLX() {
+ Destroy();
+}
+
} // namespace gfx
diff --git a/ui/gl/gl_context_glx.h b/ui/gl/gl_context_glx.h
index 60155df..8ddcae7 100644
--- a/ui/gl/gl_context_glx.h
+++ b/ui/gl/gl_context_glx.h
@@ -20,7 +20,6 @@ class GLSurface;
class GLContextGLX : public GLContext {
public:
explicit GLContextGLX(GLShareGroup* share_group);
- virtual ~GLContextGLX();
Display* display();
@@ -36,6 +35,9 @@ class GLContextGLX : public GLContext {
virtual std::string GetExtensions() OVERRIDE;
virtual bool WasAllocatedUsingARBRobustness() OVERRIDE;
+ protected:
+ virtual ~GLContextGLX();
+
private:
void* context_;
Display* display_;
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 4eae2b8..b35806d 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -40,11 +40,7 @@ EGLDisplay g_software_display;
EGLNativeDisplayType g_software_native_display;
}
-GLSurfaceEGL::GLSurfaceEGL() : software_(false) {
-}
-
-GLSurfaceEGL::~GLSurfaceEGL() {
-}
+GLSurfaceEGL::GLSurfaceEGL() : software_(false) {}
bool GLSurfaceEGL::InitializeOneOff() {
static bool initialized = false;
@@ -164,6 +160,8 @@ EGLNativeDisplayType GLSurfaceEGL::GetNativeDisplay() {
return g_native_display;
}
+GLSurfaceEGL::~GLSurfaceEGL() {}
+
NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(bool software,
gfx::AcceleratedWidget window)
: window_(window),
@@ -173,10 +171,6 @@ NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(bool software,
software_ = software;
}
-NativeViewGLSurfaceEGL::~NativeViewGLSurfaceEGL() {
- Destroy();
-}
-
bool NativeViewGLSurfaceEGL::Initialize() {
#if defined(OS_ANDROID)
NOTREACHED();
@@ -358,6 +352,10 @@ bool NativeViewGLSurfaceEGL::PostSubBuffer(
return true;
}
+NativeViewGLSurfaceEGL::~NativeViewGLSurfaceEGL() {
+ Destroy();
+}
+
void NativeViewGLSurfaceEGL::SetHandle(EGLSurface surface) {
surface_ = surface;
}
@@ -368,10 +366,6 @@ PbufferGLSurfaceEGL::PbufferGLSurfaceEGL(bool software, const gfx::Size& size)
software_ = software;
}
-PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() {
- Destroy();
-}
-
bool PbufferGLSurfaceEGL::Initialize() {
DCHECK(!surface_);
@@ -473,4 +467,8 @@ void* PbufferGLSurfaceEGL::GetShareHandle() {
#endif
}
+PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() {
+ Destroy();
+}
+
} // namespace gfx
diff --git a/ui/gl/gl_surface_egl.h b/ui/gl/gl_surface_egl.h
index dc6f418..bce2206 100644
--- a/ui/gl/gl_surface_egl.h
+++ b/ui/gl/gl_surface_egl.h
@@ -33,7 +33,6 @@ namespace gfx {
class GL_EXPORT GLSurfaceEGL : public GLSurface {
public:
GLSurfaceEGL();
- virtual ~GLSurfaceEGL();
// Implement GLSurface.
virtual EGLDisplay GetDisplay() OVERRIDE;
@@ -44,6 +43,8 @@ class GL_EXPORT GLSurfaceEGL : public GLSurface {
static EGLNativeDisplayType GetNativeDisplay();
protected:
+ virtual ~GLSurfaceEGL();
+
bool software_;
private:
@@ -54,7 +55,6 @@ class GL_EXPORT GLSurfaceEGL : public GLSurface {
class NativeViewGLSurfaceEGL : public GLSurfaceEGL {
public:
NativeViewGLSurfaceEGL(bool software, gfx::AcceleratedWidget window);
- virtual ~NativeViewGLSurfaceEGL();
// Implement GLSurface.
virtual EGLConfig GetConfig() OVERRIDE;
@@ -68,6 +68,7 @@ class NativeViewGLSurfaceEGL : public GLSurfaceEGL {
virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
protected:
+ virtual ~NativeViewGLSurfaceEGL();
void SetHandle(EGLSurface surface);
private:
@@ -83,7 +84,6 @@ class NativeViewGLSurfaceEGL : public GLSurfaceEGL {
class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL {
public:
PbufferGLSurfaceEGL(bool software, const gfx::Size& size);
- virtual ~PbufferGLSurfaceEGL();
// Implement GLSurface.
virtual EGLConfig GetConfig() OVERRIDE;
@@ -96,6 +96,9 @@ class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL {
virtual EGLSurface GetHandle() OVERRIDE;
virtual void* GetShareHandle() OVERRIDE;
+ protected:
+ virtual ~PbufferGLSurfaceEGL();
+
private:
gfx::Size size_;
EGLSurface surface_;
diff --git a/ui/gl/gl_surface_glx.cc b/ui/gl/gl_surface_glx.cc
index ba8ce92..a5609cd 100644
--- a/ui/gl/gl_surface_glx.cc
+++ b/ui/gl/gl_surface_glx.cc
@@ -38,11 +38,7 @@ bool g_glx_create_context_robustness_supported = false;
} // namespace anonymous
-GLSurfaceGLX::GLSurfaceGLX() {
-}
-
-GLSurfaceGLX::~GLSurfaceGLX() {
-}
+GLSurfaceGLX::GLSurfaceGLX() {}
bool GLSurfaceGLX::InitializeOneOff() {
static bool initialized = false;
@@ -103,20 +99,13 @@ void* GLSurfaceGLX::GetDisplay() {
return g_display;
}
+GLSurfaceGLX::~GLSurfaceGLX() {}
+
NativeViewGLSurfaceGLX::NativeViewGLSurfaceGLX(gfx::AcceleratedWidget window)
: window_(window),
config_(NULL) {
}
-NativeViewGLSurfaceGLX::NativeViewGLSurfaceGLX()
- : window_(0),
- config_(NULL) {
-}
-
-NativeViewGLSurfaceGLX::~NativeViewGLSurfaceGLX() {
- Destroy();
-}
-
bool NativeViewGLSurfaceGLX::Initialize() {
XWindowAttributes attributes;
if (!XGetWindowAttributes(g_display, window_, &attributes)) {
@@ -234,16 +223,21 @@ bool NativeViewGLSurfaceGLX::PostSubBuffer(
return true;
}
+NativeViewGLSurfaceGLX::NativeViewGLSurfaceGLX()
+ : window_(0),
+ config_(NULL) {
+}
+
+NativeViewGLSurfaceGLX::~NativeViewGLSurfaceGLX() {
+ Destroy();
+}
+
PbufferGLSurfaceGLX::PbufferGLSurfaceGLX(const gfx::Size& size)
: size_(size),
config_(NULL),
pbuffer_(0) {
}
-PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() {
- Destroy();
-}
-
bool PbufferGLSurfaceGLX::Initialize() {
DCHECK(!pbuffer_);
@@ -323,4 +317,8 @@ void* PbufferGLSurfaceGLX::GetConfig() {
return config_;
}
+PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() {
+ Destroy();
+}
+
} // namespace gfx
diff --git a/ui/gl/gl_surface_glx.h b/ui/gl/gl_surface_glx.h
index ac4655e..f4416e8 100644
--- a/ui/gl/gl_surface_glx.h
+++ b/ui/gl/gl_surface_glx.h
@@ -19,7 +19,6 @@ namespace gfx {
class GL_EXPORT GLSurfaceGLX : public GLSurface {
public:
GLSurfaceGLX();
- virtual ~GLSurfaceGLX();
static bool InitializeOneOff();
@@ -36,6 +35,9 @@ class GL_EXPORT GLSurfaceGLX : public GLSurface {
// a GLX drawable.
virtual void* GetConfig() = 0;
+ protected:
+ virtual ~GLSurfaceGLX();
+
private:
DISALLOW_COPY_AND_ASSIGN(GLSurfaceGLX);
};
@@ -44,7 +46,6 @@ class GL_EXPORT GLSurfaceGLX : public GLSurface {
class GL_EXPORT NativeViewGLSurfaceGLX : public GLSurfaceGLX {
public:
explicit NativeViewGLSurfaceGLX(gfx::AcceleratedWidget window);
- virtual ~NativeViewGLSurfaceGLX();
// Implement GLSurfaceGLX.
virtual bool Initialize() OVERRIDE;
@@ -60,6 +61,7 @@ class GL_EXPORT NativeViewGLSurfaceGLX : public GLSurfaceGLX {
protected:
NativeViewGLSurfaceGLX();
+ virtual ~NativeViewGLSurfaceGLX();
gfx::AcceleratedWidget window_;
@@ -74,7 +76,6 @@ class GL_EXPORT NativeViewGLSurfaceGLX : public GLSurfaceGLX {
class GL_EXPORT PbufferGLSurfaceGLX : public GLSurfaceGLX {
public:
explicit PbufferGLSurfaceGLX(const gfx::Size& size);
- virtual ~PbufferGLSurfaceGLX();
// Implement GLSurfaceGLX.
virtual bool Initialize() OVERRIDE;
@@ -85,6 +86,9 @@ class GL_EXPORT PbufferGLSurfaceGLX : public GLSurfaceGLX {
virtual void* GetHandle() OVERRIDE;
virtual void* GetConfig() OVERRIDE;
+ protected:
+ virtual ~PbufferGLSurfaceGLX();
+
private:
gfx::Size size_;
void* config_;
diff --git a/ui/gl/gl_surface_linux.cc b/ui/gl/gl_surface_linux.cc
index a7dbdf0..d657605 100644
--- a/ui/gl/gl_surface_linux.cc
+++ b/ui/gl/gl_surface_linux.cc
@@ -26,7 +26,6 @@ Display* g_osmesa_display;
class NativeViewGLSurfaceOSMesa : public GLSurfaceOSMesa {
public:
explicit NativeViewGLSurfaceOSMesa(gfx::AcceleratedWidget window);
- virtual ~NativeViewGLSurfaceOSMesa();
static bool InitializeOneOff();
@@ -39,6 +38,9 @@ class NativeViewGLSurfaceOSMesa : public GLSurfaceOSMesa {
virtual std::string GetExtensions() OVERRIDE;
virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
+ protected:
+ virtual ~NativeViewGLSurfaceOSMesa();
+
private:
GC window_graphics_context_;
gfx::AcceleratedWidget window_;
@@ -85,10 +87,6 @@ NativeViewGLSurfaceOSMesa::NativeViewGLSurfaceOSMesa(
DCHECK(window);
}
-NativeViewGLSurfaceOSMesa::~NativeViewGLSurfaceOSMesa() {
- Destroy();
-}
-
bool NativeViewGLSurfaceOSMesa::InitializeOneOff() {
static bool initialized = false;
if (initialized)
@@ -260,6 +258,10 @@ bool NativeViewGLSurfaceOSMesa::PostSubBuffer(
return true;
}
+NativeViewGLSurfaceOSMesa::~NativeViewGLSurfaceOSMesa() {
+ Destroy();
+}
+
scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface(
bool software,
gfx::AcceleratedWidget window) {