diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-08 20:33:32 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-08 20:33:32 +0000 |
commit | 0a885f869b678072dc5092e89f3fe8e8d2b59017 (patch) | |
tree | 68523a369ac62c117c639e51c5f43091f2bd232f | |
parent | 0925622c1495325dfe3d3b25273f4439361936bc (diff) | |
download | chromium_src-0a885f869b678072dc5092e89f3fe8e8d2b59017.zip chromium_src-0a885f869b678072dc5092e89f3fe8e8d2b59017.tar.gz chromium_src-0a885f869b678072dc5092e89f3fe8e8d2b59017.tar.bz2 |
Turn on -Wdelete-non-virtual-dtor for chromeos as well.
All of the changes in this CL are to shut up the warning, not because of real problems (I fixed these in separate CLs).
See the bug for a disussion of this change.
BUG=84424
TEST=none
Review URL: http://codereview.chromium.org/6995085
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88385 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/common.gypi | 12 | ||||
-rw-r--r-- | chrome/browser/automation/testing_automation_provider_views.cc | 4 | ||||
-rw-r--r-- | chrome/browser/chromeos/cros/network_library.h | 12 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/login_utils.cc | 4 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/user_manager.cc | 2 | ||||
-rw-r--r-- | chrome/browser/chromeos/user_cros_settings_provider.cc | 2 | ||||
-rw-r--r-- | views/widget/tooltip_window_gtk.h | 4 |
7 files changed, 23 insertions, 17 deletions
diff --git a/build/common.gypi b/build/common.gypi index 06674f3..fd1466d 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -1353,18 +1353,6 @@ ], }]], }], - ['clang==1 and chromeos==1', { - 'target_conditions': [ - ['_toolset=="target"', { - 'cflags': [ - # TODO(thakis): Remove this once all instances of this - # are fixed in the views and chromeos code. - # http://crbug.com/84424 - # TODO(thakis): Add back in when rolling clang past r131989 - '-Wno-delete-non-virtual-dtor', - ], - }]], - }], ['clang==1 and clang_use_chrome_plugins==1', { 'target_conditions': [ ['_toolset=="target"', { diff --git a/chrome/browser/automation/testing_automation_provider_views.cc b/chrome/browser/automation/testing_automation_provider_views.cc index fd685b2..797f5ca 100644 --- a/chrome/browser/automation/testing_automation_provider_views.cc +++ b/chrome/browser/automation/testing_automation_provider_views.cc @@ -37,7 +37,7 @@ class ViewFocusChangeWaiter : public views::FocusChangeListener { FocusWillChange(NULL, focus_manager_->GetFocusedView()); } - ~ViewFocusChangeWaiter() { + virtual ~ViewFocusChangeWaiter() { focus_manager_->RemoveFocusChangeListener(this); } @@ -87,6 +87,8 @@ class TestingAutomationProvider::PopupMenuWaiter : public views::MenuListener { toolbar_view_->AddMenuListener(this); } + virtual ~PopupMenuWaiter() {} + // Implementation of views::MenuListener virtual void OnMenuOpened() { toolbar_view_->RemoveMenuListener(this); diff --git a/chrome/browser/chromeos/cros/network_library.h b/chrome/browser/chromeos/cros/network_library.h index 6fdc7e6..0e9f0d8 100644 --- a/chrome/browser/chromeos/cros/network_library.h +++ b/chrome/browser/chromeos/cros/network_library.h @@ -883,6 +883,8 @@ class NetworkLibrary { // Called when the state of the network manager has changed, // for example, networks have appeared or disappeared. virtual void OnNetworkManagerChanged(NetworkLibrary* obj) = 0; + protected: + ~NetworkManagerObserver() { } }; class NetworkObserver { @@ -891,6 +893,8 @@ class NetworkLibrary { // for example signal strength or connection state. virtual void OnNetworkChanged(NetworkLibrary* cros, const Network* network) = 0; + protected: + ~NetworkObserver() {} }; class NetworkDeviceObserver { @@ -899,12 +903,16 @@ class NetworkLibrary { // for example SIMLock state for cellular. virtual void OnNetworkDeviceChanged(NetworkLibrary* cros, const NetworkDevice* device) = 0; + protected: + ~NetworkDeviceObserver() {} }; class CellularDataPlanObserver { public: // Called when the cellular data plan has changed. virtual void OnCellularDataPlanChanged(NetworkLibrary* obj) = 0; + protected: + ~CellularDataPlanObserver() {} }; class PinOperationObserver { @@ -913,6 +921,8 @@ class NetworkLibrary { // Network is NULL when we don't have an associated Network object. virtual void OnPinOperationCompleted(NetworkLibrary* cros, PinOperationError error) = 0; + protected: + ~PinOperationObserver() {} }; class UserActionObserver { @@ -921,6 +931,8 @@ class NetworkLibrary { // Network is NULL when we don't have an associated Network object. virtual void OnConnectionInitiated(NetworkLibrary* cros, const Network* network) = 0; + protected: + ~UserActionObserver() {} }; virtual ~NetworkLibrary() {} diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc index 42e3d37..1ff1261 100644 --- a/chrome/browser/chromeos/login/login_utils.cc +++ b/chrome/browser/chromeos/login/login_utils.cc @@ -532,8 +532,10 @@ class WarmingObserver : public NetworkLibrary::NetworkManagerObserver { netlib->AddNetworkManagerObserver(this); } + virtual ~WarmingObserver() {} + // If we're now connected, prewarm the auth url. - void OnNetworkManagerChanged(NetworkLibrary* netlib) { + virtual void OnNetworkManagerChanged(NetworkLibrary* netlib) { if (netlib->Connected()) { const int kConnectionsNeeded = 1; chrome_browser_net::PreconnectOnUIThread( diff --git a/chrome/browser/chromeos/login/user_manager.cc b/chrome/browser/chromeos/login/user_manager.cc index 17a13cc..570bf87 100644 --- a/chrome/browser/chromeos/login/user_manager.cc +++ b/chrome/browser/chromeos/login/user_manager.cc @@ -141,6 +141,8 @@ class RemoveAttempt : public CryptohomeLibrary::Delegate { RemoveUser(); } + virtual ~RemoveAttempt() {} + void RemoveUser() { // Owner is not allowed to be removed from the device. // Must not proceed without signature verification. diff --git a/chrome/browser/chromeos/user_cros_settings_provider.cc b/chrome/browser/chromeos/user_cros_settings_provider.cc index f44cb43..d430338 100644 --- a/chrome/browser/chromeos/user_cros_settings_provider.cc +++ b/chrome/browser/chromeos/user_cros_settings_provider.cc @@ -258,7 +258,7 @@ class UserCrosSettingsTrust : public SignedSettingsHelper::Callback { Reload(); } - ~UserCrosSettingsTrust() { + virtual ~UserCrosSettingsTrust() { if (BrowserThread::CurrentlyOn(BrowserThread::UI) && CrosLibrary::Get()->EnsureLoaded()) { // Cancels all pending callbacks from us. diff --git a/views/widget/tooltip_window_gtk.h b/views/widget/tooltip_window_gtk.h index 0c9fcb0..14ea4f9 100644 --- a/views/widget/tooltip_window_gtk.h +++ b/views/widget/tooltip_window_gtk.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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,7 @@ namespace views { class TooltipWindowGtk { public: explicit TooltipWindowGtk(GtkWidget* widget); - ~TooltipWindowGtk(); + virtual ~TooltipWindowGtk(); // Sets tooltip text to display. void SetTooltipText(const std::wstring& text); |