From 0280cb6ec0c9158a01e2f484a6caa83d690b4e66 Mon Sep 17 00:00:00 2001 From: dcheng Date: Thu, 15 Jan 2015 23:37:50 -0800 Subject: Update {virtual,override,final} to follow C++11 style in chromeos/dbus. The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override. This patch was automatically generated with a ChromeOS build using a variation of https://codereview.chromium.org/598073004. BUG=417463 R=hashimoto@chromium.org Review URL: https://codereview.chromium.org/817853005 Cr-Commit-Position: refs/heads/master@{#311851} --- chromeos/dbus/bluetooth_device_client.cc | 67 +++++++++++++++----------------- 1 file changed, 31 insertions(+), 36 deletions(-) (limited to 'chromeos/dbus/bluetooth_device_client.cc') diff --git a/chromeos/dbus/bluetooth_device_client.cc b/chromeos/dbus/bluetooth_device_client.cc index e2eae7d..af27aa8 100644 --- a/chromeos/dbus/bluetooth_device_client.cc +++ b/chromeos/dbus/bluetooth_device_client.cc @@ -62,27 +62,25 @@ class BluetoothDeviceClientImpl BluetoothDeviceClientImpl() : object_manager_(NULL), weak_ptr_factory_(this) {} - virtual ~BluetoothDeviceClientImpl() { + ~BluetoothDeviceClientImpl() override { object_manager_->UnregisterInterface( bluetooth_device::kBluetoothDeviceInterface); } // BluetoothDeviceClient override. - virtual void AddObserver(BluetoothDeviceClient::Observer* observer) - override { + void AddObserver(BluetoothDeviceClient::Observer* observer) override { DCHECK(observer); observers_.AddObserver(observer); } // BluetoothDeviceClient override. - virtual void RemoveObserver(BluetoothDeviceClient::Observer* observer) - override { + void RemoveObserver(BluetoothDeviceClient::Observer* observer) override { DCHECK(observer); observers_.RemoveObserver(observer); } // dbus::ObjectManager::Interface override. - virtual dbus::PropertySet* CreateProperties( + dbus::PropertySet* CreateProperties( dbus::ObjectProxy* object_proxy, const dbus::ObjectPath& object_path, const std::string& interface_name) override { @@ -96,7 +94,7 @@ class BluetoothDeviceClientImpl } // BluetoothDeviceClient override. - virtual std::vector GetDevicesForAdapter( + std::vector GetDevicesForAdapter( const dbus::ObjectPath& adapter_path) override { std::vector object_paths, device_paths; device_paths = object_manager_->GetObjectsWithInterface( @@ -111,8 +109,7 @@ class BluetoothDeviceClientImpl } // BluetoothDeviceClient override. - virtual Properties* GetProperties(const dbus::ObjectPath& object_path) - override { + Properties* GetProperties(const dbus::ObjectPath& object_path) override { return static_cast( object_manager_->GetProperties( object_path, @@ -120,9 +117,9 @@ class BluetoothDeviceClientImpl } // BluetoothDeviceClient override. - virtual void Connect(const dbus::ObjectPath& object_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void Connect(const dbus::ObjectPath& object_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call( bluetooth_device::kBluetoothDeviceInterface, bluetooth_device::kConnect); @@ -145,9 +142,9 @@ class BluetoothDeviceClientImpl } // BluetoothDeviceClient override. - virtual void Disconnect(const dbus::ObjectPath& object_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void Disconnect(const dbus::ObjectPath& object_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call( bluetooth_device::kBluetoothDeviceInterface, bluetooth_device::kDisconnect); @@ -169,10 +166,10 @@ class BluetoothDeviceClientImpl } // BluetoothDeviceClient override. - virtual void ConnectProfile(const dbus::ObjectPath& object_path, - const std::string& uuid, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void ConnectProfile(const dbus::ObjectPath& object_path, + const std::string& uuid, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call( bluetooth_device::kBluetoothDeviceInterface, bluetooth_device::kConnectProfile); @@ -198,11 +195,10 @@ class BluetoothDeviceClientImpl } // BluetoothDeviceClient override. - virtual void DisconnectProfile(const dbus::ObjectPath& object_path, - const std::string& uuid, - const base::Closure& callback, - const ErrorCallback& error_callback) - override { + void DisconnectProfile(const dbus::ObjectPath& object_path, + const std::string& uuid, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call( bluetooth_device::kBluetoothDeviceInterface, bluetooth_device::kDisconnectProfile); @@ -227,9 +223,9 @@ class BluetoothDeviceClientImpl } // BluetoothDeviceClient override. - virtual void Pair(const dbus::ObjectPath& object_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void Pair(const dbus::ObjectPath& object_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call( bluetooth_device::kBluetoothDeviceInterface, bluetooth_device::kPair); @@ -252,10 +248,9 @@ class BluetoothDeviceClientImpl } // BluetoothDeviceClient override. - virtual void CancelPairing(const dbus::ObjectPath& object_path, - const base::Closure& callback, - const ErrorCallback& error_callback) - override { + void CancelPairing(const dbus::ObjectPath& object_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call( bluetooth_device::kBluetoothDeviceInterface, bluetooth_device::kCancelPairing); @@ -298,7 +293,7 @@ class BluetoothDeviceClientImpl } protected: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { object_manager_ = bus->GetObjectManager( bluetooth_object_manager::kBluetoothObjectManagerServiceName, dbus::ObjectPath( @@ -310,16 +305,16 @@ class BluetoothDeviceClientImpl private: // Called by dbus::ObjectManager when an object with the device interface // is created. Informs observers. - virtual void ObjectAdded(const dbus::ObjectPath& object_path, - const std::string& interface_name) override { + void ObjectAdded(const dbus::ObjectPath& object_path, + const std::string& interface_name) override { FOR_EACH_OBSERVER(BluetoothDeviceClient::Observer, observers_, DeviceAdded(object_path)); } // Called by dbus::ObjectManager when an object with the device interface // is removed. Informs observers. - virtual void ObjectRemoved(const dbus::ObjectPath& object_path, - const std::string& interface_name) override { + void ObjectRemoved(const dbus::ObjectPath& object_path, + const std::string& interface_name) override { FOR_EACH_OBSERVER(BluetoothDeviceClient::Observer, observers_, DeviceRemoved(object_path)); } -- cgit v1.1