Enable Clang warnings in .cc files for Linux+[Aura/ChromeOS]
BUG=115047
R=darin
Review URL: https://chromiumcodereview.appspot.com/14890005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198649 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ash/focus_cycler_unittest.cc b/ash/focus_cycler_unittest.cc
index 5854f8d..aebede49 100644
--- a/ash/focus_cycler_unittest.cc
+++ b/ash/focus_cycler_unittest.cc
@@ -46,8 +46,9 @@
}
// views::WidgetDelegate.
- virtual void GetAccessiblePanes(std::vector<views::View*>* panes) {
- std::copy(accessible_panes_.begin(), accessible_panes_.end(),
+ virtual void GetAccessiblePanes(std::vector<views::View*>* panes) OVERRIDE {
+ std::copy(accessible_panes_.begin(),
+ accessible_panes_.end(),
std::back_inserter(*panes));
}
virtual views::Widget* GetWidget() OVERRIDE {
diff --git a/ash/system/chromeos/network/tray_network.cc b/ash/system/chromeos/network/tray_network.cc
index eabb74d4..911b2724 100644
--- a/ash/system/chromeos/network/tray_network.cc
+++ b/ash/system/chromeos/network/tray_network.cc
@@ -131,7 +131,9 @@
network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this);
}
- std::string GetClassName() const { return "NetworkTrayView"; }
+ virtual std::string GetClassName() const OVERRIDE {
+ return "NetworkTrayView";
+ }
void Update(const NetworkIconInfo& info) {
if (UseNewNetworkHandlers())
diff --git a/build/common.gypi b/build/common.gypi
index 0ebc85b..9767abb 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1533,7 +1533,7 @@
],
},
'conditions': [
- ['OS=="linux" and chromeos==0 and use_aura==0', {
+ ['OS=="linux"', {
'clang_chrome_plugins_flags': [
'<@(clang_chrome_plugins_flags)'
],
diff --git a/chrome/browser/chromeos/policy/variations_service_policy_browsertest.cc b/chrome/browser/chromeos/policy/variations_service_policy_browsertest.cc
index 258a91e5..c4eb1bb 100644
--- a/chrome/browser/chromeos/policy/variations_service_policy_browsertest.cc
+++ b/chrome/browser/chromeos/policy/variations_service_policy_browsertest.cc
@@ -17,7 +17,7 @@
protected:
VariationsServiceDevicePolicyTest() {}
- void SetUpInProcessBrowserTestFixture() OVERRIDE {
+ virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
DevicePolicyCrosBrowserTest::SetUpInProcessBrowserTestFixture();
InstallOwnerKey();
diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
index c15301c0..025e1fa 100644
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
@@ -1402,18 +1402,18 @@
}
// drive::JobListObserver overrides.
- virtual void OnJobAdded(const drive::JobInfo& job_info) {
+ virtual void OnJobAdded(const drive::JobInfo& job_info) OVERRIDE {
OnJobUpdated(job_info);
}
virtual void OnJobDone(const drive::JobInfo& job_info,
- drive::FileError error) {
+ drive::FileError error) OVERRIDE {
ash::DriveOperationStatus status;
if (ConvertToFinishedDriveOperationStatus(job_info, error, &status))
GetSystemTrayNotifier()->NotifyDriveJobUpdated(status);
}
- virtual void OnJobUpdated(const drive::JobInfo& job_info) {
+ virtual void OnJobUpdated(const drive::JobInfo& job_info) OVERRIDE {
ash::DriveOperationStatus status;
if (ConvertToDriveOperationStatus(job_info, &status))
GetSystemTrayNotifier()->NotifyDriveJobUpdated(status);
diff --git a/chrome/browser/chromeos/system/statistics_provider.cc b/chrome/browser/chromeos/system/statistics_provider.cc
index 3a912d6a..a0544a52 100644
--- a/chrome/browser/chromeos/system/statistics_provider.cc
+++ b/chrome/browser/chromeos/system/statistics_provider.cc
@@ -293,7 +293,7 @@
return false;
}
- virtual void LoadOemManifest() {
+ virtual void LoadOemManifest() OVERRIDE {
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (!command_line->HasSwitch(switches::kAppOemManifestFile))
return;
diff --git a/chrome/browser/extensions/notifications_apitest.cc b/chrome/browser/extensions/notifications_apitest.cc
index b768856..a1a8b39 100644
--- a/chrome/browser/extensions/notifications_apitest.cc
+++ b/chrome/browser/extensions/notifications_apitest.cc
@@ -38,7 +38,7 @@
class NotificationIdleTest : public RichWebkitNotificationTest {
protected:
- virtual void SetUpCommandLine(CommandLine* command_line) {
+ virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
RichWebkitNotificationTest::SetUpCommandLine(command_line);
command_line->AppendSwitchASCII(switches::kEventPageIdleTime, "1");
diff --git a/chrome/browser/extensions/platform_app_browsertest.cc b/chrome/browser/extensions/platform_app_browsertest.cc
index 29a98c9..642f948 100644
--- a/chrome/browser/extensions/platform_app_browsertest.cc
+++ b/chrome/browser/extensions/platform_app_browsertest.cc
@@ -936,11 +936,11 @@
}
// ShellWindowRegistry::Observer implementation.
- virtual void OnShellWindowAdded(ShellWindow* shell_window) {
+ virtual void OnShellWindowAdded(ShellWindow* shell_window) OVERRIDE {
opener_app_ids_.insert(shell_window->extension()->id());
}
- virtual void OnShellWindowIconChanged(ShellWindow* shell_window) {}
- virtual void OnShellWindowRemoved(ShellWindow* shell_window) {}
+ virtual void OnShellWindowIconChanged(ShellWindow* shell_window) OVERRIDE {}
+ virtual void OnShellWindowRemoved(ShellWindow* shell_window) OVERRIDE {}
protected:
// A set of ids of apps we've seen open a shell window.
diff --git a/chrome/browser/storage_monitor/storage_monitor_chromeos_unittest.cc b/chrome/browser/storage_monitor/storage_monitor_chromeos_unittest.cc
index 122cd00..f999ad7 100644
--- a/chrome/browser/storage_monitor/storage_monitor_chromeos_unittest.cc
+++ b/chrome/browser/storage_monitor/storage_monitor_chromeos_unittest.cc
@@ -65,7 +65,7 @@
virtual ~TestStorageMonitorCros() {}
- void Init() {
+ virtual void Init() OVERRIDE {
SetMediaTransferProtocolManagerForTest(
new chrome::TestMediaTransferProtocolManagerLinux());
StorageMonitorCros::Init();
diff --git a/chromeos/cryptohome/cryptohome_library.cc b/chromeos/cryptohome/cryptohome_library.cc
index 9529836..f717e1e 100644
--- a/chromeos/cryptohome/cryptohome_library.cc
+++ b/chromeos/cryptohome/cryptohome_library.cc
@@ -290,12 +290,12 @@
return kStubSystemSalt;
}
- virtual std::string EncryptWithSystemSalt(const std::string& token) {
+ virtual std::string EncryptWithSystemSalt(const std::string& token) OVERRIDE {
return token;
}
virtual std::string DecryptWithSystemSalt(
- const std::string& encrypted_token_hex) {
+ const std::string& encrypted_token_hex) OVERRIDE {
return encrypted_token_hex;
}
diff --git a/chromeos/dbus/experimental_bluetooth_input_client.cc b/chromeos/dbus/experimental_bluetooth_input_client.cc
index ee6bf40..e4febed 100644
--- a/chromeos/dbus/experimental_bluetooth_input_client.cc
+++ b/chromeos/dbus/experimental_bluetooth_input_client.cc
@@ -69,9 +69,10 @@
virtual dbus::PropertySet* CreateProperties(
dbus::ObjectProxy* object_proxy,
const dbus::ObjectPath& object_path,
- const std::string& interface_name) {
+ const std::string& interface_name) OVERRIDE {
Properties* properties = new Properties(
- object_proxy, interface_name,
+ object_proxy,
+ interface_name,
base::Bind(&ExperimentalBluetoothInputClientImpl::OnPropertyChanged,
weak_ptr_factory_.GetWeakPtr(),
object_path));
@@ -90,16 +91,16 @@
private:
// Called by dbus::ObjectManager when an object with the input interface
// is created. Informs observers.
- void ObjectAdded(const dbus::ObjectPath& object_path,
- const std::string& interface_name) OVERRIDE {
+ virtual void ObjectAdded(const dbus::ObjectPath& object_path,
+ const std::string& interface_name) OVERRIDE {
FOR_EACH_OBSERVER(ExperimentalBluetoothInputClient::Observer, observers_,
InputAdded(object_path));
}
// Called by dbus::ObjectManager when an object with the input interface
// is removed. Informs observers.
- void ObjectRemoved(const dbus::ObjectPath& object_path,
- const std::string& interface_name) OVERRIDE {
+ virtual void ObjectRemoved(const dbus::ObjectPath& object_path,
+ const std::string& interface_name) OVERRIDE {
FOR_EACH_OBSERVER(ExperimentalBluetoothInputClient::Observer, observers_,
InputRemoved(object_path));
}
diff --git a/chromeos/network/network_state_unittest.cc b/chromeos/network/network_state_unittest.cc
index 7c7bc41..0ccdd198 100644
--- a/chromeos/network/network_state_unittest.cc
+++ b/chromeos/network/network_state_unittest.cc
@@ -17,12 +17,12 @@
class TestStringValue : public base::Value {
public:
- TestStringValue(const std::string& in_value)
+ explicit TestStringValue(const std::string& in_value)
: base::Value(TYPE_STRING),
value_(in_value) {
}
- ~TestStringValue() {
+ virtual ~TestStringValue() {
}
// Overridden from Value:
diff --git a/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc b/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
index 12fa687..69c5b20 100644
--- a/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
+++ b/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
@@ -43,15 +43,15 @@
waiting_for_gesture_ack_callback_ = false;
}
- void OnSelectionOrCursorChanged(const gfx::Rect& anchor,
- const gfx::Rect& focus) OVERRIDE {
+ virtual void OnSelectionOrCursorChanged(const gfx::Rect& anchor,
+ const gfx::Rect& focus) OVERRIDE {
selection_changed_callback_arrived_ = true;
TouchEditableImplAura::OnSelectionOrCursorChanged(anchor, focus);
if (waiting_for_selection_changed_callback_)
selection_changed_wait_run_loop_->Quit();
}
- void GestureEventAck(int gesture_event_type) OVERRIDE {
+ virtual void GestureEventAck(int gesture_event_type) OVERRIDE {
gesture_ack_callback_arrived_ = true;
TouchEditableImplAura::GestureEventAck(gesture_event_type);
if (waiting_for_gesture_ack_callback_)
diff --git a/device/bluetooth/bluetooth_experimental_chromeos_unittest.cc b/device/bluetooth/bluetooth_experimental_chromeos_unittest.cc
index 1c6f5b6..afd8325 100644
--- a/device/bluetooth/bluetooth_experimental_chromeos_unittest.cc
+++ b/device/bluetooth/bluetooth_experimental_chromeos_unittest.cc
@@ -136,51 +136,50 @@
last_entered_(999U) {}
virtual ~TestPairingDelegate() {}
- void RequestPinCode(BluetoothDevice* device) OVERRIDE {
+ virtual void RequestPinCode(BluetoothDevice* device) OVERRIDE {
++call_count_;
++request_pincode_count_;
QuitMessageLoop();
}
- void RequestPasskey(BluetoothDevice* device) OVERRIDE {
+ virtual void RequestPasskey(BluetoothDevice* device) OVERRIDE {
++call_count_;
++request_passkey_count_;
QuitMessageLoop();
}
- void DisplayPinCode(BluetoothDevice* device,
- const std::string& pincode) OVERRIDE {
+ virtual void DisplayPinCode(BluetoothDevice* device,
+ const std::string& pincode) OVERRIDE {
++call_count_;
++display_pincode_count_;
last_pincode_ = pincode;
QuitMessageLoop();
}
- void DisplayPasskey(BluetoothDevice* device,
- uint32 passkey) OVERRIDE {
+ virtual void DisplayPasskey(BluetoothDevice* device,
+ uint32 passkey) OVERRIDE {
++call_count_;
++display_passkey_count_;
last_passkey_ = passkey;
QuitMessageLoop();
}
- void KeysEntered(BluetoothDevice* device,
- uint32 entered) OVERRIDE {
+ virtual void KeysEntered(BluetoothDevice* device, uint32 entered) OVERRIDE {
++call_count_;
++keys_entered_count_;
last_entered_ = entered;
QuitMessageLoop();
}
- void ConfirmPasskey(BluetoothDevice* device,
- uint32 passkey) OVERRIDE {
+ virtual void ConfirmPasskey(BluetoothDevice* device,
+ uint32 passkey) OVERRIDE {
++call_count_;
++confirm_passkey_count_;
last_passkey_ = passkey;
QuitMessageLoop();
}
- void DismissDisplayOrConfirm() OVERRIDE {
+ virtual void DismissDisplayOrConfirm() OVERRIDE {
++call_count_;
++dismiss_count_;
QuitMessageLoop();
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
index c8bbcc0..49446e2 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -1348,7 +1348,7 @@
parent_destroyed_(false),
child_destroyed_(false) {}
- ~DesktopAuraFullscreenChildWindowDestructionTest() {
+ virtual ~DesktopAuraFullscreenChildWindowDestructionTest() {
EXPECT_TRUE(parent_destroyed_);
EXPECT_TRUE(child_destroyed_);
full_screen_widget_ = NULL;