diff options
Diffstat (limited to 'chromeos')
130 files changed, 1658 insertions, 1870 deletions
diff --git a/chromeos/dbus/blocking_method_caller_unittest.cc b/chromeos/dbus/blocking_method_caller_unittest.cc index f1c088f..3decf12 100644 --- a/chromeos/dbus/blocking_method_caller_unittest.cc +++ b/chromeos/dbus/blocking_method_caller_unittest.cc @@ -25,16 +25,16 @@ namespace { class FakeTaskRunner : public base::TaskRunner { public: - virtual bool PostDelayedTask(const tracked_objects::Location& from_here, - const base::Closure& task, - base::TimeDelta delay) override { + bool PostDelayedTask(const tracked_objects::Location& from_here, + const base::Closure& task, + base::TimeDelta delay) override { task.Run(); return true; } - virtual bool RunsTasksOnCurrentThread() const override { return true; } + bool RunsTasksOnCurrentThread() const override { return true; } protected: - virtual ~FakeTaskRunner() {} + ~FakeTaskRunner() override {} }; } // namespace @@ -44,7 +44,7 @@ class BlockingMethodCallerTest : public testing::Test { BlockingMethodCallerTest() : task_runner_(new FakeTaskRunner) { } - virtual void SetUp() { + void SetUp() override { // Create a mock bus. dbus::Bus::Options options; options.bus_type = dbus::Bus::SYSTEM; @@ -78,9 +78,7 @@ class BlockingMethodCallerTest : public testing::Test { EXPECT_CALL(*mock_bus_.get(), ShutdownAndBlock()).WillOnce(Return()); } - virtual void TearDown() { - mock_bus_->ShutdownAndBlock(); - } + void TearDown() override { mock_bus_->ShutdownAndBlock(); } protected: scoped_refptr<FakeTaskRunner> task_runner_; diff --git a/chromeos/dbus/bluetooth_adapter_client.cc b/chromeos/dbus/bluetooth_adapter_client.cc index 1366eec18..e4af8aa 100644 --- a/chromeos/dbus/bluetooth_adapter_client.cc +++ b/chromeos/dbus/bluetooth_adapter_client.cc @@ -53,33 +53,31 @@ class BluetoothAdapterClientImpl BluetoothAdapterClientImpl() : object_manager_(NULL), weak_ptr_factory_(this) {} - virtual ~BluetoothAdapterClientImpl() { + ~BluetoothAdapterClientImpl() override { object_manager_->UnregisterInterface( bluetooth_adapter::kBluetoothAdapterInterface); } // BluetoothAdapterClient override. - virtual void AddObserver(BluetoothAdapterClient::Observer* observer) - override { + void AddObserver(BluetoothAdapterClient::Observer* observer) override { DCHECK(observer); observers_.AddObserver(observer); } // BluetoothAdapterClient override. - virtual void RemoveObserver(BluetoothAdapterClient::Observer* observer) - override { + void RemoveObserver(BluetoothAdapterClient::Observer* observer) override { DCHECK(observer); observers_.RemoveObserver(observer); } // Returns the list of adapter object paths known to the system. - virtual std::vector<dbus::ObjectPath> GetAdapters() override { + std::vector<dbus::ObjectPath> GetAdapters() override { return object_manager_->GetObjectsWithInterface( bluetooth_adapter::kBluetoothAdapterInterface); } // 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 { @@ -93,8 +91,7 @@ class BluetoothAdapterClientImpl } // BluetoothAdapterClient override. - virtual Properties* GetProperties(const dbus::ObjectPath& object_path) - override { + Properties* GetProperties(const dbus::ObjectPath& object_path) override { return static_cast<Properties*>( object_manager_->GetProperties( object_path, @@ -102,9 +99,9 @@ class BluetoothAdapterClientImpl } // BluetoothAdapterClient override. - virtual void StartDiscovery(const dbus::ObjectPath& object_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void StartDiscovery(const dbus::ObjectPath& object_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call( bluetooth_adapter::kBluetoothAdapterInterface, bluetooth_adapter::kStartDiscovery); @@ -126,9 +123,9 @@ class BluetoothAdapterClientImpl } // BluetoothAdapterClient override. - virtual void StopDiscovery(const dbus::ObjectPath& object_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void StopDiscovery(const dbus::ObjectPath& object_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call( bluetooth_adapter::kBluetoothAdapterInterface, bluetooth_adapter::kStopDiscovery); @@ -150,10 +147,10 @@ class BluetoothAdapterClientImpl } // BluetoothAdapterClient override. - virtual void RemoveDevice(const dbus::ObjectPath& object_path, - const dbus::ObjectPath& device_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void RemoveDevice(const dbus::ObjectPath& object_path, + const dbus::ObjectPath& device_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call( bluetooth_adapter::kBluetoothAdapterInterface, bluetooth_adapter::kRemoveDevice); @@ -178,7 +175,7 @@ class BluetoothAdapterClientImpl } protected: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { object_manager_ = bus->GetObjectManager( bluetooth_object_manager::kBluetoothObjectManagerServiceName, dbus::ObjectPath( @@ -190,16 +187,16 @@ class BluetoothAdapterClientImpl private: // Called by dbus::ObjectManager when an object with the adapter 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(BluetoothAdapterClient::Observer, observers_, AdapterAdded(object_path)); } // Called by dbus::ObjectManager when an object with the adapter 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(BluetoothAdapterClient::Observer, observers_, AdapterRemoved(object_path)); } diff --git a/chromeos/dbus/bluetooth_adapter_client.h b/chromeos/dbus/bluetooth_adapter_client.h index 298c4af..1bbe26f 100644 --- a/chromeos/dbus/bluetooth_adapter_client.h +++ b/chromeos/dbus/bluetooth_adapter_client.h @@ -75,7 +75,7 @@ class CHROMEOS_EXPORT BluetoothAdapterClient : public DBusClient { Properties(dbus::ObjectProxy* object_proxy, const std::string& interface_name, const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; }; // Interface for observing changes from a local bluetooth adapter. @@ -97,7 +97,7 @@ class CHROMEOS_EXPORT BluetoothAdapterClient : public DBusClient { const std::string& property_name) {} }; - virtual ~BluetoothAdapterClient(); + ~BluetoothAdapterClient() override; // Adds and removes observers for events on all local bluetooth // adapters. Check the |object_path| parameter of observer methods to diff --git a/chromeos/dbus/bluetooth_agent_manager_client.cc b/chromeos/dbus/bluetooth_agent_manager_client.cc index 40c8ebe..4e1e2cb 100644 --- a/chromeos/dbus/bluetooth_agent_manager_client.cc +++ b/chromeos/dbus/bluetooth_agent_manager_client.cc @@ -23,14 +23,13 @@ class BluetoothAgentManagerClientImpl public: BluetoothAgentManagerClientImpl() : weak_ptr_factory_(this) {} - virtual ~BluetoothAgentManagerClientImpl() { - } + ~BluetoothAgentManagerClientImpl() override {} // BluetoothAgentManagerClient override. - virtual void RegisterAgent(const dbus::ObjectPath& agent_path, - const std::string& capability, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void RegisterAgent(const dbus::ObjectPath& agent_path, + const std::string& capability, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call( bluetooth_agent_manager::kBluetoothAgentManagerInterface, bluetooth_agent_manager::kRegisterAgent); @@ -49,9 +48,9 @@ class BluetoothAgentManagerClientImpl } // BluetoothAgentManagerClient override. - virtual void UnregisterAgent(const dbus::ObjectPath& agent_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void UnregisterAgent(const dbus::ObjectPath& agent_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call( bluetooth_agent_manager::kBluetoothAgentManagerInterface, bluetooth_agent_manager::kUnregisterAgent); @@ -70,10 +69,9 @@ class BluetoothAgentManagerClientImpl // BluetoothAgentManagerClient override. - virtual void RequestDefaultAgent(const dbus::ObjectPath& agent_path, - const base::Closure& callback, - const ErrorCallback& error_callback) - override { + void RequestDefaultAgent(const dbus::ObjectPath& agent_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call( bluetooth_agent_manager::kBluetoothAgentManagerInterface, bluetooth_agent_manager::kRequestDefaultAgent); @@ -91,7 +89,7 @@ class BluetoothAgentManagerClientImpl } protected: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { DCHECK(bus); object_proxy_ = bus->GetObjectProxy( bluetooth_agent_manager::kBluetoothAgentManagerServiceName, diff --git a/chromeos/dbus/bluetooth_agent_manager_client.h b/chromeos/dbus/bluetooth_agent_manager_client.h index 96ef5d0..f43f4f8 100644 --- a/chromeos/dbus/bluetooth_agent_manager_client.h +++ b/chromeos/dbus/bluetooth_agent_manager_client.h @@ -20,7 +20,7 @@ namespace chromeos { // object of the Bluetooth daemon. class CHROMEOS_EXPORT BluetoothAgentManagerClient : public DBusClient { public: - virtual ~BluetoothAgentManagerClient(); + ~BluetoothAgentManagerClient() override; // The ErrorCallback is used by agent manager methods to indicate failure. // It receives two arguments: the name of the error in |error_name| and diff --git a/chromeos/dbus/bluetooth_agent_service_provider.cc b/chromeos/dbus/bluetooth_agent_service_provider.cc index 1e21737..6c02c92 100644 --- a/chromeos/dbus/bluetooth_agent_service_provider.cc +++ b/chromeos/dbus/bluetooth_agent_service_provider.cc @@ -109,7 +109,7 @@ class BluetoothAgentServiceProviderImpl weak_ptr_factory_.GetWeakPtr())); } - virtual ~BluetoothAgentServiceProviderImpl() { + ~BluetoothAgentServiceProviderImpl() override { VLOG(1) << "Cleaning up Bluetooth Agent: " << object_path_.value(); // Unregister the object path so we can reuse with a new agent. 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<dbus::ObjectPath> GetDevicesForAdapter( + std::vector<dbus::ObjectPath> GetDevicesForAdapter( const dbus::ObjectPath& adapter_path) override { std::vector<dbus::ObjectPath> 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<Properties*>( 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)); } diff --git a/chromeos/dbus/bluetooth_device_client.h b/chromeos/dbus/bluetooth_device_client.h index ec82bde..353fd5b 100644 --- a/chromeos/dbus/bluetooth_device_client.h +++ b/chromeos/dbus/bluetooth_device_client.h @@ -83,7 +83,7 @@ class CHROMEOS_EXPORT BluetoothDeviceClient : public DBusClient { Properties(dbus::ObjectProxy* object_proxy, const std::string& interface_name, const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; }; // Interface for observing changes from a remote bluetooth device. @@ -105,7 +105,7 @@ class CHROMEOS_EXPORT BluetoothDeviceClient : public DBusClient { const std::string& property_name) {} }; - virtual ~BluetoothDeviceClient(); + ~BluetoothDeviceClient() override; // Adds and removes observers for events on all remote bluetooth // devices. Check the |object_path| parameter of observer methods to diff --git a/chromeos/dbus/bluetooth_gatt_characteristic_client.cc b/chromeos/dbus/bluetooth_gatt_characteristic_client.cc index 206b8d4..fc516d8 100644 --- a/chromeos/dbus/bluetooth_gatt_characteristic_client.cc +++ b/chromeos/dbus/bluetooth_gatt_characteristic_client.cc @@ -47,35 +47,34 @@ class BluetoothGattCharacteristicClientImpl weak_ptr_factory_(this) { } - virtual ~BluetoothGattCharacteristicClientImpl() { + ~BluetoothGattCharacteristicClientImpl() override { object_manager_->UnregisterInterface( bluetooth_gatt_characteristic::kBluetoothGattCharacteristicInterface); } // BluetoothGattCharacteristicClient override. - virtual void AddObserver( + void AddObserver( BluetoothGattCharacteristicClient::Observer* observer) override { DCHECK(observer); observers_.AddObserver(observer); } // BluetoothGattCharacteristicClient override. - virtual void RemoveObserver( + void RemoveObserver( BluetoothGattCharacteristicClient::Observer* observer) override { DCHECK(observer); observers_.RemoveObserver(observer); } // BluetoothGattCharacteristicClient override. - virtual std::vector<dbus::ObjectPath> GetCharacteristics() override { + std::vector<dbus::ObjectPath> GetCharacteristics() override { DCHECK(object_manager_); return object_manager_->GetObjectsWithInterface( bluetooth_gatt_characteristic::kBluetoothGattCharacteristicInterface); } // BluetoothGattCharacteristicClient override. - virtual Properties* GetProperties( - const dbus::ObjectPath& object_path) override { + Properties* GetProperties(const dbus::ObjectPath& object_path) override { DCHECK(object_manager_); return static_cast<Properties*>( object_manager_->GetProperties( @@ -85,9 +84,9 @@ class BluetoothGattCharacteristicClientImpl } // BluetoothGattCharacteristicClient override. - virtual void ReadValue(const dbus::ObjectPath& object_path, - const ValueCallback& callback, - const ErrorCallback& error_callback) override { + void ReadValue(const dbus::ObjectPath& object_path, + const ValueCallback& callback, + const ErrorCallback& error_callback) override { dbus::ObjectProxy* object_proxy = object_manager_->GetObjectProxy(object_path); if (!object_proxy) { @@ -111,10 +110,10 @@ class BluetoothGattCharacteristicClientImpl } // BluetoothGattCharacteristicClient override. - virtual void WriteValue(const dbus::ObjectPath& object_path, - const std::vector<uint8>& value, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void WriteValue(const dbus::ObjectPath& object_path, + const std::vector<uint8>& value, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::ObjectProxy* object_proxy = object_manager_->GetObjectProxy(object_path); if (!object_proxy) { @@ -140,9 +139,9 @@ class BluetoothGattCharacteristicClientImpl } // BluetoothGattCharacteristicClient override. - virtual void StartNotify(const dbus::ObjectPath& object_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void StartNotify(const dbus::ObjectPath& object_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::ObjectProxy* object_proxy = object_manager_->GetObjectProxy(object_path); if (!object_proxy) { @@ -166,9 +165,9 @@ class BluetoothGattCharacteristicClientImpl } // BluetoothGattCharacteristicClient override. - virtual void StopNotify(const dbus::ObjectPath& object_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void StopNotify(const dbus::ObjectPath& object_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::ObjectProxy* object_proxy = object_manager_->GetObjectProxy(object_path); if (!object_proxy) { @@ -192,8 +191,8 @@ class BluetoothGattCharacteristicClientImpl } // dbus::ObjectManager::Interface override. - virtual dbus::PropertySet* CreateProperties( - dbus::ObjectProxy *object_proxy, + dbus::PropertySet* CreateProperties( + dbus::ObjectProxy* object_proxy, const dbus::ObjectPath& object_path, const std::string& interface_name) override { Properties* properties = new Properties( @@ -206,8 +205,8 @@ class BluetoothGattCharacteristicClientImpl } // dbus::ObjectManager::Interface override. - 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 { VLOG(2) << "Remote GATT characteristic added: " << object_path.value(); FOR_EACH_OBSERVER(BluetoothGattCharacteristicClient::Observer, observers_, GattCharacteristicAdded(object_path)); @@ -229,8 +228,8 @@ class BluetoothGattCharacteristicClientImpl } // dbus::ObjectManager::Interface override. - 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 { VLOG(2) << "Remote GATT characteristic removed: " << object_path.value(); FOR_EACH_OBSERVER(BluetoothGattCharacteristicClient::Observer, observers_, GattCharacteristicRemoved(object_path)); @@ -238,7 +237,7 @@ class BluetoothGattCharacteristicClientImpl protected: // chromeos::DBusClient override. - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { object_manager_ = bus->GetObjectManager( bluetooth_object_manager::kBluetoothObjectManagerServiceName, dbus::ObjectPath( diff --git a/chromeos/dbus/bluetooth_gatt_characteristic_client.h b/chromeos/dbus/bluetooth_gatt_characteristic_client.h index ab5fd70..651bd18 100644 --- a/chromeos/dbus/bluetooth_gatt_characteristic_client.h +++ b/chromeos/dbus/bluetooth_gatt_characteristic_client.h @@ -45,7 +45,7 @@ class CHROMEOS_EXPORT BluetoothGattCharacteristicClient : public DBusClient { Properties(dbus::ObjectProxy* object_proxy, const std::string& interface_name, const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; }; // Interface for observing changes from a remote GATT characteristic. @@ -81,7 +81,7 @@ class CHROMEOS_EXPORT BluetoothGattCharacteristicClient : public DBusClient { const std::string& error_message)> ErrorCallback; typedef base::Callback<void(const std::vector<uint8>& value)> ValueCallback; - virtual ~BluetoothGattCharacteristicClient(); + ~BluetoothGattCharacteristicClient() override; // Adds and removes observers for events on all remote GATT characteristics. // Check the |object_path| parameter of observer methods to determine which diff --git a/chromeos/dbus/bluetooth_gatt_characteristic_service_provider.cc b/chromeos/dbus/bluetooth_gatt_characteristic_service_provider.cc index cde005f..39c95bf 100644 --- a/chromeos/dbus/bluetooth_gatt_characteristic_service_provider.cc +++ b/chromeos/dbus/bluetooth_gatt_characteristic_service_provider.cc @@ -82,14 +82,14 @@ class BluetoothGattCharacteristicServiceProviderImpl weak_ptr_factory_.GetWeakPtr())); } - virtual ~BluetoothGattCharacteristicServiceProviderImpl() { + ~BluetoothGattCharacteristicServiceProviderImpl() override { VLOG(1) << "Cleaning up Bluetooth GATT characteristic: " << object_path_.value(); bus_->UnregisterExportedObject(object_path_); } // BluetoothGattCharacteristicServiceProvider override. - virtual void SendValueChanged(const std::vector<uint8>& value) override { + void SendValueChanged(const std::vector<uint8>& value) override { VLOG(2) << "Emitting a PropertiesChanged signal for characteristic value."; dbus::Signal signal( dbus::kDBusPropertiesInterface, diff --git a/chromeos/dbus/bluetooth_gatt_descriptor_client.cc b/chromeos/dbus/bluetooth_gatt_descriptor_client.cc index e079000..bb8c3f8 100644 --- a/chromeos/dbus/bluetooth_gatt_descriptor_client.cc +++ b/chromeos/dbus/bluetooth_gatt_descriptor_client.cc @@ -43,35 +43,33 @@ class BluetoothGattDescriptorClientImpl weak_ptr_factory_(this) { } - virtual ~BluetoothGattDescriptorClientImpl() { + ~BluetoothGattDescriptorClientImpl() override { object_manager_->UnregisterInterface( bluetooth_gatt_descriptor::kBluetoothGattDescriptorInterface); } // BluetoothGattDescriptorClientImpl override. - virtual void AddObserver( - BluetoothGattDescriptorClient::Observer* observer) override { + void AddObserver(BluetoothGattDescriptorClient::Observer* observer) override { DCHECK(observer); observers_.AddObserver(observer); } // BluetoothGattDescriptorClientImpl override. - virtual void RemoveObserver( + void RemoveObserver( BluetoothGattDescriptorClient::Observer* observer) override { DCHECK(observer); observers_.RemoveObserver(observer); } // BluetoothGattDescriptorClientImpl override. - virtual std::vector<dbus::ObjectPath> GetDescriptors() override { + std::vector<dbus::ObjectPath> GetDescriptors() override { DCHECK(object_manager_); return object_manager_->GetObjectsWithInterface( bluetooth_gatt_descriptor::kBluetoothGattDescriptorInterface); } // BluetoothGattDescriptorClientImpl override. - virtual Properties* GetProperties( - const dbus::ObjectPath& object_path) override { + Properties* GetProperties(const dbus::ObjectPath& object_path) override { DCHECK(object_manager_); return static_cast<Properties*>( object_manager_->GetProperties( @@ -80,9 +78,9 @@ class BluetoothGattDescriptorClientImpl } // BluetoothGattDescriptorClientImpl override. - virtual void ReadValue(const dbus::ObjectPath& object_path, - const ValueCallback& callback, - const ErrorCallback& error_callback) override { + void ReadValue(const dbus::ObjectPath& object_path, + const ValueCallback& callback, + const ErrorCallback& error_callback) override { dbus::ObjectProxy* object_proxy = object_manager_->GetObjectProxy(object_path); if (!object_proxy) { @@ -106,10 +104,10 @@ class BluetoothGattDescriptorClientImpl } // BluetoothGattDescriptorClientImpl override. - virtual void WriteValue(const dbus::ObjectPath& object_path, - const std::vector<uint8>& value, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void WriteValue(const dbus::ObjectPath& object_path, + const std::vector<uint8>& value, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::ObjectProxy* object_proxy = object_manager_->GetObjectProxy(object_path); if (!object_proxy) { @@ -135,8 +133,8 @@ class BluetoothGattDescriptorClientImpl } // dbus::ObjectManager::Interface override. - virtual dbus::PropertySet* CreateProperties( - dbus::ObjectProxy *object_proxy, + dbus::PropertySet* CreateProperties( + dbus::ObjectProxy* object_proxy, const dbus::ObjectPath& object_path, const std::string& interface_name) override { Properties* properties = new Properties( @@ -149,16 +147,16 @@ class BluetoothGattDescriptorClientImpl } // dbus::ObjectManager::Interface override. - 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 { VLOG(2) << "Remote GATT descriptor added: " << object_path.value(); FOR_EACH_OBSERVER(BluetoothGattDescriptorClient::Observer, observers_, GattDescriptorAdded(object_path)); } // dbus::ObjectManager::Interface override. - 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 { VLOG(2) << "Remote GATT descriptor removed: " << object_path.value(); FOR_EACH_OBSERVER(BluetoothGattDescriptorClient::Observer, observers_, GattDescriptorRemoved(object_path)); @@ -166,7 +164,7 @@ class BluetoothGattDescriptorClientImpl protected: // chromeos::DBusClient override. - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { object_manager_ = bus->GetObjectManager( bluetooth_object_manager::kBluetoothObjectManagerServiceName, dbus::ObjectPath( diff --git a/chromeos/dbus/bluetooth_gatt_descriptor_client.h b/chromeos/dbus/bluetooth_gatt_descriptor_client.h index c3f24ac..0db53fe 100644 --- a/chromeos/dbus/bluetooth_gatt_descriptor_client.h +++ b/chromeos/dbus/bluetooth_gatt_descriptor_client.h @@ -32,7 +32,7 @@ class CHROMEOS_EXPORT BluetoothGattDescriptorClient : public DBusClient { Properties(dbus::ObjectProxy* object_proxy, const std::string& interface_name, const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; }; // Interface for observing changes from a remote GATT characteristic @@ -61,7 +61,7 @@ class CHROMEOS_EXPORT BluetoothGattDescriptorClient : public DBusClient { const std::string& error_message)> ErrorCallback; typedef base::Callback<void(const std::vector<uint8>& value)> ValueCallback; - virtual ~BluetoothGattDescriptorClient(); + ~BluetoothGattDescriptorClient() override; // Adds and removes observers for events on all remote GATT descriptors. Check // the |object_path| parameter of observer methods to determine which GATT diff --git a/chromeos/dbus/bluetooth_gatt_descriptor_service_provider.cc b/chromeos/dbus/bluetooth_gatt_descriptor_service_provider.cc index ac8373e..8c49459 100644 --- a/chromeos/dbus/bluetooth_gatt_descriptor_service_provider.cc +++ b/chromeos/dbus/bluetooth_gatt_descriptor_service_provider.cc @@ -80,14 +80,14 @@ class BluetoothGattDescriptorServiceProviderImpl weak_ptr_factory_.GetWeakPtr())); } - virtual ~BluetoothGattDescriptorServiceProviderImpl() { + ~BluetoothGattDescriptorServiceProviderImpl() override { VLOG(1) << "Cleaning up Bluetooth GATT characteristic descriptor: " << object_path_.value(); bus_->UnregisterExportedObject(object_path_); } // BluetoothGattDescriptorServiceProvider override. - virtual void SendValueChanged(const std::vector<uint8>& value) override { + void SendValueChanged(const std::vector<uint8>& value) override { VLOG(2) << "Emitting a PropertiesChanged signal for descriptor value."; dbus::Signal signal( dbus::kDBusPropertiesInterface, diff --git a/chromeos/dbus/bluetooth_gatt_manager_client.cc b/chromeos/dbus/bluetooth_gatt_manager_client.cc index 7455688..8ccbb69 100644 --- a/chromeos/dbus/bluetooth_gatt_manager_client.cc +++ b/chromeos/dbus/bluetooth_gatt_manager_client.cc @@ -24,14 +24,13 @@ class BluetoothGattManagerClientImpl : public BluetoothGattManagerClient { weak_ptr_factory_(this) { } - virtual ~BluetoothGattManagerClientImpl() { - } + ~BluetoothGattManagerClientImpl() override {} // BluetoothGattManagerClient override. - virtual void RegisterService(const dbus::ObjectPath& service_path, - const Options& options, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void RegisterService(const dbus::ObjectPath& service_path, + const Options& options, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call( bluetooth_gatt_manager::kBluetoothGattManagerInterface, bluetooth_gatt_manager::kRegisterService); @@ -57,9 +56,9 @@ class BluetoothGattManagerClientImpl : public BluetoothGattManagerClient { } // BluetoothGattManagerClient override. - virtual void UnregisterService(const dbus::ObjectPath& service_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void UnregisterService(const dbus::ObjectPath& service_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call( bluetooth_gatt_manager::kBluetoothGattManagerInterface, bluetooth_gatt_manager::kUnregisterService); @@ -79,7 +78,7 @@ class BluetoothGattManagerClientImpl : public BluetoothGattManagerClient { protected: // chromeos::DBusClient override. - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { DCHECK(bus); object_proxy_ = bus->GetObjectProxy( bluetooth_gatt_manager::kBluetoothGattManagerServiceName, diff --git a/chromeos/dbus/bluetooth_gatt_manager_client.h b/chromeos/dbus/bluetooth_gatt_manager_client.h index b2eda69..155c2b5 100644 --- a/chromeos/dbus/bluetooth_gatt_manager_client.h +++ b/chromeos/dbus/bluetooth_gatt_manager_client.h @@ -24,7 +24,7 @@ class CHROMEOS_EXPORT BluetoothGattManagerClient : public DBusClient { // later as we know more about how this will be used. }; - virtual ~BluetoothGattManagerClient(); + ~BluetoothGattManagerClient() override; // The ErrorCallback is used by GATT manager methods to indicate failure. It // receives two arguments: the name of the error in |error_name| and an diff --git a/chromeos/dbus/bluetooth_gatt_service_client.cc b/chromeos/dbus/bluetooth_gatt_service_client.cc index 4c9dc04..77e14f3 100644 --- a/chromeos/dbus/bluetooth_gatt_service_client.cc +++ b/chromeos/dbus/bluetooth_gatt_service_client.cc @@ -38,35 +38,32 @@ class BluetoothGattServiceClientImpl : public BluetoothGattServiceClient, weak_ptr_factory_(this) { } - virtual ~BluetoothGattServiceClientImpl() { + ~BluetoothGattServiceClientImpl() override { object_manager_->UnregisterInterface( bluetooth_gatt_service::kBluetoothGattServiceInterface); } // BluetoothGattServiceClientImpl override. - virtual void AddObserver( - BluetoothGattServiceClient::Observer* observer) override { + void AddObserver(BluetoothGattServiceClient::Observer* observer) override { DCHECK(observer); observers_.AddObserver(observer); } // BluetoothGattServiceClientImpl override. - virtual void RemoveObserver( - BluetoothGattServiceClient::Observer* observer) override { + void RemoveObserver(BluetoothGattServiceClient::Observer* observer) override { DCHECK(observer); observers_.RemoveObserver(observer); } // BluetoothGattServiceClientImpl override. - virtual std::vector<dbus::ObjectPath> GetServices() override { + std::vector<dbus::ObjectPath> GetServices() override { DCHECK(object_manager_); return object_manager_->GetObjectsWithInterface( bluetooth_gatt_service::kBluetoothGattServiceInterface); } // BluetoothGattServiceClientImpl override. - virtual Properties* GetProperties( - const dbus::ObjectPath& object_path) override { + Properties* GetProperties(const dbus::ObjectPath& object_path) override { DCHECK(object_manager_); return static_cast<Properties*>( object_manager_->GetProperties( @@ -75,8 +72,8 @@ class BluetoothGattServiceClientImpl : public BluetoothGattServiceClient, } // dbus::ObjectManager::Interface override. - virtual dbus::PropertySet* CreateProperties( - dbus::ObjectProxy *object_proxy, + dbus::PropertySet* CreateProperties( + dbus::ObjectProxy* object_proxy, const dbus::ObjectPath& object_path, const std::string& interface_name) override { Properties* properties = new Properties( @@ -89,16 +86,16 @@ class BluetoothGattServiceClientImpl : public BluetoothGattServiceClient, } // dbus::ObjectManager::Interface override. - 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 { VLOG(2) << "Remote GATT service added: " << object_path.value(); FOR_EACH_OBSERVER(BluetoothGattServiceClient::Observer, observers_, GattServiceAdded(object_path)); } // dbus::ObjectManager::Interface override. - 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 { VLOG(2) << "Remote GATT service removed: " << object_path.value(); FOR_EACH_OBSERVER(BluetoothGattServiceClient::Observer, observers_, GattServiceRemoved(object_path)); @@ -106,7 +103,7 @@ class BluetoothGattServiceClientImpl : public BluetoothGattServiceClient, protected: // chromeos::DBusClient override. - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { object_manager_ = bus->GetObjectManager( bluetooth_object_manager::kBluetoothObjectManagerServiceName, dbus::ObjectPath( diff --git a/chromeos/dbus/bluetooth_gatt_service_client.h b/chromeos/dbus/bluetooth_gatt_service_client.h index 36d2123..080ca8f 100644 --- a/chromeos/dbus/bluetooth_gatt_service_client.h +++ b/chromeos/dbus/bluetooth_gatt_service_client.h @@ -41,7 +41,7 @@ class CHROMEOS_EXPORT BluetoothGattServiceClient : public DBusClient { Properties(dbus::ObjectProxy* object_proxy, const std::string& interface_name, const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; }; // Interface for observing changes from a remote GATT service. @@ -63,7 +63,7 @@ class CHROMEOS_EXPORT BluetoothGattServiceClient : public DBusClient { const std::string& property_name) {} }; - virtual ~BluetoothGattServiceClient(); + ~BluetoothGattServiceClient() override; // Adds and removes observers for events on all remote GATT services. Check // the |object_path| parameter of observer methods to determine which GATT diff --git a/chromeos/dbus/bluetooth_gatt_service_service_provider.cc b/chromeos/dbus/bluetooth_gatt_service_service_provider.cc index 4e4c8ce..7aeed9b 100644 --- a/chromeos/dbus/bluetooth_gatt_service_service_provider.cc +++ b/chromeos/dbus/bluetooth_gatt_service_service_provider.cc @@ -71,7 +71,7 @@ class BluetoothGattServiceServiceProviderImpl weak_ptr_factory_.GetWeakPtr())); } - virtual ~BluetoothGattServiceServiceProviderImpl() { + ~BluetoothGattServiceServiceProviderImpl() override { VLOG(1) << "Cleaning up Bluetooth GATT service: " << object_path_.value(); bus_->UnregisterExportedObject(object_path_); } diff --git a/chromeos/dbus/bluetooth_input_client.cc b/chromeos/dbus/bluetooth_input_client.cc index a433538..376e1de 100644 --- a/chromeos/dbus/bluetooth_input_client.cc +++ b/chromeos/dbus/bluetooth_input_client.cc @@ -36,27 +36,25 @@ class BluetoothInputClientImpl public: BluetoothInputClientImpl() : object_manager_(NULL), weak_ptr_factory_(this) {} - virtual ~BluetoothInputClientImpl() { + ~BluetoothInputClientImpl() override { object_manager_->UnregisterInterface( bluetooth_input::kBluetoothInputInterface); } // BluetoothInputClient override. - virtual void AddObserver(BluetoothInputClient::Observer* observer) - override { + void AddObserver(BluetoothInputClient::Observer* observer) override { DCHECK(observer); observers_.AddObserver(observer); } // BluetoothInputClient override. - virtual void RemoveObserver(BluetoothInputClient::Observer* observer) - override { + void RemoveObserver(BluetoothInputClient::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 { @@ -70,8 +68,7 @@ class BluetoothInputClientImpl } // BluetoothInputClient override. - virtual Properties* GetProperties(const dbus::ObjectPath& object_path) - override { + Properties* GetProperties(const dbus::ObjectPath& object_path) override { return static_cast<Properties*>( object_manager_->GetProperties( object_path, @@ -79,7 +76,7 @@ class BluetoothInputClientImpl } protected: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { object_manager_ = bus->GetObjectManager( bluetooth_object_manager::kBluetoothObjectManagerServiceName, dbus::ObjectPath( @@ -91,16 +88,16 @@ class BluetoothInputClientImpl private: // Called by dbus::ObjectManager when an object with the input 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(BluetoothInputClient::Observer, observers_, InputAdded(object_path)); } // Called by dbus::ObjectManager when an object with the input 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(BluetoothInputClient::Observer, observers_, InputRemoved(object_path)); } diff --git a/chromeos/dbus/bluetooth_input_client.h b/chromeos/dbus/bluetooth_input_client.h index 5e4b8d5..02abf99 100644 --- a/chromeos/dbus/bluetooth_input_client.h +++ b/chromeos/dbus/bluetooth_input_client.h @@ -29,7 +29,7 @@ class CHROMEOS_EXPORT BluetoothInputClient : public DBusClient { Properties(dbus::ObjectProxy* object_proxy, const std::string& interface_name, const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; }; // Interface for observing changes from a remote bluetooth input device. @@ -54,7 +54,7 @@ class CHROMEOS_EXPORT BluetoothInputClient : public DBusClient { const std::string& property_name) {} }; - virtual ~BluetoothInputClient(); + ~BluetoothInputClient() override; // Adds and removes observers for events on all remote bluetooth input // devices. Check the |object_path| parameter of observer methods to diff --git a/chromeos/dbus/bluetooth_profile_manager_client.cc b/chromeos/dbus/bluetooth_profile_manager_client.cc index c5a6205..9f9724d 100644 --- a/chromeos/dbus/bluetooth_profile_manager_client.cc +++ b/chromeos/dbus/bluetooth_profile_manager_client.cc @@ -30,15 +30,14 @@ class BluetoothProfileManagerClientImpl public: BluetoothProfileManagerClientImpl() : weak_ptr_factory_(this) {} - virtual ~BluetoothProfileManagerClientImpl() { - } + ~BluetoothProfileManagerClientImpl() override {} // BluetoothProfileManagerClient override. - virtual void RegisterProfile(const dbus::ObjectPath& profile_path, - const std::string& uuid, - const Options& options, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void RegisterProfile(const dbus::ObjectPath& profile_path, + const std::string& uuid, + const Options& options, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call( bluetooth_profile_manager::kBluetoothProfileManagerInterface, bluetooth_profile_manager::kRegisterProfile); @@ -169,9 +168,9 @@ class BluetoothProfileManagerClientImpl } // BluetoothProfileManagerClient override. - virtual void UnregisterProfile(const dbus::ObjectPath& profile_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void UnregisterProfile(const dbus::ObjectPath& profile_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call( bluetooth_profile_manager::kBluetoothProfileManagerInterface, bluetooth_profile_manager::kUnregisterProfile); @@ -189,7 +188,7 @@ class BluetoothProfileManagerClientImpl } protected: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { DCHECK(bus); object_proxy_ = bus->GetObjectProxy( bluetooth_profile_manager::kBluetoothProfileManagerServiceName, diff --git a/chromeos/dbus/bluetooth_profile_manager_client.h b/chromeos/dbus/bluetooth_profile_manager_client.h index 8588e51..2fa48f6 100644 --- a/chromeos/dbus/bluetooth_profile_manager_client.h +++ b/chromeos/dbus/bluetooth_profile_manager_client.h @@ -69,7 +69,7 @@ class CHROMEOS_EXPORT BluetoothProfileManagerClient : public DBusClient { scoped_ptr<uint16> features; }; - virtual ~BluetoothProfileManagerClient(); + ~BluetoothProfileManagerClient() override; // The ErrorCallback is used by adapter methods to indicate failure. // It receives two arguments: the name of the error in |error_name| and diff --git a/chromeos/dbus/bluetooth_profile_service_provider.cc b/chromeos/dbus/bluetooth_profile_service_provider.cc index 16bc2e8..6ebb54a 100644 --- a/chromeos/dbus/bluetooth_profile_service_provider.cc +++ b/chromeos/dbus/bluetooth_profile_service_provider.cc @@ -69,7 +69,7 @@ class BluetoothProfileServiceProviderImpl weak_ptr_factory_.GetWeakPtr())); } - virtual ~BluetoothProfileServiceProviderImpl() { + ~BluetoothProfileServiceProviderImpl() override { VLOG(1) << "Cleaning up Bluetooth Profile: " << object_path_.value(); // Unregister the object path so we can reuse with a new agent. diff --git a/chromeos/dbus/cras_audio_client.cc b/chromeos/dbus/cras_audio_client.cc index 189a272..e70ba2a 100644 --- a/chromeos/dbus/cras_audio_client.cc +++ b/chromeos/dbus/cras_audio_client.cc @@ -24,23 +24,22 @@ class CrasAudioClientImpl : public CrasAudioClient { public: CrasAudioClientImpl() : cras_proxy_(NULL), weak_ptr_factory_(this) {} - virtual ~CrasAudioClientImpl() { - } + ~CrasAudioClientImpl() override {} // CrasAudioClient overrides: - virtual void AddObserver(Observer* observer) override { + void AddObserver(Observer* observer) override { observers_.AddObserver(observer); } - virtual void RemoveObserver(Observer* observer) override { + void RemoveObserver(Observer* observer) override { observers_.RemoveObserver(observer); } - virtual bool HasObserver(const Observer* observer) const override { + bool HasObserver(const Observer* observer) const override { return observers_.HasObserver(observer); } - virtual void GetVolumeState(const GetVolumeStateCallback& callback) override { + void GetVolumeState(const GetVolumeStateCallback& callback) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kGetVolumeState); cras_proxy_->CallMethod( @@ -50,8 +49,8 @@ class CrasAudioClientImpl : public CrasAudioClient { weak_ptr_factory_.GetWeakPtr(), callback)); } - virtual void GetNodes(const GetNodesCallback& callback, - const ErrorCallback& error_callback) override { + void GetNodes(const GetNodesCallback& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kGetNodes); cras_proxy_->CallMethodWithErrorCallback( @@ -63,7 +62,7 @@ class CrasAudioClientImpl : public CrasAudioClient { weak_ptr_factory_.GetWeakPtr(), error_callback)); } - virtual void SetOutputNodeVolume(uint64 node_id, int32 volume) override { + void SetOutputNodeVolume(uint64 node_id, int32 volume) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kSetOutputNodeVolume); dbus::MessageWriter writer(&method_call); @@ -75,7 +74,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void SetOutputUserMute(bool mute_on) override { + void SetOutputUserMute(bool mute_on) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kSetOutputUserMute); dbus::MessageWriter writer(&method_call); @@ -86,7 +85,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void SetInputNodeGain(uint64 node_id, int32 input_gain) override { + void SetInputNodeGain(uint64 node_id, int32 input_gain) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kSetInputNodeGain); dbus::MessageWriter writer(&method_call); @@ -98,7 +97,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void SetInputMute(bool mute_on) override { + void SetInputMute(bool mute_on) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kSetInputMute); dbus::MessageWriter writer(&method_call); @@ -109,7 +108,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void SetActiveOutputNode(uint64 node_id) override { + void SetActiveOutputNode(uint64 node_id) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kSetActiveOutputNode); dbus::MessageWriter writer(&method_call); @@ -120,7 +119,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void SetActiveInputNode(uint64 node_id) override { + void SetActiveInputNode(uint64 node_id) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kSetActiveInputNode); dbus::MessageWriter writer(&method_call); @@ -131,7 +130,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void AddActiveInputNode(uint64 node_id) override { + void AddActiveInputNode(uint64 node_id) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kAddActiveInputNode); dbus::MessageWriter writer(&method_call); @@ -142,7 +141,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void RemoveActiveInputNode(uint64 node_id) override { + void RemoveActiveInputNode(uint64 node_id) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kRemoveActiveInputNode); dbus::MessageWriter writer(&method_call); @@ -153,7 +152,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void AddActiveOutputNode(uint64 node_id) override { + void AddActiveOutputNode(uint64 node_id) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kAddActiveOutputNode); dbus::MessageWriter writer(&method_call); @@ -163,7 +162,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void RemoveActiveOutputNode(uint64 node_id) override { + void RemoveActiveOutputNode(uint64 node_id) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kRemoveActiveOutputNode); dbus::MessageWriter writer(&method_call); @@ -173,7 +172,7 @@ class CrasAudioClientImpl : public CrasAudioClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void SwapLeftRight(uint64 node_id, bool swap) override { + void SwapLeftRight(uint64 node_id, bool swap) override { dbus::MethodCall method_call(cras::kCrasControlInterface, cras::kSwapLeftRight); dbus::MessageWriter writer(&method_call); @@ -185,7 +184,7 @@ class CrasAudioClientImpl : public CrasAudioClient { } protected: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { cras_proxy_ = bus->GetObjectProxy(cras::kCrasServiceName, dbus::ObjectPath(cras::kCrasServicePath)); diff --git a/chromeos/dbus/cras_audio_client.h b/chromeos/dbus/cras_audio_client.h index be93eaf..4b2d7eb 100644 --- a/chromeos/dbus/cras_audio_client.h +++ b/chromeos/dbus/cras_audio_client.h @@ -43,7 +43,7 @@ class CHROMEOS_EXPORT CrasAudioClient : public DBusClient { virtual ~Observer(); }; - virtual ~CrasAudioClient(); + ~CrasAudioClient() override; // Adds and removes the observer. virtual void AddObserver(Observer* observer) = 0; diff --git a/chromeos/dbus/cros_disks_client.cc b/chromeos/dbus/cros_disks_client.cc index 9819a31..71a71ea 100644 --- a/chromeos/dbus/cros_disks_client.cc +++ b/chromeos/dbus/cros_disks_client.cc @@ -99,11 +99,11 @@ class CrosDisksClientImpl : public CrosDisksClient { CrosDisksClientImpl() : proxy_(NULL), weak_ptr_factory_(this) {} // CrosDisksClient override. - virtual void Mount(const std::string& source_path, - const std::string& source_format, - const std::string& mount_label, - const base::Closure& callback, - const base::Closure& error_callback) override { + void Mount(const std::string& source_path, + const std::string& source_format, + const std::string& mount_label, + const base::Closure& callback, + const base::Closure& error_callback) override { dbus::MethodCall method_call(cros_disks::kCrosDisksInterface, cros_disks::kMount); dbus::MessageWriter writer(&method_call); @@ -127,10 +127,10 @@ class CrosDisksClientImpl : public CrosDisksClient { } // CrosDisksClient override. - virtual void Unmount(const std::string& device_path, - UnmountOptions options, - const base::Closure& callback, - const base::Closure& error_callback) override { + void Unmount(const std::string& device_path, + UnmountOptions options, + const base::Closure& callback, + const base::Closure& error_callback) override { dbus::MethodCall method_call(cros_disks::kCrosDisksInterface, cros_disks::kUnmount); dbus::MessageWriter writer(&method_call); @@ -151,7 +151,7 @@ class CrosDisksClientImpl : public CrosDisksClient { } // CrosDisksClient override. - virtual void EnumerateAutoMountableDevices( + void EnumerateAutoMountableDevices( const EnumerateAutoMountableDevicesCallback& callback, const base::Closure& error_callback) override { dbus::MethodCall method_call(cros_disks::kCrosDisksInterface, @@ -165,9 +165,8 @@ class CrosDisksClientImpl : public CrosDisksClient { } // CrosDisksClient override. - virtual void EnumerateMountEntries( - const EnumerateMountEntriesCallback& callback, - const base::Closure& error_callback) override { + void EnumerateMountEntries(const EnumerateMountEntriesCallback& callback, + const base::Closure& error_callback) override { dbus::MethodCall method_call(cros_disks::kCrosDisksInterface, cros_disks::kEnumerateMountEntries); proxy_->CallMethod( @@ -179,10 +178,10 @@ class CrosDisksClientImpl : public CrosDisksClient { } // CrosDisksClient override. - virtual void Format(const std::string& device_path, - const std::string& filesystem, - const base::Closure& callback, - const base::Closure& error_callback) override { + void Format(const std::string& device_path, + const std::string& filesystem, + const base::Closure& callback, + const base::Closure& error_callback) override { dbus::MethodCall method_call(cros_disks::kCrosDisksInterface, cros_disks::kFormat); dbus::MessageWriter writer(&method_call); @@ -200,10 +199,9 @@ class CrosDisksClientImpl : public CrosDisksClient { } // CrosDisksClient override. - virtual void GetDeviceProperties( - const std::string& device_path, - const GetDevicePropertiesCallback& callback, - const base::Closure& error_callback) override { + void GetDeviceProperties(const std::string& device_path, + const GetDevicePropertiesCallback& callback, + const base::Closure& error_callback) override { dbus::MethodCall method_call(cros_disks::kCrosDisksInterface, cros_disks::kGetDeviceProperties); dbus::MessageWriter writer(&method_call); @@ -218,7 +216,7 @@ class CrosDisksClientImpl : public CrosDisksClient { } // CrosDisksClient override. - virtual void SetMountEventHandler( + void SetMountEventHandler( const MountEventHandler& mount_event_handler) override { static const SignalEventTuple kSignalEventTuples[] = { { cros_disks::kDeviceAdded, CROS_DISKS_DEVICE_ADDED }, @@ -244,7 +242,7 @@ class CrosDisksClientImpl : public CrosDisksClient { } // CrosDisksClient override. - virtual void SetMountCompletedHandler( + void SetMountCompletedHandler( const MountCompletedHandler& mount_completed_handler) override { proxy_->ConnectToSignal( cros_disks::kCrosDisksInterface, @@ -257,7 +255,7 @@ class CrosDisksClientImpl : public CrosDisksClient { } // CrosDisksClient override. - virtual void SetFormatCompletedHandler( + void SetFormatCompletedHandler( const FormatCompletedHandler& format_completed_handler) override { proxy_->ConnectToSignal( cros_disks::kCrosDisksInterface, @@ -270,7 +268,7 @@ class CrosDisksClientImpl : public CrosDisksClient { } protected: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { proxy_ = bus->GetObjectProxy( cros_disks::kCrosDisksServiceName, dbus::ObjectPath(cros_disks::kCrosDisksServicePath)); diff --git a/chromeos/dbus/cros_disks_client.h b/chromeos/dbus/cros_disks_client.h index 49b5432..840b295 100644 --- a/chromeos/dbus/cros_disks_client.h +++ b/chromeos/dbus/cros_disks_client.h @@ -255,7 +255,7 @@ class CHROMEOS_EXPORT CrosDisksClient : public DBusClient { const std::string& device_path)> MountEventHandler; - virtual ~CrosDisksClient(); + ~CrosDisksClient() override; // Calls Mount method. |callback| is called after the method call succeeds, // otherwise, |error_callback| is called. diff --git a/chromeos/dbus/cryptohome_client.cc b/chromeos/dbus/cryptohome_client.cc index ed5763a..4ccb116 100644 --- a/chromeos/dbus/cryptohome_client.cc +++ b/chromeos/dbus/cryptohome_client.cc @@ -37,7 +37,7 @@ class CryptohomeClientImpl : public CryptohomeClient { CryptohomeClientImpl() : proxy_(NULL), weak_ptr_factory_(this) {} // CryptohomeClient override. - virtual void SetAsyncCallStatusHandlers( + void SetAsyncCallStatusHandlers( const AsyncCallStatusHandler& handler, const AsyncCallStatusWithDataHandler& data_handler) override { async_call_status_handler_ = handler; @@ -45,35 +45,35 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void ResetAsyncCallStatusHandlers() override { + void ResetAsyncCallStatusHandlers() override { async_call_status_handler_.Reset(); async_call_status_data_handler_.Reset(); } // CryptohomeClient override. - virtual void WaitForServiceToBeAvailable( + void WaitForServiceToBeAvailable( const WaitForServiceToBeAvailableCallback& callback) override { proxy_->WaitForServiceToBeAvailable(callback); } // CryptohomeClient override. - virtual void IsMounted(const BoolDBusMethodCallback& callback) override { + void IsMounted(const BoolDBusMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeIsMounted); CallBoolMethod(&method_call, callback); } // CryptohomeClient override. - virtual bool Unmount(bool *success) override { + bool Unmount(bool* success) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeUnmount); return CallBoolMethodAndBlock(&method_call, success); } // CryptohomeClient override. - virtual void AsyncCheckKey(const std::string& username, - const std::string& key, - const AsyncMethodCallback& callback) override { + void AsyncCheckKey(const std::string& username, + const std::string& key, + const AsyncMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeAsyncCheckKey); dbus::MessageWriter writer(&method_call); @@ -86,10 +86,10 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void AsyncMigrateKey(const std::string& username, - const std::string& from_key, - const std::string& to_key, - const AsyncMethodCallback& callback) override { + void AsyncMigrateKey(const std::string& username, + const std::string& from_key, + const std::string& to_key, + const AsyncMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeAsyncMigrateKey); dbus::MessageWriter writer(&method_call); @@ -103,8 +103,8 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void AsyncRemove(const std::string& username, - const AsyncMethodCallback& callback) override { + void AsyncRemove(const std::string& username, + const AsyncMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeAsyncRemove); dbus::MessageWriter writer(&method_call); @@ -116,7 +116,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void GetSystemSalt(const GetSystemSaltCallback& callback) override { + void GetSystemSalt(const GetSystemSaltCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeGetSystemSalt); proxy_->CallMethod(&method_call, kTpmDBusTimeoutMs , @@ -126,9 +126,8 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override, - virtual void GetSanitizedUsername( - const std::string& username, - const StringDBusMethodCallback& callback) override { + void GetSanitizedUsername(const std::string& username, + const StringDBusMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeGetSanitizedUsername); dbus::MessageWriter writer(&method_call); @@ -140,7 +139,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual std::string BlockingGetSanitizedUsername( + std::string BlockingGetSanitizedUsername( const std::string& username) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeGetSanitizedUsername); @@ -160,10 +159,10 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void AsyncMount(const std::string& username, - const std::string& key, - int flags, - const AsyncMethodCallback& callback) override { + void AsyncMount(const std::string& username, + const std::string& key, + int flags, + const AsyncMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeAsyncMount); dbus::MessageWriter writer(&method_call); @@ -180,10 +179,10 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void AsyncAddKey(const std::string& username, - const std::string& key, - const std::string& new_key, - const AsyncMethodCallback& callback) override { + void AsyncAddKey(const std::string& username, + const std::string& key, + const std::string& new_key, + const AsyncMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeAsyncAddKey); dbus::MessageWriter writer(&method_call); @@ -197,7 +196,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void AsyncMountGuest(const AsyncMethodCallback& callback) override { + void AsyncMountGuest(const AsyncMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeAsyncMountGuest); proxy_->CallMethod(&method_call, kTpmDBusTimeoutMs , @@ -207,9 +206,9 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void AsyncMountPublic(const std::string& public_mount_id, - int flags, - const AsyncMethodCallback& callback) override { + void AsyncMountPublic(const std::string& public_mount_id, + int flags, + const AsyncMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeAsyncMountPublic); dbus::MessageWriter writer(&method_call); @@ -223,14 +222,14 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void TpmIsReady(const BoolDBusMethodCallback& callback) override { + void TpmIsReady(const BoolDBusMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeTpmIsReady); CallBoolMethod(&method_call, callback); } // CryptohomeClient override. - virtual void TpmIsEnabled(const BoolDBusMethodCallback& callback) override { + void TpmIsEnabled(const BoolDBusMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeTpmIsEnabled); CallBoolMethod(&method_call, callback); @@ -238,15 +237,14 @@ class CryptohomeClientImpl : public CryptohomeClient { // CryptohomeClient override. // TODO(hashimoto): Remove this method. crbug.com/141006 - virtual bool CallTpmIsEnabledAndBlock(bool* enabled) override { + bool CallTpmIsEnabledAndBlock(bool* enabled) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeTpmIsEnabled); return CallBoolMethodAndBlock(&method_call, enabled); } // CryptohomeClient override. - virtual void TpmGetPassword( - const StringDBusMethodCallback& callback) override { + void TpmGetPassword(const StringDBusMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeTpmGetPassword); proxy_->CallMethod( @@ -257,7 +255,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void TpmIsOwned(const BoolDBusMethodCallback& callback) override { + void TpmIsOwned(const BoolDBusMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeTpmIsOwned); CallBoolMethod(&method_call, callback); @@ -265,15 +263,14 @@ class CryptohomeClientImpl : public CryptohomeClient { // CryptohomeClient override. // TODO(hashimoto): Remove this method. crbug.com/141012 - virtual bool CallTpmIsOwnedAndBlock(bool* owned) override { + bool CallTpmIsOwnedAndBlock(bool* owned) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeTpmIsOwned); return CallBoolMethodAndBlock(&method_call, owned); } // CryptohomeClient override. - virtual void TpmIsBeingOwned(const BoolDBusMethodCallback& callback) - override { + void TpmIsBeingOwned(const BoolDBusMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeTpmIsBeingOwned); CallBoolMethod(&method_call, callback); @@ -281,23 +278,21 @@ class CryptohomeClientImpl : public CryptohomeClient { // CryptohomeClient override. // TODO(hashimoto): Remove this method. crbug.com/141011 - virtual bool CallTpmIsBeingOwnedAndBlock(bool* owning) override { + bool CallTpmIsBeingOwnedAndBlock(bool* owning) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeTpmIsBeingOwned); return CallBoolMethodAndBlock(&method_call, owning); } // CryptohomeClient override. - virtual void TpmCanAttemptOwnership( - const VoidDBusMethodCallback& callback) override { + void TpmCanAttemptOwnership(const VoidDBusMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeTpmCanAttemptOwnership); CallVoidMethod(&method_call, callback); } // CryptohomeClient overrides. - virtual void TpmClearStoredPassword(const VoidDBusMethodCallback& callback) - override { + void TpmClearStoredPassword(const VoidDBusMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeTpmClearStoredPassword); CallVoidMethod(&method_call, callback); @@ -305,7 +300,7 @@ class CryptohomeClientImpl : public CryptohomeClient { // CryptohomeClient override. // TODO(hashimoto): Remove this method. crbug.com/141010 - virtual bool CallTpmClearStoredPasswordAndBlock() override { + bool CallTpmClearStoredPasswordAndBlock() override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeTpmClearStoredPassword); scoped_ptr<dbus::Response> response( @@ -314,15 +309,14 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void Pkcs11IsTpmTokenReady(const BoolDBusMethodCallback& callback) - override { + void Pkcs11IsTpmTokenReady(const BoolDBusMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomePkcs11IsTpmTokenReady); CallBoolMethod(&method_call, callback); } // CryptohomeClient override. - virtual void Pkcs11GetTpmTokenInfo( + void Pkcs11GetTpmTokenInfo( const Pkcs11GetTpmTokenInfoCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomePkcs11GetTpmTokenInfo); @@ -335,7 +329,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void Pkcs11GetTpmTokenInfoForUser( + void Pkcs11GetTpmTokenInfoForUser( const std::string& user_email, const Pkcs11GetTpmTokenInfoCallback& callback) override { dbus::MethodCall method_call( @@ -352,9 +346,9 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual bool InstallAttributesGet(const std::string& name, - std::vector<uint8>* value, - bool* successful) override { + bool InstallAttributesGet(const std::string& name, + std::vector<uint8>* value, + bool* successful) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeInstallAttributesGet); dbus::MessageWriter writer(&method_call); @@ -374,9 +368,9 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual bool InstallAttributesSet(const std::string& name, - const std::vector<uint8>& value, - bool* successful) override { + bool InstallAttributesSet(const std::string& name, + const std::vector<uint8>& value, + bool* successful) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeInstallAttributesSet); dbus::MessageWriter writer(&method_call); @@ -386,7 +380,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual bool InstallAttributesFinalize(bool* successful) override { + bool InstallAttributesFinalize(bool* successful) override { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeInstallAttributesFinalize); @@ -394,8 +388,8 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void InstallAttributesIsReady(const BoolDBusMethodCallback& callback) - override { + void InstallAttributesIsReady( + const BoolDBusMethodCallback& callback) override { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeInstallAttributesIsReady); @@ -403,7 +397,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual bool InstallAttributesIsInvalid(bool* is_invalid) override { + bool InstallAttributesIsInvalid(bool* is_invalid) override { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeInstallAttributesIsInvalid); @@ -411,8 +405,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual bool InstallAttributesIsFirstInstall( - bool* is_first_install) override { + bool InstallAttributesIsFirstInstall(bool* is_first_install) override { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeInstallAttributesIsFirstInstall); @@ -420,8 +413,8 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void TpmAttestationIsPrepared( - const BoolDBusMethodCallback& callback) override { + void TpmAttestationIsPrepared( + const BoolDBusMethodCallback& callback) override { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeTpmIsAttestationPrepared); @@ -429,8 +422,8 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void TpmAttestationIsEnrolled( - const BoolDBusMethodCallback& callback) override { + void TpmAttestationIsEnrolled( + const BoolDBusMethodCallback& callback) override { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeTpmIsAttestationEnrolled); @@ -438,7 +431,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void AsyncTpmAttestationCreateEnrollRequest( + void AsyncTpmAttestationCreateEnrollRequest( attestation::PrivacyCAType pca_type, const AsyncMethodCallback& callback) override { dbus::MethodCall method_call( @@ -453,10 +446,9 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void AsyncTpmAttestationEnroll( - attestation::PrivacyCAType pca_type, - const std::string& pca_response, - const AsyncMethodCallback& callback) override { + void AsyncTpmAttestationEnroll(attestation::PrivacyCAType pca_type, + const std::string& pca_response, + const AsyncMethodCallback& callback) override { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeAsyncTpmAttestationEnroll); @@ -472,7 +464,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void AsyncTpmAttestationCreateCertRequest( + void AsyncTpmAttestationCreateCertRequest( attestation::PrivacyCAType pca_type, attestation::AttestationCertificateProfile certificate_profile, const std::string& user_id, @@ -493,7 +485,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void AsyncTpmAttestationFinishCertRequest( + void AsyncTpmAttestationFinishCertRequest( const std::string& pca_response, attestation::AttestationKeyType key_type, const std::string& user_id, @@ -517,7 +509,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void TpmAttestationDoesKeyExist( + void TpmAttestationDoesKeyExist( attestation::AttestationKeyType key_type, const std::string& user_id, const std::string& key_name, @@ -534,7 +526,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void TpmAttestationGetCertificate( + void TpmAttestationGetCertificate( attestation::AttestationKeyType key_type, const std::string& user_id, const std::string& key_name, @@ -554,11 +546,10 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void TpmAttestationGetPublicKey( - attestation::AttestationKeyType key_type, - const std::string& user_id, - const std::string& key_name, - const DataMethodCallback& callback) override { + void TpmAttestationGetPublicKey(attestation::AttestationKeyType key_type, + const std::string& user_id, + const std::string& key_name, + const DataMethodCallback& callback) override { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeTpmAttestationGetPublicKey); @@ -574,11 +565,10 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void TpmAttestationRegisterKey( - attestation::AttestationKeyType key_type, - const std::string& user_id, - const std::string& key_name, - const AsyncMethodCallback& callback) override { + void TpmAttestationRegisterKey(attestation::AttestationKeyType key_type, + const std::string& user_id, + const std::string& key_name, + const AsyncMethodCallback& callback) override { dbus::MethodCall method_call( cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeTpmAttestationRegisterKey); @@ -594,7 +584,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void TpmAttestationSignEnterpriseChallenge( + void TpmAttestationSignEnterpriseChallenge( attestation::AttestationKeyType key_type, const std::string& user_id, const std::string& key_name, @@ -626,7 +616,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void TpmAttestationSignSimpleChallenge( + void TpmAttestationSignSimpleChallenge( attestation::AttestationKeyType key_type, const std::string& user_id, const std::string& key_name, @@ -649,7 +639,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void TpmAttestationGetKeyPayload( + void TpmAttestationGetKeyPayload( attestation::AttestationKeyType key_type, const std::string& user_id, const std::string& key_name, @@ -669,7 +659,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void TpmAttestationSetKeyPayload( + void TpmAttestationSetKeyPayload( attestation::AttestationKeyType key_type, const std::string& user_id, const std::string& key_name, @@ -689,7 +679,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } // CryptohomeClient override. - virtual void TpmAttestationDeleteKeys( + void TpmAttestationDeleteKeys( attestation::AttestationKeyType key_type, const std::string& user_id, const std::string& key_prefix, @@ -705,11 +695,10 @@ class CryptohomeClientImpl : public CryptohomeClient { CallBoolMethod(&method_call, callback); } - virtual void GetKeyDataEx( - const cryptohome::AccountIdentifier& id, - const cryptohome::AuthorizationRequest& auth, - const cryptohome::GetKeyDataRequest& request, - const ProtobufMethodCallback& callback) override { + void GetKeyDataEx(const cryptohome::AccountIdentifier& id, + const cryptohome::AuthorizationRequest& auth, + const cryptohome::GetKeyDataRequest& request, + const ProtobufMethodCallback& callback) override { dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, cryptohome::kCryptohomeGetKeyDataEx); dbus::MessageWriter writer(&method_call); @@ -724,11 +713,10 @@ class CryptohomeClientImpl : public CryptohomeClient { callback)); } - virtual void CheckKeyEx( - const cryptohome::AccountIdentifier& id, - const cryptohome::AuthorizationRequest& auth, - const cryptohome::CheckKeyRequest& request, - const ProtobufMethodCallback& callback) override { + void CheckKeyEx(const cryptohome::AccountIdentifier& id, + const cryptohome::AuthorizationRequest& auth, + const cryptohome::CheckKeyRequest& request, + const ProtobufMethodCallback& callback) override { const char* method_name = cryptohome::kCryptohomeCheckKeyEx; dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, method_name); @@ -744,11 +732,10 @@ class CryptohomeClientImpl : public CryptohomeClient { callback)); } - virtual void MountEx( - const cryptohome::AccountIdentifier& id, - const cryptohome::AuthorizationRequest& auth, - const cryptohome::MountRequest& request, - const ProtobufMethodCallback& callback) override { + void MountEx(const cryptohome::AccountIdentifier& id, + const cryptohome::AuthorizationRequest& auth, + const cryptohome::MountRequest& request, + const ProtobufMethodCallback& callback) override { const char* method_name = cryptohome::kCryptohomeMountEx; dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, method_name); @@ -764,11 +751,10 @@ class CryptohomeClientImpl : public CryptohomeClient { callback)); } - virtual void AddKeyEx( - const cryptohome::AccountIdentifier& id, - const cryptohome::AuthorizationRequest& auth, - const cryptohome::AddKeyRequest& request, - const ProtobufMethodCallback& callback) override { + void AddKeyEx(const cryptohome::AccountIdentifier& id, + const cryptohome::AuthorizationRequest& auth, + const cryptohome::AddKeyRequest& request, + const ProtobufMethodCallback& callback) override { const char* method_name = cryptohome::kCryptohomeAddKeyEx; dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, method_name); @@ -784,11 +770,10 @@ class CryptohomeClientImpl : public CryptohomeClient { callback)); } - virtual void UpdateKeyEx( - const cryptohome::AccountIdentifier& id, - const cryptohome::AuthorizationRequest& auth, - const cryptohome::UpdateKeyRequest& request, - const ProtobufMethodCallback& callback) override { + void UpdateKeyEx(const cryptohome::AccountIdentifier& id, + const cryptohome::AuthorizationRequest& auth, + const cryptohome::UpdateKeyRequest& request, + const ProtobufMethodCallback& callback) override { const char* method_name = cryptohome::kCryptohomeUpdateKeyEx; dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, method_name); @@ -805,10 +790,10 @@ class CryptohomeClientImpl : public CryptohomeClient { callback)); } - virtual void RemoveKeyEx(const cryptohome::AccountIdentifier& id, - const cryptohome::AuthorizationRequest& auth, - const cryptohome::RemoveKeyRequest& request, - const ProtobufMethodCallback& callback) override { + void RemoveKeyEx(const cryptohome::AccountIdentifier& id, + const cryptohome::AuthorizationRequest& auth, + const cryptohome::RemoveKeyRequest& request, + const ProtobufMethodCallback& callback) override { const char* method_name = cryptohome::kCryptohomeRemoveKeyEx; dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, method_name); @@ -824,9 +809,8 @@ class CryptohomeClientImpl : public CryptohomeClient { callback)); } - virtual void GetBootAttribute( - const cryptohome::GetBootAttributeRequest& request, - const ProtobufMethodCallback& callback) override { + void GetBootAttribute(const cryptohome::GetBootAttributeRequest& request, + const ProtobufMethodCallback& callback) override { const char* method_name = cryptohome::kCryptohomeGetBootAttribute; dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, method_name); @@ -840,9 +824,8 @@ class CryptohomeClientImpl : public CryptohomeClient { callback)); } - virtual void SetBootAttribute( - const cryptohome::SetBootAttributeRequest& request, - const ProtobufMethodCallback& callback) override { + void SetBootAttribute(const cryptohome::SetBootAttributeRequest& request, + const ProtobufMethodCallback& callback) override { const char* method_name = cryptohome::kCryptohomeSetBootAttribute; dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, method_name); @@ -856,7 +839,7 @@ class CryptohomeClientImpl : public CryptohomeClient { callback)); } - virtual void FlushAndSignBootAttributes( + void FlushAndSignBootAttributes( const cryptohome::FlushAndSignBootAttributesRequest& request, const ProtobufMethodCallback& callback) override { const char* method_name = cryptohome::kCryptohomeFlushAndSignBootAttributes; @@ -873,7 +856,7 @@ class CryptohomeClientImpl : public CryptohomeClient { } protected: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { proxy_ = bus->GetObjectProxy( cryptohome::kCryptohomeServiceName, dbus::ObjectPath(cryptohome::kCryptohomeServicePath)); diff --git a/chromeos/dbus/cryptohome_client.h b/chromeos/dbus/cryptohome_client.h index 8212dd2..816c106 100644 --- a/chromeos/dbus/cryptohome_client.h +++ b/chromeos/dbus/cryptohome_client.h @@ -82,7 +82,7 @@ class CHROMEOS_EXPORT CryptohomeClient : public DBusClient { bool result, const cryptohome::BaseReply& reply)> ProtobufMethodCallback; - virtual ~CryptohomeClient(); + ~CryptohomeClient() override; // Factory function, creates a new instance and returns ownership. // For normal usage, access the singleton via DBusThreadManager::Get(). diff --git a/chromeos/dbus/debug_daemon_client.cc b/chromeos/dbus/debug_daemon_client.cc index 137b3f9..3e72384 100644 --- a/chromeos/dbus/debug_daemon_client.cc +++ b/chromeos/dbus/debug_daemon_client.cc @@ -42,13 +42,13 @@ class DebugDaemonClientImpl : public DebugDaemonClient { public: DebugDaemonClientImpl() : debugdaemon_proxy_(NULL), weak_ptr_factory_(this) {} - virtual ~DebugDaemonClientImpl() {} + ~DebugDaemonClientImpl() override {} // DebugDaemonClient override. - virtual void DumpDebugLogs(bool is_compressed, - base::File file, - scoped_refptr<base::TaskRunner> task_runner, - const GetDebugLogsCallback& callback) override { + void DumpDebugLogs(bool is_compressed, + base::File file, + scoped_refptr<base::TaskRunner> task_runner, + const GetDebugLogsCallback& callback) override { dbus::FileDescriptor* file_descriptor = new dbus::FileDescriptor; file_descriptor->PutValue(file.TakePlatformFile()); // Punt descriptor validity check to a worker thread; on return we'll @@ -64,8 +64,8 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } - virtual void SetDebugMode(const std::string& subsystem, - const SetDebugModeCallback& callback) override { + void SetDebugMode(const std::string& subsystem, + const SetDebugModeCallback& callback) override { dbus::MethodCall method_call(debugd::kDebugdInterface, debugd::kSetDebugMode); dbus::MessageWriter writer(&method_call); @@ -78,8 +78,9 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } - virtual void GetRoutes(bool numeric, bool ipv6, - const GetRoutesCallback& callback) override { + void GetRoutes(bool numeric, + bool ipv6, + const GetRoutesCallback& callback) override { dbus::MethodCall method_call(debugd::kDebugdInterface, debugd::kGetRoutes); dbus::MessageWriter writer(&method_call); @@ -103,8 +104,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } - virtual void GetNetworkStatus(const GetNetworkStatusCallback& callback) - override { + void GetNetworkStatus(const GetNetworkStatusCallback& callback) override { dbus::MethodCall method_call(debugd::kDebugdInterface, debugd::kGetNetworkStatus); debugdaemon_proxy_->CallMethod( @@ -115,8 +115,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } - virtual void GetModemStatus(const GetModemStatusCallback& callback) - override { + void GetModemStatus(const GetModemStatusCallback& callback) override { dbus::MethodCall method_call(debugd::kDebugdInterface, debugd::kGetModemStatus); debugdaemon_proxy_->CallMethod( @@ -127,8 +126,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } - virtual void GetWiMaxStatus(const GetWiMaxStatusCallback& callback) - override { + void GetWiMaxStatus(const GetWiMaxStatusCallback& callback) override { dbus::MethodCall method_call(debugd::kDebugdInterface, debugd::kGetWiMaxStatus); debugdaemon_proxy_->CallMethod( @@ -139,7 +137,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } - virtual void GetNetworkInterfaces( + void GetNetworkInterfaces( const GetNetworkInterfacesCallback& callback) override { dbus::MethodCall method_call(debugd::kDebugdInterface, debugd::kGetInterfaces); @@ -151,8 +149,8 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } - virtual void GetPerfData(uint32_t duration, - const GetPerfDataCallback& callback) override { + void GetPerfData(uint32_t duration, + const GetPerfDataCallback& callback) override { dbus::MethodCall method_call(debugd::kDebugdInterface, debugd::kGetRichPerfData); dbus::MessageWriter writer(&method_call); @@ -166,7 +164,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } - virtual void GetScrubbedLogs(const GetLogsCallback& callback) override { + void GetScrubbedLogs(const GetLogsCallback& callback) override { dbus::MethodCall method_call(debugd::kDebugdInterface, debugd::kGetFeedbackLogs); debugdaemon_proxy_->CallMethod( @@ -177,8 +175,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } - virtual void GetAllLogs(const GetLogsCallback& callback) - override { + void GetAllLogs(const GetLogsCallback& callback) override { dbus::MethodCall method_call(debugd::kDebugdInterface, debugd::kGetAllLogs); debugdaemon_proxy_->CallMethod( @@ -189,8 +186,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } - virtual void GetUserLogFiles( - const GetLogsCallback& callback) override { + void GetUserLogFiles(const GetLogsCallback& callback) override { dbus::MethodCall method_call(debugd::kDebugdInterface, debugd::kGetUserLogFiles); debugdaemon_proxy_->CallMethod( @@ -201,7 +197,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } - virtual void StartSystemTracing() override { + void StartSystemTracing() override { dbus::MethodCall method_call( debugd::kDebugdInterface, debugd::kSystraceStart); @@ -216,7 +212,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient { weak_ptr_factory_.GetWeakPtr())); } - virtual bool RequestStopSystemTracing( + bool RequestStopSystemTracing( scoped_refptr<base::TaskRunner> task_runner, const StopSystemTracingCallback& callback) override { if (pipe_reader_ != NULL) { @@ -245,8 +241,8 @@ class DebugDaemonClientImpl : public DebugDaemonClient { return true; } - virtual void TestICMP(const std::string& ip_address, - const TestICMPCallback& callback) override { + void TestICMP(const std::string& ip_address, + const TestICMPCallback& callback) override { dbus::MethodCall method_call(debugd::kDebugdInterface, debugd::kTestICMP); dbus::MessageWriter writer(&method_call); @@ -259,10 +255,9 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } - virtual void TestICMPWithOptions( - const std::string& ip_address, - const std::map<std::string, std::string>& options, - const TestICMPCallback& callback) override { + void TestICMPWithOptions(const std::string& ip_address, + const std::map<std::string, std::string>& options, + const TestICMPCallback& callback) override { dbus::MethodCall method_call(debugd::kDebugdInterface, debugd::kTestICMPWithOptions); dbus::MessageWriter writer(&method_call); @@ -292,7 +287,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } - virtual void UploadCrashes() override { + void UploadCrashes() override { dbus::MethodCall method_call(debugd::kDebugdInterface, debugd::kUploadCrashes); debugdaemon_proxy_->CallMethod( @@ -302,7 +297,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient { weak_ptr_factory_.GetWeakPtr())); } - virtual void EnableDebuggingFeatures( + void EnableDebuggingFeatures( const std::string& password, const EnableDebuggingCallback& callback) override { dbus::MethodCall method_call(debugd::kDebugdInterface, @@ -317,7 +312,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } - virtual void QueryDebuggingFeatures( + void QueryDebuggingFeatures( const QueryDevFeaturesCallback& callback) override { dbus::MethodCall method_call(debugd::kDebugdInterface, debugd::kQueryDevFeatures); @@ -330,7 +325,7 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } - virtual void RemoveRootfsVerification( + void RemoveRootfsVerification( const EnableDebuggingCallback& callback) override { dbus::MethodCall method_call(debugd::kDebugdInterface, debugd::kRemoveRootfsVerification); @@ -343,13 +338,13 @@ class DebugDaemonClientImpl : public DebugDaemonClient { callback)); } - virtual void WaitForServiceToBeAvailable( + void WaitForServiceToBeAvailable( const WaitForServiceToBeAvailableCallback& callback) override { debugdaemon_proxy_->WaitForServiceToBeAvailable(callback); } protected: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { debugdaemon_proxy_ = bus->GetObjectProxy(debugd::kDebugdServiceName, dbus::ObjectPath(debugd::kDebugdServicePath)); diff --git a/chromeos/dbus/debug_daemon_client.h b/chromeos/dbus/debug_daemon_client.h index b864e93..37cda58 100644 --- a/chromeos/dbus/debug_daemon_client.h +++ b/chromeos/dbus/debug_daemon_client.h @@ -23,7 +23,7 @@ namespace chromeos { // DebugDaemonClient is used to communicate with the debug daemon. class CHROMEOS_EXPORT DebugDaemonClient : public DBusClient { public: - virtual ~DebugDaemonClient(); + ~DebugDaemonClient() override; // Called once GetDebugLogs() is complete. Takes one parameter: // - succeeded: was the logs stored successfully. diff --git a/chromeos/dbus/easy_unlock_client.h b/chromeos/dbus/easy_unlock_client.h index 4d4b476..56307318 100644 --- a/chromeos/dbus/easy_unlock_client.h +++ b/chromeos/dbus/easy_unlock_client.h @@ -26,7 +26,7 @@ namespace chromeos { // OpenSSL (http://crbug.com/338888). class CHROMEOS_EXPORT EasyUnlockClient : public DBusClient { public: - virtual ~EasyUnlockClient(); + ~EasyUnlockClient() override; typedef base::Callback<void(const std::string& data)> DataCallback; diff --git a/chromeos/dbus/fake_bluetooth_adapter_client.h b/chromeos/dbus/fake_bluetooth_adapter_client.h index 1a91481..58f361d 100644 --- a/chromeos/dbus/fake_bluetooth_adapter_client.h +++ b/chromeos/dbus/fake_bluetooth_adapter_client.h @@ -28,33 +28,32 @@ class CHROMEOS_EXPORT FakeBluetoothAdapterClient ~Properties() override; // dbus::PropertySet override - virtual void Get(dbus::PropertyBase* property, - dbus::PropertySet::GetCallback callback) override; - virtual void GetAll() override; - virtual void Set(dbus::PropertyBase* property, - dbus::PropertySet::SetCallback callback) override; + void Get(dbus::PropertyBase* property, + dbus::PropertySet::GetCallback callback) override; + void GetAll() override; + void Set(dbus::PropertyBase* property, + dbus::PropertySet::SetCallback callback) override; }; FakeBluetoothAdapterClient(); - virtual ~FakeBluetoothAdapterClient(); + ~FakeBluetoothAdapterClient() override; // BluetoothAdapterClient overrides - virtual void Init(dbus::Bus* bus) override; - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual std::vector<dbus::ObjectPath> GetAdapters() override; - virtual Properties* GetProperties(const dbus::ObjectPath& object_path) - override; - virtual void StartDiscovery(const dbus::ObjectPath& object_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void StopDiscovery(const dbus::ObjectPath& object_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void RemoveDevice(const dbus::ObjectPath& object_path, - const dbus::ObjectPath& device_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; + void Init(dbus::Bus* bus) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + std::vector<dbus::ObjectPath> GetAdapters() override; + Properties* GetProperties(const dbus::ObjectPath& object_path) override; + void StartDiscovery(const dbus::ObjectPath& object_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void StopDiscovery(const dbus::ObjectPath& object_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void RemoveDevice(const dbus::ObjectPath& object_path, + const dbus::ObjectPath& device_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override; // Sets the current simulation timeout interval. void SetSimulationIntervalMs(int interval_ms); diff --git a/chromeos/dbus/fake_bluetooth_agent_manager_client.h b/chromeos/dbus/fake_bluetooth_agent_manager_client.h index be9a8d9..68c91202c3 100644 --- a/chromeos/dbus/fake_bluetooth_agent_manager_client.h +++ b/chromeos/dbus/fake_bluetooth_agent_manager_client.h @@ -24,21 +24,20 @@ class CHROMEOS_EXPORT FakeBluetoothAgentManagerClient : public BluetoothAgentManagerClient { public: FakeBluetoothAgentManagerClient(); - virtual ~FakeBluetoothAgentManagerClient(); + ~FakeBluetoothAgentManagerClient() override; // BluetoothAgentManagerClient overrides - virtual void Init(dbus::Bus* bus) override; - virtual void RegisterAgent(const dbus::ObjectPath& agent_path, - const std::string& capability, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void UnregisterAgent(const dbus::ObjectPath& agent_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void RequestDefaultAgent(const dbus::ObjectPath& agent_path, - const base::Closure& callback, - const ErrorCallback& error_callback) - override; + void Init(dbus::Bus* bus) override; + void RegisterAgent(const dbus::ObjectPath& agent_path, + const std::string& capability, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void UnregisterAgent(const dbus::ObjectPath& agent_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void RequestDefaultAgent(const dbus::ObjectPath& agent_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override; // Register, unregister and retrieve pointers to agent service providers. void RegisterAgentServiceProvider( diff --git a/chromeos/dbus/fake_bluetooth_agent_service_provider.h b/chromeos/dbus/fake_bluetooth_agent_service_provider.h index 9536414..9de89bf 100644 --- a/chromeos/dbus/fake_bluetooth_agent_service_provider.h +++ b/chromeos/dbus/fake_bluetooth_agent_service_provider.h @@ -25,7 +25,7 @@ class CHROMEOS_EXPORT FakeBluetoothAgentServiceProvider public: FakeBluetoothAgentServiceProvider(const dbus::ObjectPath& object_path, Delegate *delegate); - virtual ~FakeBluetoothAgentServiceProvider(); + ~FakeBluetoothAgentServiceProvider() override; // Each of these calls the equivalent BluetoothAgentServiceProvider::Delegate // method on the object passed on construction. diff --git a/chromeos/dbus/fake_bluetooth_device_client.h b/chromeos/dbus/fake_bluetooth_device_client.h index b8e743a..bcc268f 100644 --- a/chromeos/dbus/fake_bluetooth_device_client.h +++ b/chromeos/dbus/fake_bluetooth_device_client.h @@ -28,47 +28,46 @@ class CHROMEOS_EXPORT FakeBluetoothDeviceClient public: struct Properties : public BluetoothDeviceClient::Properties { explicit Properties(const PropertyChangedCallback & callback); - virtual ~Properties(); + ~Properties() override; // dbus::PropertySet override - virtual void Get(dbus::PropertyBase* property, - dbus::PropertySet::GetCallback callback) override; - virtual void GetAll() override; - virtual void Set(dbus::PropertyBase* property, - dbus::PropertySet::SetCallback callback) override; + void Get(dbus::PropertyBase* property, + dbus::PropertySet::GetCallback callback) override; + void GetAll() override; + void Set(dbus::PropertyBase* property, + dbus::PropertySet::SetCallback callback) override; }; FakeBluetoothDeviceClient(); - virtual ~FakeBluetoothDeviceClient(); + ~FakeBluetoothDeviceClient() override; // BluetoothDeviceClient overrides - virtual void Init(dbus::Bus* bus) override; - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual std::vector<dbus::ObjectPath> GetDevicesForAdapter( + void Init(dbus::Bus* bus) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + std::vector<dbus::ObjectPath> GetDevicesForAdapter( const dbus::ObjectPath& adapter_path) override; - virtual Properties* GetProperties(const dbus::ObjectPath& object_path) - override; - virtual void Connect(const dbus::ObjectPath& object_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void Disconnect(const dbus::ObjectPath& object_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void ConnectProfile(const dbus::ObjectPath& object_path, - const std::string& uuid, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void DisconnectProfile(const dbus::ObjectPath& object_path, - const std::string& uuid, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void Pair(const dbus::ObjectPath& object_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void CancelPairing(const dbus::ObjectPath& object_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; + Properties* GetProperties(const dbus::ObjectPath& object_path) override; + void Connect(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; + void ConnectProfile(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; + void Pair(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; void GetConnInfo(const dbus::ObjectPath& object_path, const ConnInfoCallback& callback, const ErrorCallback& error_callback) override; diff --git a/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.h b/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.h index cba953b..f93bc74 100644 --- a/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.h +++ b/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.h @@ -27,41 +27,40 @@ class CHROMEOS_EXPORT FakeBluetoothGattCharacteristicClient public: struct Properties : public BluetoothGattCharacteristicClient::Properties { explicit Properties(const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; // dbus::PropertySet override - virtual void Get(dbus::PropertyBase* property, - dbus::PropertySet::GetCallback callback) override; - virtual void GetAll() override; - virtual void Set(dbus::PropertyBase* property, - dbus::PropertySet::SetCallback callback) override; + void Get(dbus::PropertyBase* property, + dbus::PropertySet::GetCallback callback) override; + void GetAll() override; + void Set(dbus::PropertyBase* property, + dbus::PropertySet::SetCallback callback) override; }; FakeBluetoothGattCharacteristicClient(); - virtual ~FakeBluetoothGattCharacteristicClient(); + ~FakeBluetoothGattCharacteristicClient() override; // DBusClient override. - virtual void Init(dbus::Bus* bus) override; + void Init(dbus::Bus* bus) override; // BluetoothGattCharacteristicClient overrides. - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual std::vector<dbus::ObjectPath> GetCharacteristics() override; - virtual Properties* GetProperties(const dbus::ObjectPath& object_path) - override; - virtual void ReadValue(const dbus::ObjectPath& object_path, - const ValueCallback& callback, - const ErrorCallback& error_callback) override; - virtual void WriteValue(const dbus::ObjectPath& object_path, - const std::vector<uint8>& value, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void StartNotify(const dbus::ObjectPath& object_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void StopNotify(const dbus::ObjectPath& object_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + std::vector<dbus::ObjectPath> GetCharacteristics() override; + Properties* GetProperties(const dbus::ObjectPath& object_path) override; + void ReadValue(const dbus::ObjectPath& object_path, + const ValueCallback& callback, + const ErrorCallback& error_callback) override; + void WriteValue(const dbus::ObjectPath& object_path, + const std::vector<uint8>& value, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void StartNotify(const dbus::ObjectPath& object_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void StopNotify(const dbus::ObjectPath& object_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override; // Makes the group of characteristics belonging to a particular GATT based // profile available under the GATT service with object path |service_path|. diff --git a/chromeos/dbus/fake_bluetooth_gatt_characteristic_service_provider.h b/chromeos/dbus/fake_bluetooth_gatt_characteristic_service_provider.h index 7e99dec..8a8440b 100644 --- a/chromeos/dbus/fake_bluetooth_gatt_characteristic_service_provider.h +++ b/chromeos/dbus/fake_bluetooth_gatt_characteristic_service_provider.h @@ -27,10 +27,10 @@ class CHROMEOS_EXPORT FakeBluetoothGattCharacteristicServiceProvider const std::vector<std::string>& flags, const std::vector<std::string>& permissions, const dbus::ObjectPath& service_path); - virtual ~FakeBluetoothGattCharacteristicServiceProvider(); + ~FakeBluetoothGattCharacteristicServiceProvider() override; // BluetoothGattCharacteristicServiceProvider override. - virtual void SendValueChanged(const std::vector<uint8>& value) override; + void SendValueChanged(const std::vector<uint8>& value) override; // Methods to simulate value get/set requests issued from a remote device. The // methods do nothing, if the associated service was not registered with the diff --git a/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h b/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h index 0fee9ae..c9ec82a 100644 --- a/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h +++ b/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h @@ -24,35 +24,34 @@ class CHROMEOS_EXPORT FakeBluetoothGattDescriptorClient public: struct Properties : public BluetoothGattDescriptorClient::Properties { explicit Properties(const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; // dbus::PropertySet override - virtual void Get(dbus::PropertyBase* property, - dbus::PropertySet::GetCallback callback) override; - virtual void GetAll() override; - virtual void Set(dbus::PropertyBase* property, - dbus::PropertySet::SetCallback callback) override; + void Get(dbus::PropertyBase* property, + dbus::PropertySet::GetCallback callback) override; + void GetAll() override; + void Set(dbus::PropertyBase* property, + dbus::PropertySet::SetCallback callback) override; }; FakeBluetoothGattDescriptorClient(); - virtual ~FakeBluetoothGattDescriptorClient(); + ~FakeBluetoothGattDescriptorClient() override; // DBusClient override. - virtual void Init(dbus::Bus* bus) override; + void Init(dbus::Bus* bus) override; // BluetoothGattDescriptorClient overrides. - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual std::vector<dbus::ObjectPath> GetDescriptors() override; - virtual Properties* GetProperties(const dbus::ObjectPath& object_path) - override; - virtual void ReadValue(const dbus::ObjectPath& object_path, - const ValueCallback& callback, - const ErrorCallback& error_callback) override; - virtual void WriteValue(const dbus::ObjectPath& object_path, - const std::vector<uint8>& value, - const base::Closure& callback, - const ErrorCallback& error_callback) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + std::vector<dbus::ObjectPath> GetDescriptors() override; + Properties* GetProperties(const dbus::ObjectPath& object_path) override; + void ReadValue(const dbus::ObjectPath& object_path, + const ValueCallback& callback, + const ErrorCallback& error_callback) override; + void WriteValue(const dbus::ObjectPath& object_path, + const std::vector<uint8>& value, + const base::Closure& callback, + const ErrorCallback& error_callback) override; // Makes the descriptor with the UUID |uuid| visible under the characteristic // with object path |characteristic_path|. Descriptor object paths are diff --git a/chromeos/dbus/fake_bluetooth_gatt_descriptor_service_provider.h b/chromeos/dbus/fake_bluetooth_gatt_descriptor_service_provider.h index 6e8dbbe..e9099b9 100644 --- a/chromeos/dbus/fake_bluetooth_gatt_descriptor_service_provider.h +++ b/chromeos/dbus/fake_bluetooth_gatt_descriptor_service_provider.h @@ -26,10 +26,10 @@ class CHROMEOS_EXPORT FakeBluetoothGattDescriptorServiceProvider const std::string& uuid, const std::vector<std::string>& permissions, const dbus::ObjectPath& characteristic_path); - virtual ~FakeBluetoothGattDescriptorServiceProvider(); + ~FakeBluetoothGattDescriptorServiceProvider() override; // BluetoothGattDescriptorServiceProvider override. - virtual void SendValueChanged(const std::vector<uint8>& value) override; + void SendValueChanged(const std::vector<uint8>& value) override; // Methods to simulate value get/set requests issued from a remote device. The // methods do nothing, if the associated service was not registered with the diff --git a/chromeos/dbus/fake_bluetooth_gatt_manager_client.h b/chromeos/dbus/fake_bluetooth_gatt_manager_client.h index 0c2948c..9dccaac 100644 --- a/chromeos/dbus/fake_bluetooth_gatt_manager_client.h +++ b/chromeos/dbus/fake_bluetooth_gatt_manager_client.h @@ -27,19 +27,19 @@ class CHROMEOS_EXPORT FakeBluetoothGattManagerClient : public BluetoothGattManagerClient { public: FakeBluetoothGattManagerClient(); - virtual ~FakeBluetoothGattManagerClient(); + ~FakeBluetoothGattManagerClient() override; // DBusClient override. - virtual void Init(dbus::Bus* bus) override; + void Init(dbus::Bus* bus) override; // BluetoothGattManagerClient overrides. - virtual void RegisterService(const dbus::ObjectPath& service_path, - const Options& options, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void UnregisterService(const dbus::ObjectPath& service_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; + void RegisterService(const dbus::ObjectPath& service_path, + const Options& options, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void UnregisterService(const dbus::ObjectPath& service_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override; // Register, unregister, and retrieve pointers to service, characteristic, and // descriptor service providers. Automatically called from the service diff --git a/chromeos/dbus/fake_bluetooth_gatt_service_client.h b/chromeos/dbus/fake_bluetooth_gatt_service_client.h index 535b8c7..c963d04 100644 --- a/chromeos/dbus/fake_bluetooth_gatt_service_client.h +++ b/chromeos/dbus/fake_bluetooth_gatt_service_client.h @@ -26,28 +26,27 @@ class CHROMEOS_EXPORT FakeBluetoothGattServiceClient public: struct Properties : public BluetoothGattServiceClient::Properties { explicit Properties(const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; // dbus::PropertySet override - virtual void Get(dbus::PropertyBase* property, - dbus::PropertySet::GetCallback callback) override; - virtual void GetAll() override; - virtual void Set(dbus::PropertyBase* property, - dbus::PropertySet::SetCallback callback) override; + void Get(dbus::PropertyBase* property, + dbus::PropertySet::GetCallback callback) override; + void GetAll() override; + void Set(dbus::PropertyBase* property, + dbus::PropertySet::SetCallback callback) override; }; FakeBluetoothGattServiceClient(); - virtual ~FakeBluetoothGattServiceClient(); + ~FakeBluetoothGattServiceClient() override; // DBusClient override. - virtual void Init(dbus::Bus* bus) override; + void Init(dbus::Bus* bus) override; // BluetoothGattServiceClient overrides. - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual std::vector<dbus::ObjectPath> GetServices() override; - virtual Properties* GetProperties(const dbus::ObjectPath& object_path) - override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + std::vector<dbus::ObjectPath> GetServices() override; + Properties* GetProperties(const dbus::ObjectPath& object_path) override; // Makes a service visible for device with object path |device_path|. Note // that only one instance of a specific service is simulated at a time. Hence, diff --git a/chromeos/dbus/fake_bluetooth_gatt_service_service_provider.h b/chromeos/dbus/fake_bluetooth_gatt_service_service_provider.h index 28b0363..a1a1253 100644 --- a/chromeos/dbus/fake_bluetooth_gatt_service_service_provider.h +++ b/chromeos/dbus/fake_bluetooth_gatt_service_service_provider.h @@ -24,7 +24,7 @@ class CHROMEOS_EXPORT FakeBluetoothGattServiceServiceProvider const dbus::ObjectPath& object_path, const std::string& uuid, const std::vector<dbus::ObjectPath>& includes); - virtual ~FakeBluetoothGattServiceServiceProvider(); + ~FakeBluetoothGattServiceServiceProvider() override; const dbus::ObjectPath& object_path() const { return object_path_; } const std::string& uuid() const { return uuid_; } diff --git a/chromeos/dbus/fake_bluetooth_input_client.h b/chromeos/dbus/fake_bluetooth_input_client.h index b823d6a..461c02c 100644 --- a/chromeos/dbus/fake_bluetooth_input_client.h +++ b/chromeos/dbus/fake_bluetooth_input_client.h @@ -22,25 +22,24 @@ class CHROMEOS_EXPORT FakeBluetoothInputClient public: struct Properties : public BluetoothInputClient::Properties { explicit Properties(const PropertyChangedCallback & callback); - virtual ~Properties(); + ~Properties() override; // dbus::PropertySet override - virtual void Get(dbus::PropertyBase* property, - dbus::PropertySet::GetCallback callback) override; - virtual void GetAll() override; - virtual void Set(dbus::PropertyBase* property, - dbus::PropertySet::SetCallback callback) override; + void Get(dbus::PropertyBase* property, + dbus::PropertySet::GetCallback callback) override; + void GetAll() override; + void Set(dbus::PropertyBase* property, + dbus::PropertySet::SetCallback callback) override; }; FakeBluetoothInputClient(); - virtual ~FakeBluetoothInputClient(); + ~FakeBluetoothInputClient() override; // BluetoothInputClient overrides - virtual void Init(dbus::Bus* bus) override; - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual Properties* GetProperties(const dbus::ObjectPath& object_path) - override; + void Init(dbus::Bus* bus) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + Properties* GetProperties(const dbus::ObjectPath& object_path) override; // Simulate device addition/removal void AddInputDevice(const dbus::ObjectPath& object_path); diff --git a/chromeos/dbus/fake_bluetooth_profile_manager_client.h b/chromeos/dbus/fake_bluetooth_profile_manager_client.h index add10df..b6ae0b6 100644 --- a/chromeos/dbus/fake_bluetooth_profile_manager_client.h +++ b/chromeos/dbus/fake_bluetooth_profile_manager_client.h @@ -27,18 +27,18 @@ class CHROMEOS_EXPORT FakeBluetoothProfileManagerClient : public BluetoothProfileManagerClient { public: FakeBluetoothProfileManagerClient(); - virtual ~FakeBluetoothProfileManagerClient(); + ~FakeBluetoothProfileManagerClient() override; // BluetoothProfileManagerClient overrides - virtual void Init(dbus::Bus* bus) override; - virtual void RegisterProfile(const dbus::ObjectPath& profile_path, - const std::string& uuid, - const Options& options, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void UnregisterProfile(const dbus::ObjectPath& profile_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; + void Init(dbus::Bus* bus) override; + void RegisterProfile(const dbus::ObjectPath& profile_path, + const std::string& uuid, + const Options& options, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void UnregisterProfile(const dbus::ObjectPath& profile_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override; // Register, unregister and retrieve pointers to profile server providers. void RegisterProfileServiceProvider( diff --git a/chromeos/dbus/fake_bluetooth_profile_service_provider.h b/chromeos/dbus/fake_bluetooth_profile_service_provider.h index 9cb4fd8..f2ebadc 100644 --- a/chromeos/dbus/fake_bluetooth_profile_service_provider.h +++ b/chromeos/dbus/fake_bluetooth_profile_service_provider.h @@ -23,7 +23,7 @@ class CHROMEOS_EXPORT FakeBluetoothProfileServiceProvider public: FakeBluetoothProfileServiceProvider(const dbus::ObjectPath& object_path, Delegate *delegate); - virtual ~FakeBluetoothProfileServiceProvider(); + ~FakeBluetoothProfileServiceProvider() override; // Each of these calls the equivalent // BluetoothProfileServiceProvider::Delegate method on the object passed on diff --git a/chromeos/dbus/fake_cras_audio_client.h b/chromeos/dbus/fake_cras_audio_client.h index c68e3a3..0ef79f4 100644 --- a/chromeos/dbus/fake_cras_audio_client.h +++ b/chromeos/dbus/fake_cras_audio_client.h @@ -16,27 +16,27 @@ class CrasAudioHandlerTest; class CHROMEOS_EXPORT FakeCrasAudioClient : public CrasAudioClient { public: FakeCrasAudioClient(); - virtual ~FakeCrasAudioClient(); + ~FakeCrasAudioClient() override; // CrasAudioClient overrides: - virtual void Init(dbus::Bus* bus) override; - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual bool HasObserver(const Observer* observer) const override; - virtual void GetVolumeState(const GetVolumeStateCallback& callback) override; - virtual void GetNodes(const GetNodesCallback& callback, - const ErrorCallback& error_callback) override; - virtual void SetOutputNodeVolume(uint64 node_id, int32 volume) override; - virtual void SetOutputUserMute(bool mute_on) override; - virtual void SetInputNodeGain(uint64 node_id, int32 gain) override; - virtual void SetInputMute(bool mute_on) override; - virtual void SetActiveOutputNode(uint64 node_id) override; - virtual void SetActiveInputNode(uint64 node_id) override; - virtual void AddActiveInputNode(uint64 node_id) override; - virtual void RemoveActiveInputNode(uint64 node_id) override; - virtual void AddActiveOutputNode(uint64 node_id) override; - virtual void RemoveActiveOutputNode(uint64 node_id) override; - virtual void SwapLeftRight(uint64 node_id, bool swap) override; + void Init(dbus::Bus* bus) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + bool HasObserver(const Observer* observer) const override; + void GetVolumeState(const GetVolumeStateCallback& callback) override; + void GetNodes(const GetNodesCallback& callback, + const ErrorCallback& error_callback) override; + void SetOutputNodeVolume(uint64 node_id, int32 volume) override; + void SetOutputUserMute(bool mute_on) override; + void SetInputNodeGain(uint64 node_id, int32 gain) override; + void SetInputMute(bool mute_on) override; + void SetActiveOutputNode(uint64 node_id) override; + void SetActiveInputNode(uint64 node_id) override; + void AddActiveInputNode(uint64 node_id) override; + void RemoveActiveInputNode(uint64 node_id) override; + void AddActiveOutputNode(uint64 node_id) override; + void RemoveActiveOutputNode(uint64 node_id) override; + void SwapLeftRight(uint64 node_id, bool swap) override; // Updates |node_list_| to contain |audio_nodes|. void SetAudioNodesForTesting(const AudioNodeList& audio_nodes); diff --git a/chromeos/dbus/fake_cros_disks_client.h b/chromeos/dbus/fake_cros_disks_client.h index 30e8c97..ea96ad1 100644 --- a/chromeos/dbus/fake_cros_disks_client.h +++ b/chromeos/dbus/fake_cros_disks_client.h @@ -19,43 +19,41 @@ namespace chromeos { class CHROMEOS_EXPORT FakeCrosDisksClient : public CrosDisksClient { public: FakeCrosDisksClient(); - virtual ~FakeCrosDisksClient(); + ~FakeCrosDisksClient() override; // CrosDisksClient overrides - virtual void Init(dbus::Bus* bus) override; + void Init(dbus::Bus* bus) override; // Performs fake mounting for archive files. Instead of actually extracting // contents of archive files, this function creates a directory that // contains a dummy file. - virtual void Mount(const std::string& source_path, - const std::string& source_format, - const std::string& mount_label, - const base::Closure& callback, - const base::Closure& error_callback) override; + void Mount(const std::string& source_path, + const std::string& source_format, + const std::string& mount_label, + const base::Closure& callback, + const base::Closure& error_callback) override; // Deletes the directory created in Mount(). - virtual void Unmount(const std::string& device_path, - UnmountOptions options, - const base::Closure& callback, - const base::Closure& error_callback) override; - virtual void EnumerateAutoMountableDevices( + void Unmount(const std::string& device_path, + UnmountOptions options, + const base::Closure& callback, + const base::Closure& error_callback) override; + void EnumerateAutoMountableDevices( const EnumerateAutoMountableDevicesCallback& callback, const base::Closure& error_callback) override; - virtual void EnumerateMountEntries( - const EnumerateMountEntriesCallback& callback, - const base::Closure& error_callback) override; - virtual void Format(const std::string& device_path, - const std::string& filesystem, - const base::Closure& callback, - const base::Closure& error_callback) override; - virtual void GetDeviceProperties( - const std::string& device_path, - const GetDevicePropertiesCallback& callback, - const base::Closure& error_callback) override; - virtual void SetMountEventHandler( + void EnumerateMountEntries(const EnumerateMountEntriesCallback& callback, + const base::Closure& error_callback) override; + void Format(const std::string& device_path, + const std::string& filesystem, + const base::Closure& callback, + const base::Closure& error_callback) override; + void GetDeviceProperties(const std::string& device_path, + const GetDevicePropertiesCallback& callback, + const base::Closure& error_callback) override; + void SetMountEventHandler( const MountEventHandler& mount_event_handler) override; - virtual void SetMountCompletedHandler( + void SetMountCompletedHandler( const MountCompletedHandler& mount_completed_handler) override; - virtual void SetFormatCompletedHandler( + void SetFormatCompletedHandler( const FormatCompletedHandler& format_completed_handler) override; // Used in tests to simulate signals sent by cros disks layer. diff --git a/chromeos/dbus/fake_cryptohome_client.h b/chromeos/dbus/fake_cryptohome_client.h index e7a6fd2..7064a2e 100644 --- a/chromeos/dbus/fake_cryptohome_client.h +++ b/chromeos/dbus/fake_cryptohome_client.h @@ -16,120 +16,112 @@ namespace chromeos { class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient { public: FakeCryptohomeClient(); - virtual ~FakeCryptohomeClient(); + ~FakeCryptohomeClient() override; - virtual void Init(dbus::Bus* bus) override; - virtual void SetAsyncCallStatusHandlers( + void Init(dbus::Bus* bus) override; + void SetAsyncCallStatusHandlers( const AsyncCallStatusHandler& handler, const AsyncCallStatusWithDataHandler& data_handler) override; - virtual void ResetAsyncCallStatusHandlers() override; - virtual void WaitForServiceToBeAvailable( + void ResetAsyncCallStatusHandlers() override; + void WaitForServiceToBeAvailable( const WaitForServiceToBeAvailableCallback& callback) override; - virtual void IsMounted(const BoolDBusMethodCallback& callback) override; - virtual bool Unmount(bool* success) override; - virtual void AsyncCheckKey(const std::string& username, - const std::string& key, - const AsyncMethodCallback& callback) override; - virtual void AsyncMigrateKey(const std::string& username, - const std::string& from_key, - const std::string& to_key, - const AsyncMethodCallback& callback) override; - virtual void AsyncRemove(const std::string& username, - const AsyncMethodCallback& callback) override; - virtual void GetSystemSalt(const GetSystemSaltCallback& callback) override; - virtual void GetSanitizedUsername( - const std::string& username, - const StringDBusMethodCallback& callback) override; - virtual std::string BlockingGetSanitizedUsername( + void IsMounted(const BoolDBusMethodCallback& callback) override; + bool Unmount(bool* success) override; + void AsyncCheckKey(const std::string& username, + const std::string& key, + const AsyncMethodCallback& callback) override; + void AsyncMigrateKey(const std::string& username, + const std::string& from_key, + const std::string& to_key, + const AsyncMethodCallback& callback) override; + void AsyncRemove(const std::string& username, + const AsyncMethodCallback& callback) override; + void GetSystemSalt(const GetSystemSaltCallback& callback) override; + void GetSanitizedUsername(const std::string& username, + const StringDBusMethodCallback& callback) override; + std::string BlockingGetSanitizedUsername( const std::string& username) override; - virtual void AsyncMount(const std::string& username, - const std::string& key, - int flags, - const AsyncMethodCallback& callback) override; - virtual void AsyncAddKey(const std::string& username, - const std::string& key, - const std::string& new_key, - const AsyncMethodCallback& callback) override; - virtual void AsyncMountGuest(const AsyncMethodCallback& callback) override; - virtual void AsyncMountPublic(const std::string& public_mount_id, - int flags, - const AsyncMethodCallback& callback) override; - virtual void TpmIsReady(const BoolDBusMethodCallback& callback) override; - virtual void TpmIsEnabled(const BoolDBusMethodCallback& callback) override; - virtual bool CallTpmIsEnabledAndBlock(bool* enabled) override; - virtual void TpmGetPassword( - const StringDBusMethodCallback& callback) override; - virtual void TpmIsOwned(const BoolDBusMethodCallback& callback) override; - virtual bool CallTpmIsOwnedAndBlock(bool* owned) override; - virtual void TpmIsBeingOwned(const BoolDBusMethodCallback& callback) override; - virtual bool CallTpmIsBeingOwnedAndBlock(bool* owning) override; - virtual void TpmCanAttemptOwnership( - const VoidDBusMethodCallback& callback) override; - virtual void TpmClearStoredPassword( - const VoidDBusMethodCallback& callback) override; - virtual bool CallTpmClearStoredPasswordAndBlock() override; - virtual void Pkcs11IsTpmTokenReady( - const BoolDBusMethodCallback& callback) override; - virtual void Pkcs11GetTpmTokenInfo( + void AsyncMount(const std::string& username, + const std::string& key, + int flags, + const AsyncMethodCallback& callback) override; + void AsyncAddKey(const std::string& username, + const std::string& key, + const std::string& new_key, + const AsyncMethodCallback& callback) override; + void AsyncMountGuest(const AsyncMethodCallback& callback) override; + void AsyncMountPublic(const std::string& public_mount_id, + int flags, + const AsyncMethodCallback& callback) override; + void TpmIsReady(const BoolDBusMethodCallback& callback) override; + void TpmIsEnabled(const BoolDBusMethodCallback& callback) override; + bool CallTpmIsEnabledAndBlock(bool* enabled) override; + void TpmGetPassword(const StringDBusMethodCallback& callback) override; + void TpmIsOwned(const BoolDBusMethodCallback& callback) override; + bool CallTpmIsOwnedAndBlock(bool* owned) override; + void TpmIsBeingOwned(const BoolDBusMethodCallback& callback) override; + bool CallTpmIsBeingOwnedAndBlock(bool* owning) override; + void TpmCanAttemptOwnership(const VoidDBusMethodCallback& callback) override; + void TpmClearStoredPassword(const VoidDBusMethodCallback& callback) override; + bool CallTpmClearStoredPasswordAndBlock() override; + void Pkcs11IsTpmTokenReady(const BoolDBusMethodCallback& callback) override; + void Pkcs11GetTpmTokenInfo( const Pkcs11GetTpmTokenInfoCallback& callback) override; - virtual void Pkcs11GetTpmTokenInfoForUser( + void Pkcs11GetTpmTokenInfoForUser( const std::string& username, const Pkcs11GetTpmTokenInfoCallback& callback) override; - virtual bool InstallAttributesGet(const std::string& name, - std::vector<uint8>* value, - bool* successful) override; - virtual bool InstallAttributesSet(const std::string& name, - const std::vector<uint8>& value, - bool* successful) override; - virtual bool InstallAttributesFinalize(bool* successful) override; - virtual void InstallAttributesIsReady( + bool InstallAttributesGet(const std::string& name, + std::vector<uint8>* value, + bool* successful) override; + bool InstallAttributesSet(const std::string& name, + const std::vector<uint8>& value, + bool* successful) override; + bool InstallAttributesFinalize(bool* successful) override; + void InstallAttributesIsReady( const BoolDBusMethodCallback& callback) override; - virtual bool InstallAttributesIsInvalid(bool* is_invalid) override; - virtual bool InstallAttributesIsFirstInstall(bool* is_first_install) override; - virtual void TpmAttestationIsPrepared( + bool InstallAttributesIsInvalid(bool* is_invalid) override; + bool InstallAttributesIsFirstInstall(bool* is_first_install) override; + void TpmAttestationIsPrepared( const BoolDBusMethodCallback& callback) override; - virtual void TpmAttestationIsEnrolled( + void TpmAttestationIsEnrolled( const BoolDBusMethodCallback& callback) override; - virtual void AsyncTpmAttestationCreateEnrollRequest( - chromeos::attestation::PrivacyCAType pca_type, - const AsyncMethodCallback& callback) override; - virtual void AsyncTpmAttestationEnroll( + void AsyncTpmAttestationCreateEnrollRequest( chromeos::attestation::PrivacyCAType pca_type, - const std::string& pca_response, const AsyncMethodCallback& callback) override; - virtual void AsyncTpmAttestationCreateCertRequest( + void AsyncTpmAttestationEnroll(chromeos::attestation::PrivacyCAType pca_type, + const std::string& pca_response, + const AsyncMethodCallback& callback) override; + void AsyncTpmAttestationCreateCertRequest( chromeos::attestation::PrivacyCAType pca_type, attestation::AttestationCertificateProfile certificate_profile, const std::string& user_id, const std::string& request_origin, const AsyncMethodCallback& callback) override; - virtual void AsyncTpmAttestationFinishCertRequest( + void AsyncTpmAttestationFinishCertRequest( const std::string& pca_response, attestation::AttestationKeyType key_type, const std::string& user_id, const std::string& key_name, const AsyncMethodCallback& callback) override; - virtual void TpmAttestationDoesKeyExist( + void TpmAttestationDoesKeyExist( attestation::AttestationKeyType key_type, const std::string& user_id, const std::string& key_name, const BoolDBusMethodCallback& callback) override; - virtual void TpmAttestationGetCertificate( - attestation::AttestationKeyType key_type, - const std::string& user_id, - const std::string& key_name, - const DataMethodCallback& callback) override; - virtual void TpmAttestationGetPublicKey( + void TpmAttestationGetCertificate( attestation::AttestationKeyType key_type, const std::string& user_id, const std::string& key_name, const DataMethodCallback& callback) override; - virtual void TpmAttestationRegisterKey( - attestation::AttestationKeyType key_type, - const std::string& user_id, - const std::string& key_name, - const AsyncMethodCallback& callback) override; - virtual void TpmAttestationSignEnterpriseChallenge( + void TpmAttestationGetPublicKey(attestation::AttestationKeyType key_type, + const std::string& user_id, + const std::string& key_name, + const DataMethodCallback& callback) override; + void TpmAttestationRegisterKey(attestation::AttestationKeyType key_type, + const std::string& user_id, + const std::string& key_name, + const AsyncMethodCallback& callback) override; + void TpmAttestationSignEnterpriseChallenge( attestation::AttestationKeyType key_type, const std::string& user_id, const std::string& key_name, @@ -138,64 +130,56 @@ class CHROMEOS_EXPORT FakeCryptohomeClient : public CryptohomeClient { attestation::AttestationChallengeOptions options, const std::string& challenge, const AsyncMethodCallback& callback) override; - virtual void TpmAttestationSignSimpleChallenge( + void TpmAttestationSignSimpleChallenge( attestation::AttestationKeyType key_type, const std::string& user_id, const std::string& key_name, const std::string& challenge, const AsyncMethodCallback& callback) override; - virtual void TpmAttestationGetKeyPayload( - attestation::AttestationKeyType key_type, - const std::string& user_id, - const std::string& key_name, - const DataMethodCallback& callback) override; - virtual void TpmAttestationSetKeyPayload( + void TpmAttestationGetKeyPayload(attestation::AttestationKeyType key_type, + const std::string& user_id, + const std::string& key_name, + const DataMethodCallback& callback) override; + void TpmAttestationSetKeyPayload( attestation::AttestationKeyType key_type, const std::string& user_id, const std::string& key_name, const std::string& payload, const BoolDBusMethodCallback& callback) override; - virtual void TpmAttestationDeleteKeys( + void TpmAttestationDeleteKeys( attestation::AttestationKeyType key_type, const std::string& user_id, const std::string& key_prefix, const BoolDBusMethodCallback& callback) override; - virtual void GetKeyDataEx( - const cryptohome::AccountIdentifier& id, - const cryptohome::AuthorizationRequest& auth, - const cryptohome::GetKeyDataRequest& request, - const ProtobufMethodCallback& callback) override; - virtual void CheckKeyEx( - const cryptohome::AccountIdentifier& id, - const cryptohome::AuthorizationRequest& auth, - const cryptohome::CheckKeyRequest& request, - const ProtobufMethodCallback& callback) override; - virtual void MountEx( - const cryptohome::AccountIdentifier& id, - const cryptohome::AuthorizationRequest& auth, - const cryptohome::MountRequest& request, - const ProtobufMethodCallback& callback) override; - virtual void AddKeyEx( - const cryptohome::AccountIdentifier& id, - const cryptohome::AuthorizationRequest& auth, - const cryptohome::AddKeyRequest& request, - const ProtobufMethodCallback& callback) override; - virtual void UpdateKeyEx( - const cryptohome::AccountIdentifier& id, - const cryptohome::AuthorizationRequest& auth, - const cryptohome::UpdateKeyRequest& request, - const ProtobufMethodCallback& callback) override; - virtual void RemoveKeyEx(const cryptohome::AccountIdentifier& id, - const cryptohome::AuthorizationRequest& auth, - const cryptohome::RemoveKeyRequest& request, - const ProtobufMethodCallback& callback) override; - virtual void GetBootAttribute( - const cryptohome::GetBootAttributeRequest& request, - const ProtobufMethodCallback& callback) override; - virtual void SetBootAttribute( - const cryptohome::SetBootAttributeRequest& request, - const ProtobufMethodCallback& callback) override; - virtual void FlushAndSignBootAttributes( + void GetKeyDataEx(const cryptohome::AccountIdentifier& id, + const cryptohome::AuthorizationRequest& auth, + const cryptohome::GetKeyDataRequest& request, + const ProtobufMethodCallback& callback) override; + void CheckKeyEx(const cryptohome::AccountIdentifier& id, + const cryptohome::AuthorizationRequest& auth, + const cryptohome::CheckKeyRequest& request, + const ProtobufMethodCallback& callback) override; + void MountEx(const cryptohome::AccountIdentifier& id, + const cryptohome::AuthorizationRequest& auth, + const cryptohome::MountRequest& request, + const ProtobufMethodCallback& callback) override; + void AddKeyEx(const cryptohome::AccountIdentifier& id, + const cryptohome::AuthorizationRequest& auth, + const cryptohome::AddKeyRequest& request, + const ProtobufMethodCallback& callback) override; + void UpdateKeyEx(const cryptohome::AccountIdentifier& id, + const cryptohome::AuthorizationRequest& auth, + const cryptohome::UpdateKeyRequest& request, + const ProtobufMethodCallback& callback) override; + void RemoveKeyEx(const cryptohome::AccountIdentifier& id, + const cryptohome::AuthorizationRequest& auth, + const cryptohome::RemoveKeyRequest& request, + const ProtobufMethodCallback& callback) override; + void GetBootAttribute(const cryptohome::GetBootAttributeRequest& request, + const ProtobufMethodCallback& callback) override; + void SetBootAttribute(const cryptohome::SetBootAttributeRequest& request, + const ProtobufMethodCallback& callback) override; + void FlushAndSignBootAttributes( const cryptohome::FlushAndSignBootAttributesRequest& request, const ProtobufMethodCallback& callback) override; diff --git a/chromeos/dbus/fake_debug_daemon_client.h b/chromeos/dbus/fake_debug_daemon_client.h index 13968de..e58cb75 100644 --- a/chromeos/dbus/fake_debug_daemon_client.h +++ b/chromeos/dbus/fake_debug_daemon_client.h @@ -18,48 +18,46 @@ namespace chromeos { class CHROMEOS_EXPORT FakeDebugDaemonClient : public DebugDaemonClient { public: FakeDebugDaemonClient(); - virtual ~FakeDebugDaemonClient(); + ~FakeDebugDaemonClient() override; - virtual void Init(dbus::Bus* bus) override; - virtual void DumpDebugLogs(bool is_compressed, - base::File file, - scoped_refptr<base::TaskRunner> task_runner, - const GetDebugLogsCallback& callback) override; - virtual void SetDebugMode(const std::string& subsystem, - const SetDebugModeCallback& callback) override; - virtual void StartSystemTracing() override; - virtual bool RequestStopSystemTracing( + void Init(dbus::Bus* bus) override; + void DumpDebugLogs(bool is_compressed, + base::File file, + scoped_refptr<base::TaskRunner> task_runner, + const GetDebugLogsCallback& callback) override; + void SetDebugMode(const std::string& subsystem, + const SetDebugModeCallback& callback) override; + void StartSystemTracing() override; + bool RequestStopSystemTracing( scoped_refptr<base::TaskRunner> task_runner, const StopSystemTracingCallback& callback) override; - virtual void GetRoutes(bool numeric, - bool ipv6, - const GetRoutesCallback& callback) override; - virtual void GetNetworkStatus(const GetNetworkStatusCallback& callback) - override; - virtual void GetModemStatus(const GetModemStatusCallback& callback) override; - virtual void GetWiMaxStatus(const GetWiMaxStatusCallback& callback) override; - virtual void GetNetworkInterfaces( + void GetRoutes(bool numeric, + bool ipv6, + const GetRoutesCallback& callback) override; + void GetNetworkStatus(const GetNetworkStatusCallback& callback) override; + void GetModemStatus(const GetModemStatusCallback& callback) override; + void GetWiMaxStatus(const GetWiMaxStatusCallback& callback) override; + void GetNetworkInterfaces( const GetNetworkInterfacesCallback& callback) override; - virtual void GetPerfData(uint32_t duration, - const GetPerfDataCallback& callback) override; - virtual void GetScrubbedLogs(const GetLogsCallback& callback) override; - virtual void GetAllLogs(const GetLogsCallback& callback) override; - virtual void GetUserLogFiles(const GetLogsCallback& callback) override; - virtual void TestICMP(const std::string& ip_address, - const TestICMPCallback& callback) override; - virtual void TestICMPWithOptions( - const std::string& ip_address, - const std::map<std::string, std::string>& options, - const TestICMPCallback& callback) override; - virtual void UploadCrashes() override; - virtual void EnableDebuggingFeatures( + void GetPerfData(uint32_t duration, + const GetPerfDataCallback& callback) override; + void GetScrubbedLogs(const GetLogsCallback& callback) override; + void GetAllLogs(const GetLogsCallback& callback) override; + void GetUserLogFiles(const GetLogsCallback& callback) override; + void TestICMP(const std::string& ip_address, + const TestICMPCallback& callback) override; + void TestICMPWithOptions(const std::string& ip_address, + const std::map<std::string, std::string>& options, + const TestICMPCallback& callback) override; + void UploadCrashes() override; + void EnableDebuggingFeatures( const std::string& password, const EnableDebuggingCallback& callback) override; - virtual void QueryDebuggingFeatures( + void QueryDebuggingFeatures( const QueryDevFeaturesCallback& callback) override; - virtual void RemoveRootfsVerification( + void RemoveRootfsVerification( const EnableDebuggingCallback& callback) override; - virtual void WaitForServiceToBeAvailable( + void WaitForServiceToBeAvailable( const WaitForServiceToBeAvailableCallback& callback) override; // Sets debugging features mask for testing. diff --git a/chromeos/dbus/fake_gsm_sms_client.h b/chromeos/dbus/fake_gsm_sms_client.h index 379db4e..69a3ebe 100644 --- a/chromeos/dbus/fake_gsm_sms_client.h +++ b/chromeos/dbus/fake_gsm_sms_client.h @@ -18,30 +18,28 @@ namespace chromeos { class CHROMEOS_EXPORT FakeGsmSMSClient : public GsmSMSClient { public: FakeGsmSMSClient(); - virtual ~FakeGsmSMSClient(); + ~FakeGsmSMSClient() override; // GsmSMSClient overrides - virtual void Init(dbus::Bus* bus) override; - virtual void SetSmsReceivedHandler(const std::string& service_name, - const dbus::ObjectPath& object_path, - const SmsReceivedHandler& handler) - override; - virtual void ResetSmsReceivedHandler(const std::string& service_name, - const dbus::ObjectPath& object_path) - override; - virtual void Delete(const std::string& service_name, - const dbus::ObjectPath& object_path, - uint32 index, - const DeleteCallback& callback) override; - virtual void Get(const std::string& service_name, - const dbus::ObjectPath& object_path, - uint32 index, - const GetCallback& callback) override; - virtual void List(const std::string& service_name, - const dbus::ObjectPath& object_path, - const ListCallback& callback) override; - virtual void RequestUpdate(const std::string& service_name, - const dbus::ObjectPath& object_path) override; + void Init(dbus::Bus* bus) override; + void SetSmsReceivedHandler(const std::string& service_name, + const dbus::ObjectPath& object_path, + const SmsReceivedHandler& handler) override; + void ResetSmsReceivedHandler(const std::string& service_name, + const dbus::ObjectPath& object_path) override; + void Delete(const std::string& service_name, + const dbus::ObjectPath& object_path, + uint32 index, + const DeleteCallback& callback) override; + void Get(const std::string& service_name, + const dbus::ObjectPath& object_path, + uint32 index, + const GetCallback& callback) override; + void List(const std::string& service_name, + const dbus::ObjectPath& object_path, + const ListCallback& callback) override; + void RequestUpdate(const std::string& service_name, + const dbus::ObjectPath& object_path) override; // Sets if the command line switch for test is present. RequestUpdate() // changes its behavior depending on the switch. diff --git a/chromeos/dbus/fake_image_burner_client.h b/chromeos/dbus/fake_image_burner_client.h index eaa68df..0941706 100644 --- a/chromeos/dbus/fake_image_burner_client.h +++ b/chromeos/dbus/fake_image_burner_client.h @@ -15,17 +15,17 @@ namespace chromeos { class CHROMEOS_EXPORT FakeImageBurnerClient : public ImageBurnerClient { public: FakeImageBurnerClient(); - virtual ~FakeImageBurnerClient(); + ~FakeImageBurnerClient() override; // ImageBurnerClient overrides - virtual void Init(dbus::Bus* bus) override; - virtual void BurnImage(const std::string& from_path, - const std::string& to_path, - const ErrorCallback& error_callback) override; - virtual void SetEventHandlers( + void Init(dbus::Bus* bus) override; + void BurnImage(const std::string& from_path, + const std::string& to_path, + const ErrorCallback& error_callback) override; + void SetEventHandlers( const BurnFinishedHandler& burn_finished_handler, const BurnProgressUpdateHandler& burn_progress_update_handler) override; - virtual void ResetEventHandlers() override; + void ResetEventHandlers() override; private: DISALLOW_COPY_AND_ASSIGN(FakeImageBurnerClient); diff --git a/chromeos/dbus/fake_introspectable_client.h b/chromeos/dbus/fake_introspectable_client.h index 6a26a89..d16a6cb 100644 --- a/chromeos/dbus/fake_introspectable_client.h +++ b/chromeos/dbus/fake_introspectable_client.h @@ -16,12 +16,12 @@ namespace chromeos { class FakeIntrospectableClient: public IntrospectableClient { public: FakeIntrospectableClient(); - virtual ~FakeIntrospectableClient(); + ~FakeIntrospectableClient() override; - virtual void Init(dbus::Bus* bus) override; - virtual void Introspect(const std::string& service_name, - const dbus::ObjectPath& object_path, - const IntrospectCallback& callback) override; + void Init(dbus::Bus* bus) override; + void Introspect(const std::string& service_name, + const dbus::ObjectPath& object_path, + const IntrospectCallback& callback) override; }; } // namespace chromeos diff --git a/chromeos/dbus/fake_lorgnette_manager_client.h b/chromeos/dbus/fake_lorgnette_manager_client.h index bf61c07..a5fde7c 100644 --- a/chromeos/dbus/fake_lorgnette_manager_client.h +++ b/chromeos/dbus/fake_lorgnette_manager_client.h @@ -19,9 +19,9 @@ class CHROMEOS_EXPORT FakeLorgnetteManagerClient FakeLorgnetteManagerClient(); ~FakeLorgnetteManagerClient() override; - virtual void Init(dbus::Bus* bus) override; + void Init(dbus::Bus* bus) override; - virtual void ListScanners(const ListScannersCallback& callback) override; + void ListScanners(const ListScannersCallback& callback) override; void ScanImageToFile( std::string device_name, const ScanProperties& properties, diff --git a/chromeos/dbus/fake_modem_messaging_client.h b/chromeos/dbus/fake_modem_messaging_client.h index 73fe975..8cfb17b 100644 --- a/chromeos/dbus/fake_modem_messaging_client.h +++ b/chromeos/dbus/fake_modem_messaging_client.h @@ -15,23 +15,21 @@ namespace chromeos { class CHROMEOS_EXPORT FakeModemMessagingClient : public ModemMessagingClient { public: FakeModemMessagingClient(); - virtual ~FakeModemMessagingClient(); - - virtual void Init(dbus::Bus* bus) override; - virtual void SetSmsReceivedHandler(const std::string& service_name, - const dbus::ObjectPath& object_path, - const SmsReceivedHandler& handler) - override; - virtual void ResetSmsReceivedHandler(const std::string& service_name, - const dbus::ObjectPath& object_path) - override; - virtual void Delete(const std::string& service_name, - const dbus::ObjectPath& object_path, - const dbus::ObjectPath& sms_path, - const DeleteCallback& callback) override; - virtual void List(const std::string& service_name, - const dbus::ObjectPath& object_path, - const ListCallback& callback) override; + ~FakeModemMessagingClient() override; + + void Init(dbus::Bus* bus) override; + void SetSmsReceivedHandler(const std::string& service_name, + const dbus::ObjectPath& object_path, + const SmsReceivedHandler& handler) override; + void ResetSmsReceivedHandler(const std::string& service_name, + const dbus::ObjectPath& object_path) override; + void Delete(const std::string& service_name, + const dbus::ObjectPath& object_path, + const dbus::ObjectPath& sms_path, + const DeleteCallback& callback) override; + void List(const std::string& service_name, + const dbus::ObjectPath& object_path, + const ListCallback& callback) override; private: SmsReceivedHandler sms_received_handler_; diff --git a/chromeos/dbus/fake_nfc_adapter_client.h b/chromeos/dbus/fake_nfc_adapter_client.h index 2e4ff99..253ae6c 100644 --- a/chromeos/dbus/fake_nfc_adapter_client.h +++ b/chromeos/dbus/fake_nfc_adapter_client.h @@ -26,32 +26,31 @@ class CHROMEOS_EXPORT FakeNfcAdapterClient : public NfcAdapterClient { // Properties structure that provides fake behavior for D-Bus calls. struct Properties : public NfcAdapterClient::Properties { explicit Properties(const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; // dbus::PropertySet overrides. - virtual void Get(dbus::PropertyBase* property, - dbus::PropertySet::GetCallback callback) override; - virtual void GetAll() override; - virtual void Set(dbus::PropertyBase* property, - dbus::PropertySet::SetCallback callback) override; + void Get(dbus::PropertyBase* property, + dbus::PropertySet::GetCallback callback) override; + void GetAll() override; + void Set(dbus::PropertyBase* property, + dbus::PropertySet::SetCallback callback) override; }; FakeNfcAdapterClient(); - virtual ~FakeNfcAdapterClient(); + ~FakeNfcAdapterClient() override; // NfcAdapterClient overrides. - virtual void Init(dbus::Bus* bus) override; - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual std::vector<dbus::ObjectPath> GetAdapters() override; - virtual Properties* GetProperties( - const dbus::ObjectPath& object_path) override; - virtual void StartPollLoop( + void Init(dbus::Bus* bus) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + std::vector<dbus::ObjectPath> GetAdapters() override; + Properties* GetProperties(const dbus::ObjectPath& object_path) override; + void StartPollLoop( const dbus::ObjectPath& object_path, const std::string& mode, const base::Closure& callback, const nfc_client_helpers::ErrorCallback& error_callback) override; - virtual void StopPollLoop( + void StopPollLoop( const dbus::ObjectPath& object_path, const base::Closure& callback, const nfc_client_helpers::ErrorCallback& error_callback) override; diff --git a/chromeos/dbus/fake_nfc_device_client.h b/chromeos/dbus/fake_nfc_device_client.h index ae47d9d..a8d38e6 100644 --- a/chromeos/dbus/fake_nfc_device_client.h +++ b/chromeos/dbus/fake_nfc_device_client.h @@ -26,32 +26,30 @@ class CHROMEOS_EXPORT FakeNfcDeviceClient : public NfcDeviceClient { // Properties structure that provides fake behavior for D-Bus calls. struct Properties : public NfcDeviceClient::Properties { explicit Properties(const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; // dbus::PropertySet overrides. - virtual void Get(dbus::PropertyBase* property, - dbus::PropertySet::GetCallback callback) override; - virtual void GetAll() override; - virtual void Set(dbus::PropertyBase* property, - dbus::PropertySet::SetCallback callback) override; + void Get(dbus::PropertyBase* property, + dbus::PropertySet::GetCallback callback) override; + void GetAll() override; + void Set(dbus::PropertyBase* property, + dbus::PropertySet::SetCallback callback) override; }; FakeNfcDeviceClient(); - virtual ~FakeNfcDeviceClient(); + ~FakeNfcDeviceClient() override; // NfcDeviceClient overrides. - virtual void Init(dbus::Bus* bus) override; - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual std::vector<dbus::ObjectPath> GetDevicesForAdapter( + void Init(dbus::Bus* bus) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + std::vector<dbus::ObjectPath> GetDevicesForAdapter( const dbus::ObjectPath& adapter_path) override; - virtual Properties* GetProperties( - const dbus::ObjectPath& object_path) override; - virtual void Push( - const dbus::ObjectPath& object_path, - const base::DictionaryValue& attributes, - const base::Closure& callback, - const nfc_client_helpers::ErrorCallback& error_callback) override; + Properties* GetProperties(const dbus::ObjectPath& object_path) override; + void Push(const dbus::ObjectPath& object_path, + const base::DictionaryValue& attributes, + const base::Closure& callback, + const nfc_client_helpers::ErrorCallback& error_callback) override; // Simulates the appearance of a device. The fake device will show up after // exactly |visibility_delay| milliseconds, and will simulate pushing a single diff --git a/chromeos/dbus/fake_nfc_manager_client.h b/chromeos/dbus/fake_nfc_manager_client.h index 98dc8b5..474738a 100644 --- a/chromeos/dbus/fake_nfc_manager_client.h +++ b/chromeos/dbus/fake_nfc_manager_client.h @@ -21,24 +21,24 @@ class CHROMEOS_EXPORT FakeNfcManagerClient : public NfcManagerClient { public: struct Properties : public NfcManagerClient::Properties { explicit Properties(const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; // dbus::PropertySet overrides. - virtual void Get(dbus::PropertyBase* property, - dbus::PropertySet::GetCallback callback) override; - virtual void GetAll() override; - virtual void Set(dbus::PropertyBase* property, - dbus::PropertySet::SetCallback callback) override; + void Get(dbus::PropertyBase* property, + dbus::PropertySet::GetCallback callback) override; + void GetAll() override; + void Set(dbus::PropertyBase* property, + dbus::PropertySet::SetCallback callback) override; }; FakeNfcManagerClient(); - virtual ~FakeNfcManagerClient(); + ~FakeNfcManagerClient() override; // NfcManagerClient overrides. - virtual void Init(dbus::Bus* bus) override; - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual Properties* GetProperties() override; + void Init(dbus::Bus* bus) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + Properties* GetProperties() override; // Methods to simulate adapters getting added and removed. void AddAdapter(const std::string& adapter_path); diff --git a/chromeos/dbus/fake_nfc_record_client.h b/chromeos/dbus/fake_nfc_record_client.h index 0935aef..c8cd209 100644 --- a/chromeos/dbus/fake_nfc_record_client.h +++ b/chromeos/dbus/fake_nfc_record_client.h @@ -27,29 +27,28 @@ class CHROMEOS_EXPORT FakeNfcRecordClient : public NfcRecordClient { // Properties structure that provides fake behavior for D-Bus calls. struct Properties : public NfcRecordClient::Properties { explicit Properties(const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; // dbus::PropertySet overrides. - virtual void Get(dbus::PropertyBase* property, - dbus::PropertySet::GetCallback callback) override; - virtual void GetAll() override; - virtual void Set(dbus::PropertyBase* property, - dbus::PropertySet::SetCallback callback) override; + void Get(dbus::PropertyBase* property, + dbus::PropertySet::GetCallback callback) override; + void GetAll() override; + void Set(dbus::PropertyBase* property, + dbus::PropertySet::SetCallback callback) override; }; FakeNfcRecordClient(); - virtual ~FakeNfcRecordClient(); + ~FakeNfcRecordClient() override; // NfcTagClient overrides. - virtual void Init(dbus::Bus* bus) override; - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual std::vector<dbus::ObjectPath> GetRecordsForDevice( + void Init(dbus::Bus* bus) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + std::vector<dbus::ObjectPath> GetRecordsForDevice( const dbus::ObjectPath& device_path) override; - virtual std::vector<dbus::ObjectPath> GetRecordsForTag( + std::vector<dbus::ObjectPath> GetRecordsForTag( const dbus::ObjectPath& tag_path) override; - virtual Properties* GetProperties( - const dbus::ObjectPath& object_path) override; + Properties* GetProperties(const dbus::ObjectPath& object_path) override; // Adds or removes the fake record objects and notifies the observers. void SetDeviceRecordsVisible(bool visible); diff --git a/chromeos/dbus/fake_nfc_tag_client.h b/chromeos/dbus/fake_nfc_tag_client.h index ec50c0b..a2fdcbf 100644 --- a/chromeos/dbus/fake_nfc_tag_client.h +++ b/chromeos/dbus/fake_nfc_tag_client.h @@ -24,32 +24,30 @@ class CHROMEOS_EXPORT FakeNfcTagClient : public NfcTagClient { struct Properties : public NfcTagClient::Properties { explicit Properties(const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; // dbus::PropertySet overrides. - virtual void Get(dbus::PropertyBase* property, - dbus::PropertySet::GetCallback callback) override; - virtual void GetAll() override; - virtual void Set(dbus::PropertyBase* property, - dbus::PropertySet::SetCallback callback) override; + void Get(dbus::PropertyBase* property, + dbus::PropertySet::GetCallback callback) override; + void GetAll() override; + void Set(dbus::PropertyBase* property, + dbus::PropertySet::SetCallback callback) override; }; FakeNfcTagClient(); - virtual ~FakeNfcTagClient(); + ~FakeNfcTagClient() override; // NfcTagClient overrides. - virtual void Init(dbus::Bus* bus) override; - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual std::vector<dbus::ObjectPath> GetTagsForAdapter( + void Init(dbus::Bus* bus) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + std::vector<dbus::ObjectPath> GetTagsForAdapter( const dbus::ObjectPath& adapter_path) override; - virtual Properties* GetProperties( - const dbus::ObjectPath& object_path) override; - virtual void Write( - const dbus::ObjectPath& object_path, - const base::DictionaryValue& attributes, - const base::Closure& callback, - const nfc_client_helpers::ErrorCallback& error_callback) override; + Properties* GetProperties(const dbus::ObjectPath& object_path) override; + void Write(const dbus::ObjectPath& object_path, + const base::DictionaryValue& attributes, + const base::Closure& callback, + const nfc_client_helpers::ErrorCallback& error_callback) override; // Simulates the appearance of a tag. The fake tag will show up after // exactly |visibility_delay| milliseconds. |visibility_delay| must have a diff --git a/chromeos/dbus/fake_permission_broker_client.h b/chromeos/dbus/fake_permission_broker_client.h index 702a134..2c475ac 100644 --- a/chromeos/dbus/fake_permission_broker_client.h +++ b/chromeos/dbus/fake_permission_broker_client.h @@ -14,12 +14,12 @@ namespace chromeos { class FakePermissionBrokerClient : public PermissionBrokerClient { public: FakePermissionBrokerClient(); - virtual ~FakePermissionBrokerClient(); + ~FakePermissionBrokerClient() override; - virtual void Init(dbus::Bus* bus) override; - virtual void RequestPathAccess(const std::string& path, - int interface_id, - const ResultCallback& callback) override; + void Init(dbus::Bus* bus) override; + void RequestPathAccess(const std::string& path, + int interface_id, + const ResultCallback& callback) override; private: DISALLOW_COPY_AND_ASSIGN(FakePermissionBrokerClient); diff --git a/chromeos/dbus/fake_power_manager_client.h b/chromeos/dbus/fake_power_manager_client.h index 9b9c6cd..604b345 100644 --- a/chromeos/dbus/fake_power_manager_client.h +++ b/chromeos/dbus/fake_power_manager_client.h @@ -22,7 +22,7 @@ namespace chromeos { class FakePowerManagerClient : public PowerManagerClient { public: FakePowerManagerClient(); - virtual ~FakePowerManagerClient(); + ~FakePowerManagerClient() override; power_manager::PowerManagementPolicy& policy() { return policy_; } int num_request_restart_calls() const { return num_request_restart_calls_; } @@ -34,32 +34,29 @@ class FakePowerManagerClient : public PowerManagerClient { bool is_projecting() const { return is_projecting_; } // PowerManagerClient overrides - virtual void Init(dbus::Bus* bus) override; - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual bool HasObserver(const Observer* observer) const override; - virtual void SetRenderProcessManagerDelegate( + void Init(dbus::Bus* bus) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + bool HasObserver(const Observer* observer) const override; + void SetRenderProcessManagerDelegate( base::WeakPtr<RenderProcessManagerDelegate> delegate) override; - virtual void DecreaseScreenBrightness(bool allow_off) override; - virtual void IncreaseScreenBrightness() override; - virtual void SetScreenBrightnessPercent( - double percent, bool gradual) override; - virtual void GetScreenBrightnessPercent( + void DecreaseScreenBrightness(bool allow_off) override; + void IncreaseScreenBrightness() override; + void SetScreenBrightnessPercent(double percent, bool gradual) override; + void GetScreenBrightnessPercent( const GetScreenBrightnessPercentCallback& callback) override; - virtual void DecreaseKeyboardBrightness() override; - virtual void IncreaseKeyboardBrightness() override; - virtual void RequestStatusUpdate() override; - virtual void RequestSuspend() override; - virtual void RequestRestart() override; - virtual void RequestShutdown() override; - virtual void NotifyUserActivity( - power_manager::UserActivityType type) override; - virtual void NotifyVideoActivity(bool is_fullscreen) override; - virtual void SetPolicy( - const power_manager::PowerManagementPolicy& policy) override; - virtual void SetIsProjecting(bool is_projecting) override; - virtual base::Closure GetSuspendReadinessCallback() override; - virtual int GetNumPendingSuspendReadinessCallbacks() override; + void DecreaseKeyboardBrightness() override; + void IncreaseKeyboardBrightness() override; + void RequestStatusUpdate() override; + void RequestSuspend() override; + void RequestRestart() override; + void RequestShutdown() override; + void NotifyUserActivity(power_manager::UserActivityType type) override; + void NotifyVideoActivity(bool is_fullscreen) override; + void SetPolicy(const power_manager::PowerManagementPolicy& policy) override; + void SetIsProjecting(bool is_projecting) override; + base::Closure GetSuspendReadinessCallback() override; + int GetNumPendingSuspendReadinessCallbacks() override; // Emulates the power manager announcing that the system is starting or // completing a suspend attempt. diff --git a/chromeos/dbus/fake_session_manager_client.h b/chromeos/dbus/fake_session_manager_client.h index 3d11691..5db16d7 100644 --- a/chromeos/dbus/fake_session_manager_client.h +++ b/chromeos/dbus/fake_session_manager_client.h @@ -21,50 +21,46 @@ namespace chromeos { class FakeSessionManagerClient : public SessionManagerClient { public: FakeSessionManagerClient(); - virtual ~FakeSessionManagerClient(); + ~FakeSessionManagerClient() override; // SessionManagerClient overrides - virtual void Init(dbus::Bus* bus) override; - virtual void SetStubDelegate(StubDelegate* delegate) override; - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual bool HasObserver(const Observer* observer) const override; - virtual bool IsScreenLocked() const override; - virtual void EmitLoginPromptVisible() override; - virtual void RestartJob(int pid, const std::string& command_line) override; - virtual void StartSession(const std::string& user_email) override; - virtual void StopSession() override; - virtual void NotifySupervisedUserCreationStarted() override; - virtual void NotifySupervisedUserCreationFinished() override; - virtual void StartDeviceWipe() override; - virtual void RequestLockScreen() override; - virtual void NotifyLockScreenShown() override; - virtual void NotifyLockScreenDismissed() override; - virtual void RetrieveActiveSessions( - const ActiveSessionsCallback& callback) override; - virtual void RetrieveDevicePolicy( - const RetrievePolicyCallback& callback) override; - virtual void RetrievePolicyForUser( - const std::string& username, - const RetrievePolicyCallback& callback) override; - virtual std::string BlockingRetrievePolicyForUser( + void Init(dbus::Bus* bus) override; + void SetStubDelegate(StubDelegate* delegate) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + bool HasObserver(const Observer* observer) const override; + bool IsScreenLocked() const override; + void EmitLoginPromptVisible() override; + void RestartJob(int pid, const std::string& command_line) override; + void StartSession(const std::string& user_email) override; + void StopSession() override; + void NotifySupervisedUserCreationStarted() override; + void NotifySupervisedUserCreationFinished() override; + void StartDeviceWipe() override; + void RequestLockScreen() override; + void NotifyLockScreenShown() override; + void NotifyLockScreenDismissed() override; + void RetrieveActiveSessions(const ActiveSessionsCallback& callback) override; + void RetrieveDevicePolicy(const RetrievePolicyCallback& callback) override; + void RetrievePolicyForUser(const std::string& username, + const RetrievePolicyCallback& callback) override; + std::string BlockingRetrievePolicyForUser( const std::string& username) override; - virtual void RetrieveDeviceLocalAccountPolicy( + void RetrieveDeviceLocalAccountPolicy( const std::string& account_id, const RetrievePolicyCallback& callback) override; - virtual void StoreDevicePolicy(const std::string& policy_blob, - const StorePolicyCallback& callback) override; - virtual void StorePolicyForUser(const std::string& username, - const std::string& policy_blob, - const StorePolicyCallback& callback) override; - virtual void StoreDeviceLocalAccountPolicy( + void StoreDevicePolicy(const std::string& policy_blob, + const StorePolicyCallback& callback) override; + void StorePolicyForUser(const std::string& username, + const std::string& policy_blob, + const StorePolicyCallback& callback) override; + void StoreDeviceLocalAccountPolicy( const std::string& account_id, const std::string& policy_blob, const StorePolicyCallback& callback) override; - virtual void SetFlagsForUser(const std::string& username, - const std::vector<std::string>& flags) override; - virtual void GetServerBackedStateKeys(const StateKeysCallback& callback) - override; + void SetFlagsForUser(const std::string& username, + const std::vector<std::string>& flags) override; + void GetServerBackedStateKeys(const StateKeysCallback& callback) override; const std::string& device_policy() const; void set_device_policy(const std::string& policy_blob); diff --git a/chromeos/dbus/fake_shill_device_client.h b/chromeos/dbus/fake_shill_device_client.h index 6d97e12..57bd453 100644 --- a/chromeos/dbus/fake_shill_device_client.h +++ b/chromeos/dbus/fake_shill_device_client.h @@ -22,68 +22,66 @@ class CHROMEOS_EXPORT FakeShillDeviceClient public ShillDeviceClient::TestInterface { public: FakeShillDeviceClient(); - virtual ~FakeShillDeviceClient(); + ~FakeShillDeviceClient() override; // ShillDeviceClient overrides - virtual void Init(dbus::Bus* bus) override; - virtual void AddPropertyChangedObserver( + void Init(dbus::Bus* bus) override; + void AddPropertyChangedObserver( const dbus::ObjectPath& device_path, ShillPropertyChangedObserver* observer) override; - virtual void RemovePropertyChangedObserver( + void RemovePropertyChangedObserver( const dbus::ObjectPath& device_path, ShillPropertyChangedObserver* observer) override; - virtual void GetProperties(const dbus::ObjectPath& device_path, - const DictionaryValueCallback& callback) override; - virtual void ProposeScan(const dbus::ObjectPath& device_path, - const VoidDBusMethodCallback& callback) override; - virtual void SetProperty(const dbus::ObjectPath& device_path, - const std::string& name, - const base::Value& value, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void ClearProperty(const dbus::ObjectPath& device_path, - const std::string& name, - const VoidDBusMethodCallback& callback) override; - virtual void AddIPConfig( - const dbus::ObjectPath& device_path, - const std::string& method, - const ObjectPathDBusMethodCallback& callback) override; - virtual void RequirePin(const dbus::ObjectPath& device_path, - const std::string& pin, - bool require, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void EnterPin(const dbus::ObjectPath& device_path, - const std::string& pin, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void UnblockPin(const dbus::ObjectPath& device_path, - const std::string& puk, - const std::string& pin, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void ChangePin(const dbus::ObjectPath& device_path, - const std::string& old_pin, - const std::string& new_pin, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void Register(const dbus::ObjectPath& device_path, - const std::string& network_id, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void SetCarrier(const dbus::ObjectPath& device_path, - const std::string& carrier, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void Reset(const dbus::ObjectPath& device_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void PerformTDLSOperation( - const dbus::ObjectPath& device_path, - const std::string& operation, - const std::string& peer, - const StringCallback& callback, - const ErrorCallback& error_callback) override; + void GetProperties(const dbus::ObjectPath& device_path, + const DictionaryValueCallback& callback) override; + void ProposeScan(const dbus::ObjectPath& device_path, + const VoidDBusMethodCallback& callback) override; + void SetProperty(const dbus::ObjectPath& device_path, + const std::string& name, + const base::Value& value, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void ClearProperty(const dbus::ObjectPath& device_path, + const std::string& name, + const VoidDBusMethodCallback& callback) override; + void AddIPConfig(const dbus::ObjectPath& device_path, + const std::string& method, + const ObjectPathDBusMethodCallback& callback) override; + void RequirePin(const dbus::ObjectPath& device_path, + const std::string& pin, + bool require, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void EnterPin(const dbus::ObjectPath& device_path, + const std::string& pin, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void UnblockPin(const dbus::ObjectPath& device_path, + const std::string& puk, + const std::string& pin, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void ChangePin(const dbus::ObjectPath& device_path, + const std::string& old_pin, + const std::string& new_pin, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void Register(const dbus::ObjectPath& device_path, + const std::string& network_id, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void SetCarrier(const dbus::ObjectPath& device_path, + const std::string& carrier, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void Reset(const dbus::ObjectPath& device_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void PerformTDLSOperation(const dbus::ObjectPath& device_path, + const std::string& operation, + const std::string& peer, + const StringCallback& callback, + const ErrorCallback& error_callback) override; void AddWakeOnPacketConnection( const dbus::ObjectPath& device_path, const net::IPEndPoint& ip_endpoint, @@ -99,18 +97,18 @@ class CHROMEOS_EXPORT FakeShillDeviceClient const base::Closure& callback, const ErrorCallback& error_callback) override; - virtual ShillDeviceClient::TestInterface* GetTestInterface() override; + ShillDeviceClient::TestInterface* GetTestInterface() override; // ShillDeviceClient::TestInterface overrides. - virtual void AddDevice(const std::string& device_path, - const std::string& type, - const std::string& name) override; - virtual void RemoveDevice(const std::string& device_path) override; - virtual void ClearDevices() override; - virtual void SetDeviceProperty(const std::string& device_path, - const std::string& name, - const base::Value& value) override; - virtual std::string GetDevicePathForType(const std::string& type) override; + void AddDevice(const std::string& device_path, + const std::string& type, + const std::string& name) override; + void RemoveDevice(const std::string& device_path) override; + void ClearDevices() override; + void SetDeviceProperty(const std::string& device_path, + const std::string& name, + const base::Value& value) override; + std::string GetDevicePathForType(const std::string& type) override; void set_tdls_busy_count(int count) { tdls_busy_count_ = count; } diff --git a/chromeos/dbus/fake_shill_ipconfig_client.h b/chromeos/dbus/fake_shill_ipconfig_client.h index 9a2e3ef..6552079 100644 --- a/chromeos/dbus/fake_shill_ipconfig_client.h +++ b/chromeos/dbus/fake_shill_ipconfig_client.h @@ -19,34 +19,34 @@ class CHROMEOS_EXPORT FakeShillIPConfigClient public ShillIPConfigClient::TestInterface { public: FakeShillIPConfigClient(); - virtual ~FakeShillIPConfigClient(); + ~FakeShillIPConfigClient() override; // ShillIPConfigClient overrides - virtual void Init(dbus::Bus* bus) override; - virtual void AddPropertyChangedObserver( + void Init(dbus::Bus* bus) override; + void AddPropertyChangedObserver( const dbus::ObjectPath& ipconfig_path, ShillPropertyChangedObserver* observer) override; - virtual void RemovePropertyChangedObserver( + void RemovePropertyChangedObserver( const dbus::ObjectPath& ipconfig_path, ShillPropertyChangedObserver* observer) override; - virtual void Refresh(const dbus::ObjectPath& ipconfig_path, - const VoidDBusMethodCallback& callback) override; - virtual void GetProperties(const dbus::ObjectPath& ipconfig_path, - const DictionaryValueCallback& callback) override; - virtual void SetProperty(const dbus::ObjectPath& ipconfig_path, - const std::string& name, - const base::Value& value, - const VoidDBusMethodCallback& callback) override; - virtual void ClearProperty(const dbus::ObjectPath& ipconfig_path, - const std::string& name, - const VoidDBusMethodCallback& callback) override; - virtual void Remove(const dbus::ObjectPath& ipconfig_path, - const VoidDBusMethodCallback& callback) override; - virtual ShillIPConfigClient::TestInterface* GetTestInterface() override; + void Refresh(const dbus::ObjectPath& ipconfig_path, + const VoidDBusMethodCallback& callback) override; + void GetProperties(const dbus::ObjectPath& ipconfig_path, + const DictionaryValueCallback& callback) override; + void SetProperty(const dbus::ObjectPath& ipconfig_path, + const std::string& name, + const base::Value& value, + const VoidDBusMethodCallback& callback) override; + void ClearProperty(const dbus::ObjectPath& ipconfig_path, + const std::string& name, + const VoidDBusMethodCallback& callback) override; + void Remove(const dbus::ObjectPath& ipconfig_path, + const VoidDBusMethodCallback& callback) override; + ShillIPConfigClient::TestInterface* GetTestInterface() override; // ShillIPConfigClient::TestInterface overrides. - virtual void AddIPConfig(const std::string& ip_config_path, - const base::DictionaryValue& properties) override; + void AddIPConfig(const std::string& ip_config_path, + const base::DictionaryValue& properties) override; private: // Runs callback with |values|. diff --git a/chromeos/dbus/fake_shill_manager_client.h b/chromeos/dbus/fake_shill_manager_client.h index a2e6bca..92f80e2 100644 --- a/chromeos/dbus/fake_shill_manager_client.h +++ b/chromeos/dbus/fake_shill_manager_client.h @@ -26,89 +26,81 @@ class CHROMEOS_EXPORT FakeShillManagerClient public ShillManagerClient::TestInterface { public: FakeShillManagerClient(); - virtual ~FakeShillManagerClient(); + ~FakeShillManagerClient() override; // ShillManagerClient overrides - virtual void Init(dbus::Bus* bus) override; - virtual void AddPropertyChangedObserver( + void Init(dbus::Bus* bus) override; + void AddPropertyChangedObserver( ShillPropertyChangedObserver* observer) override; - virtual void RemovePropertyChangedObserver( + void RemovePropertyChangedObserver( ShillPropertyChangedObserver* observer) override; - virtual void GetProperties(const DictionaryValueCallback& callback) override; - virtual void GetNetworksForGeolocation( + void GetProperties(const DictionaryValueCallback& callback) override; + void GetNetworksForGeolocation( const DictionaryValueCallback& callback) override; - virtual void SetProperty(const std::string& name, - const base::Value& value, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void RequestScan(const std::string& type, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void EnableTechnology( - const std::string& type, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void DisableTechnology( - const std::string& type, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void ConfigureService( - const base::DictionaryValue& properties, - const ObjectPathCallback& callback, - const ErrorCallback& error_callback) override; - virtual void ConfigureServiceForProfile( - const dbus::ObjectPath& profile_path, - const base::DictionaryValue& properties, - const ObjectPathCallback& callback, - const ErrorCallback& error_callback) override; - virtual void GetService( - const base::DictionaryValue& properties, - const ObjectPathCallback& callback, - const ErrorCallback& error_callback) override; - virtual void VerifyDestination(const VerificationProperties& properties, - const BooleanCallback& callback, - const ErrorCallback& error_callback) override; - virtual void VerifyAndEncryptCredentials( + void SetProperty(const std::string& name, + const base::Value& value, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void RequestScan(const std::string& type, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void EnableTechnology(const std::string& type, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void DisableTechnology(const std::string& type, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void ConfigureService(const base::DictionaryValue& properties, + const ObjectPathCallback& callback, + const ErrorCallback& error_callback) override; + void ConfigureServiceForProfile(const dbus::ObjectPath& profile_path, + const base::DictionaryValue& properties, + const ObjectPathCallback& callback, + const ErrorCallback& error_callback) override; + void GetService(const base::DictionaryValue& properties, + const ObjectPathCallback& callback, + const ErrorCallback& error_callback) override; + void VerifyDestination(const VerificationProperties& properties, + const BooleanCallback& callback, + const ErrorCallback& error_callback) override; + void VerifyAndEncryptCredentials( const VerificationProperties& properties, const std::string& service_path, const StringCallback& callback, const ErrorCallback& error_callback) override; - virtual void VerifyAndEncryptData( - const VerificationProperties& properties, - const std::string& data, - const StringCallback& callback, - const ErrorCallback& error_callback) override; - virtual void ConnectToBestServices( - const base::Closure& callback, - const ErrorCallback& error_callback) override; + void VerifyAndEncryptData(const VerificationProperties& properties, + const std::string& data, + const StringCallback& callback, + const ErrorCallback& error_callback) override; + void ConnectToBestServices(const base::Closure& callback, + const ErrorCallback& error_callback) override; - virtual ShillManagerClient::TestInterface* GetTestInterface() override; + ShillManagerClient::TestInterface* GetTestInterface() override; // ShillManagerClient::TestInterface overrides. - virtual void AddDevice(const std::string& device_path) override; - virtual void RemoveDevice(const std::string& device_path) override; - virtual void ClearDevices() override; - virtual void AddTechnology(const std::string& type, bool enabled) override; - virtual void RemoveTechnology(const std::string& type) override; - virtual void SetTechnologyInitializing(const std::string& type, - bool initializing) override; - virtual void AddGeoNetwork(const std::string& technology, - const base::DictionaryValue& network) override; - virtual void AddProfile(const std::string& profile_path) override; - virtual void ClearProperties() override; - virtual void SetManagerProperty(const std::string& key, - const base::Value& value) override; - virtual void AddManagerService(const std::string& service_path, - bool notify_observers) override; - virtual void RemoveManagerService(const std::string& service_path) override; - virtual void ClearManagerServices() override; - virtual void ServiceStateChanged(const std::string& service_path, - const std::string& state) override; - virtual void SortManagerServices(bool notify) override; - virtual void SetupDefaultEnvironment() override; - virtual int GetInteractiveDelay() const override; - virtual void SetBestServiceToConnect( - const std::string& service_path) override; + void AddDevice(const std::string& device_path) override; + void RemoveDevice(const std::string& device_path) override; + void ClearDevices() override; + void AddTechnology(const std::string& type, bool enabled) override; + void RemoveTechnology(const std::string& type) override; + void SetTechnologyInitializing(const std::string& type, + bool initializing) override; + void AddGeoNetwork(const std::string& technology, + const base::DictionaryValue& network) override; + void AddProfile(const std::string& profile_path) override; + void ClearProperties() override; + void SetManagerProperty(const std::string& key, + const base::Value& value) override; + void AddManagerService(const std::string& service_path, + bool notify_observers) override; + void RemoveManagerService(const std::string& service_path) override; + void ClearManagerServices() override; + void ServiceStateChanged(const std::string& service_path, + const std::string& state) override; + void SortManagerServices(bool notify) override; + void SetupDefaultEnvironment() override; + int GetInteractiveDelay() const override; + void SetBestServiceToConnect(const std::string& service_path) override; // Constants used for testing. static const char kFakeEthernetNetworkGuid[]; diff --git a/chromeos/dbus/fake_shill_profile_client.h b/chromeos/dbus/fake_shill_profile_client.h index 904fa3f..8c33bfb 100644 --- a/chromeos/dbus/fake_shill_profile_client.h +++ b/chromeos/dbus/fake_shill_profile_client.h @@ -21,45 +21,44 @@ class CHROMEOS_EXPORT FakeShillProfileClient : public ShillProfileClient::TestInterface { public: FakeShillProfileClient(); - virtual ~FakeShillProfileClient(); + ~FakeShillProfileClient() override; // ShillProfileClient overrides - virtual void Init(dbus::Bus* bus) override; - virtual void AddPropertyChangedObserver( + void Init(dbus::Bus* bus) override; + void AddPropertyChangedObserver( const dbus::ObjectPath& profile_path, ShillPropertyChangedObserver* observer) override; - virtual void RemovePropertyChangedObserver( + void RemovePropertyChangedObserver( const dbus::ObjectPath& profile_path, ShillPropertyChangedObserver* observer) override; - virtual void GetProperties( - const dbus::ObjectPath& profile_path, - const DictionaryValueCallbackWithoutStatus& callback, - const ErrorCallback& error_callback) override; - virtual void GetEntry(const dbus::ObjectPath& profile_path, - const std::string& entry_path, - const DictionaryValueCallbackWithoutStatus& callback, - const ErrorCallback& error_callback) override; - virtual void DeleteEntry(const dbus::ObjectPath& profile_path, - const std::string& entry_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual ShillProfileClient::TestInterface* GetTestInterface() override; + void GetProperties(const dbus::ObjectPath& profile_path, + const DictionaryValueCallbackWithoutStatus& callback, + const ErrorCallback& error_callback) override; + void GetEntry(const dbus::ObjectPath& profile_path, + const std::string& entry_path, + const DictionaryValueCallbackWithoutStatus& callback, + const ErrorCallback& error_callback) override; + void DeleteEntry(const dbus::ObjectPath& profile_path, + const std::string& entry_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + ShillProfileClient::TestInterface* GetTestInterface() override; // ShillProfileClient::TestInterface overrides. - virtual void AddProfile(const std::string& profile_path, - const std::string& userhash) override; - virtual void AddEntry(const std::string& profile_path, - const std::string& entry_path, - const base::DictionaryValue& properties) override; - virtual bool AddService(const std::string& profile_path, - const std::string& service_path) override; - virtual bool UpdateService(const std::string& profile_path, - const std::string& service_path) override; - virtual void GetProfilePaths(std::vector<std::string>* profiles) override; - virtual bool GetService(const std::string& service_path, - std::string* profile_path, - base::DictionaryValue* properties) override; - virtual void ClearProfiles() override; + void AddProfile(const std::string& profile_path, + const std::string& userhash) override; + void AddEntry(const std::string& profile_path, + const std::string& entry_path, + const base::DictionaryValue& properties) override; + bool AddService(const std::string& profile_path, + const std::string& service_path) override; + bool UpdateService(const std::string& profile_path, + const std::string& service_path) override; + void GetProfilePaths(std::vector<std::string>* profiles) override; + bool GetService(const std::string& service_path, + std::string* profile_path, + base::DictionaryValue* properties) override; + void ClearProfiles() override; private: struct ProfileProperties; diff --git a/chromeos/dbus/fake_shill_service_client.h b/chromeos/dbus/fake_shill_service_client.h index 51bf55e..cf5777a 100644 --- a/chromeos/dbus/fake_shill_service_client.h +++ b/chromeos/dbus/fake_shill_service_client.h @@ -23,88 +23,85 @@ class CHROMEOS_EXPORT FakeShillServiceClient public ShillServiceClient::TestInterface { public: FakeShillServiceClient(); - virtual ~FakeShillServiceClient(); + ~FakeShillServiceClient() override; // ShillServiceClient overrides - virtual void Init(dbus::Bus* bus) override; - virtual void AddPropertyChangedObserver( + void Init(dbus::Bus* bus) override; + void AddPropertyChangedObserver( const dbus::ObjectPath& service_path, ShillPropertyChangedObserver* observer) override; - virtual void RemovePropertyChangedObserver( + void RemovePropertyChangedObserver( const dbus::ObjectPath& service_path, ShillPropertyChangedObserver* observer) override; - virtual void GetProperties(const dbus::ObjectPath& service_path, - const DictionaryValueCallback& callback) override; - virtual void SetProperty(const dbus::ObjectPath& service_path, - const std::string& name, - const base::Value& value, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void SetProperties(const dbus::ObjectPath& service_path, - const base::DictionaryValue& properties, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void ClearProperty(const dbus::ObjectPath& service_path, - const std::string& name, + void GetProperties(const dbus::ObjectPath& service_path, + const DictionaryValueCallback& callback) override; + void SetProperty(const dbus::ObjectPath& service_path, + const std::string& name, + const base::Value& value, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void SetProperties(const dbus::ObjectPath& service_path, + const base::DictionaryValue& properties, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void ClearProperty(const dbus::ObjectPath& service_path, + const std::string& name, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void ClearProperties(const dbus::ObjectPath& service_path, + const std::vector<std::string>& names, + const ListValueCallback& callback, + const ErrorCallback& error_callback) override; + void Connect(const dbus::ObjectPath& service_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void Disconnect(const dbus::ObjectPath& service_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void Remove(const dbus::ObjectPath& service_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void ActivateCellularModem(const dbus::ObjectPath& service_path, + const std::string& carrier, const base::Closure& callback, const ErrorCallback& error_callback) override; - virtual void ClearProperties(const dbus::ObjectPath& service_path, - const std::vector<std::string>& names, - const ListValueCallback& callback, - const ErrorCallback& error_callback) override; - virtual void Connect(const dbus::ObjectPath& service_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void Disconnect(const dbus::ObjectPath& service_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void Remove(const dbus::ObjectPath& service_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void ActivateCellularModem( - const dbus::ObjectPath& service_path, - const std::string& carrier, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void CompleteCellularActivation( - const dbus::ObjectPath& service_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - virtual void GetLoadableProfileEntries( + void CompleteCellularActivation(const dbus::ObjectPath& service_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + void GetLoadableProfileEntries( const dbus::ObjectPath& service_path, const DictionaryValueCallback& callback) override; - virtual ShillServiceClient::TestInterface* GetTestInterface() override; + ShillServiceClient::TestInterface* GetTestInterface() override; // ShillServiceClient::TestInterface overrides. - virtual void AddService(const std::string& service_path, - const std::string& guid, - const std::string& name, - const std::string& type, - const std::string& state, - bool visible) override; - virtual void AddServiceWithIPConfig(const std::string& service_path, - const std::string& guid, - const std::string& name, - const std::string& type, - const std::string& state, - const std::string& ipconfig_path, - bool visible) override; - virtual base::DictionaryValue* SetServiceProperties( - const std::string& service_path, - const std::string& guid, - const std::string& name, - const std::string& type, - const std::string& state, - bool visible) override; - virtual void RemoveService(const std::string& service_path) override; - virtual bool SetServiceProperty(const std::string& service_path, - const std::string& property, - const base::Value& value) override; - virtual const base::DictionaryValue* GetServiceProperties( + void AddService(const std::string& service_path, + const std::string& guid, + const std::string& name, + const std::string& type, + const std::string& state, + bool visible) override; + void AddServiceWithIPConfig(const std::string& service_path, + const std::string& guid, + const std::string& name, + const std::string& type, + const std::string& state, + const std::string& ipconfig_path, + bool visible) override; + base::DictionaryValue* SetServiceProperties(const std::string& service_path, + const std::string& guid, + const std::string& name, + const std::string& type, + const std::string& state, + bool visible) override; + void RemoveService(const std::string& service_path) override; + bool SetServiceProperty(const std::string& service_path, + const std::string& property, + const base::Value& value) override; + const base::DictionaryValue* GetServiceProperties( const std::string& service_path) const override; - virtual void ClearServices() override; - virtual void SetConnectBehavior(const std::string& service_path, - const base::Closure& behavior) override; + void ClearServices() override; + void SetConnectBehavior(const std::string& service_path, + const base::Closure& behavior) override; private: typedef ObserverList<ShillPropertyChangedObserver> PropertyObserverList; diff --git a/chromeos/dbus/fake_sms_client.h b/chromeos/dbus/fake_sms_client.h index 54ea629..c682e2b 100644 --- a/chromeos/dbus/fake_sms_client.h +++ b/chromeos/dbus/fake_sms_client.h @@ -15,13 +15,13 @@ namespace chromeos { class FakeSMSClient : public SMSClient { public: FakeSMSClient(); - virtual ~FakeSMSClient(); + ~FakeSMSClient() override; - virtual void Init(dbus::Bus* bus) override; + void Init(dbus::Bus* bus) override; - virtual void GetAll(const std::string& service_name, - const dbus::ObjectPath& object_path, - const GetAllCallback& callback) override; + void GetAll(const std::string& service_name, + const dbus::ObjectPath& object_path, + const GetAllCallback& callback) override; private: void OnGetAll(base::DictionaryValue* sms, const GetAllCallback& callback); diff --git a/chromeos/dbus/fake_system_clock_client.h b/chromeos/dbus/fake_system_clock_client.h index 104f514..6f5f847 100644 --- a/chromeos/dbus/fake_system_clock_client.h +++ b/chromeos/dbus/fake_system_clock_client.h @@ -13,15 +13,15 @@ namespace chromeos { class CHROMEOS_EXPORT FakeSystemClockClient : public SystemClockClient { public: FakeSystemClockClient(); - virtual ~FakeSystemClockClient(); + ~FakeSystemClockClient() override; // SystemClockClient overrides - virtual void Init(dbus::Bus* bus) override; - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual bool HasObserver(const Observer* observer) const override; - virtual void SetTime(int64 time_in_seconds) override; - virtual bool CanSetTime() override; + void Init(dbus::Bus* bus) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + bool HasObserver(const Observer* observer) const override; + void SetTime(int64 time_in_seconds) override; + bool CanSetTime() override; private: DISALLOW_COPY_AND_ASSIGN(FakeSystemClockClient); diff --git a/chromeos/dbus/fake_update_engine_client.h b/chromeos/dbus/fake_update_engine_client.h index db61d0e..814be54 100644 --- a/chromeos/dbus/fake_update_engine_client.h +++ b/chromeos/dbus/fake_update_engine_client.h @@ -19,23 +19,22 @@ namespace chromeos { class FakeUpdateEngineClient : public UpdateEngineClient { public: FakeUpdateEngineClient(); - virtual ~FakeUpdateEngineClient(); + ~FakeUpdateEngineClient() override; // UpdateEngineClient overrides - virtual void Init(dbus::Bus* bus) override; - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual bool HasObserver(const Observer* observer) const override; - virtual void RequestUpdateCheck(const UpdateCheckCallback& callback) override; - virtual void RebootAfterUpdate() override; - virtual void Rollback() override; - virtual void CanRollbackCheck( - const RollbackCheckCallback& callback) override; - virtual Status GetLastStatus() override; - virtual void SetChannel(const std::string& target_channel, - bool is_powerwash_allowed) override; - virtual void GetChannel(bool get_current_channel, - const GetChannelCallback& callback) override; + void Init(dbus::Bus* bus) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + bool HasObserver(const Observer* observer) const override; + void RequestUpdateCheck(const UpdateCheckCallback& callback) override; + void RebootAfterUpdate() override; + void Rollback() override; + void CanRollbackCheck(const RollbackCheckCallback& callback) override; + Status GetLastStatus() override; + void SetChannel(const std::string& target_channel, + bool is_powerwash_allowed) override; + void GetChannel(bool get_current_channel, + const GetChannelCallback& callback) override; // Pushes UpdateEngineClient::Status in the queue to test changing status. // GetLastStatus() returns the status set by this method in FIFO order. diff --git a/chromeos/dbus/gsm_sms_client.cc b/chromeos/dbus/gsm_sms_client.cc index cd9d236..b311554 100644 --- a/chromeos/dbus/gsm_sms_client.cc +++ b/chromeos/dbus/gsm_sms_client.cc @@ -165,50 +165,47 @@ class GsmSMSClientImpl : public GsmSMSClient { GsmSMSClientImpl() : bus_(NULL), proxies_deleter_(&proxies_) {} // GsmSMSClient override. - virtual void SetSmsReceivedHandler( - const std::string& service_name, - const dbus::ObjectPath& object_path, - const SmsReceivedHandler& handler) override { + void SetSmsReceivedHandler(const std::string& service_name, + const dbus::ObjectPath& object_path, + const SmsReceivedHandler& handler) override { GetProxy(service_name, object_path)->SetSmsReceivedHandler(handler); } // GsmSMSClient override. - virtual void ResetSmsReceivedHandler( - const std::string& service_name, - const dbus::ObjectPath& object_path) override { + void ResetSmsReceivedHandler(const std::string& service_name, + const dbus::ObjectPath& object_path) override { GetProxy(service_name, object_path)->ResetSmsReceivedHandler(); } // GsmSMSClient override. - virtual void Delete(const std::string& service_name, - const dbus::ObjectPath& object_path, - uint32 index, - const DeleteCallback& callback) override { + void Delete(const std::string& service_name, + const dbus::ObjectPath& object_path, + uint32 index, + const DeleteCallback& callback) override { GetProxy(service_name, object_path)->Delete(index, callback); } // GsmSMSClient override. - virtual void Get(const std::string& service_name, - const dbus::ObjectPath& object_path, - uint32 index, - const GetCallback& callback) override { + void Get(const std::string& service_name, + const dbus::ObjectPath& object_path, + uint32 index, + const GetCallback& callback) override { GetProxy(service_name, object_path)->Get(index, callback); } // GsmSMSClient override. - virtual void List(const std::string& service_name, - const dbus::ObjectPath& object_path, - const ListCallback& callback) override { + void List(const std::string& service_name, + const dbus::ObjectPath& object_path, + const ListCallback& callback) override { GetProxy(service_name, object_path)->List(callback); } // GsmSMSClient override. - virtual void RequestUpdate(const std::string& service_name, - const dbus::ObjectPath& object_path) override { - } + void RequestUpdate(const std::string& service_name, + const dbus::ObjectPath& object_path) override {} protected: - virtual void Init(dbus::Bus* bus) override { bus_ = bus; } + void Init(dbus::Bus* bus) override { bus_ = bus; } private: typedef std::map<std::pair<std::string, std::string>, SMSProxy*> ProxyMap; diff --git a/chromeos/dbus/gsm_sms_client.h b/chromeos/dbus/gsm_sms_client.h index d90c96a..afbae38 100644 --- a/chromeos/dbus/gsm_sms_client.h +++ b/chromeos/dbus/gsm_sms_client.h @@ -34,7 +34,7 @@ class CHROMEOS_EXPORT GsmSMSClient : public DBusClient { typedef base::Callback<void(const base::DictionaryValue& sms)> GetCallback; typedef base::Callback<void(const base::ListValue& result)> ListCallback; - virtual ~GsmSMSClient(); + ~GsmSMSClient() override; // Factory function, creates a new instance and returns ownership. // For normal usage, access the singleton via DBusThreadManager::Get(). diff --git a/chromeos/dbus/gsm_sms_client_unittest.cc b/chromeos/dbus/gsm_sms_client_unittest.cc index e2e2eae..88c6537 100644 --- a/chromeos/dbus/gsm_sms_client_unittest.cc +++ b/chromeos/dbus/gsm_sms_client_unittest.cc @@ -69,7 +69,7 @@ class GsmSMSClientTest : public testing::Test { response_(NULL), expected_result_(NULL) {} - virtual void SetUp() override { + void SetUp() override { // Create a mock bus. dbus::Bus::Options options; options.bus_type = dbus::Bus::SYSTEM; @@ -103,9 +103,7 @@ class GsmSMSClientTest : public testing::Test { client_->Init(mock_bus_.get()); } - virtual void TearDown() override { - mock_bus_->ShutdownAndBlock(); - } + void TearDown() override { mock_bus_->ShutdownAndBlock(); } // Handles Delete method call. void OnDelete(dbus::MethodCall* method_call, diff --git a/chromeos/dbus/image_burner_client.cc b/chromeos/dbus/image_burner_client.cc index 881c6f3..91ef3aa 100644 --- a/chromeos/dbus/image_burner_client.cc +++ b/chromeos/dbus/image_burner_client.cc @@ -21,12 +21,12 @@ class ImageBurnerClientImpl : public ImageBurnerClient { public: ImageBurnerClientImpl() : proxy_(NULL), weak_ptr_factory_(this) {} - virtual ~ImageBurnerClientImpl() {} + ~ImageBurnerClientImpl() override {} // ImageBurnerClient override. - virtual void BurnImage(const std::string& from_path, - const std::string& to_path, - const ErrorCallback& error_callback) override { + void BurnImage(const std::string& from_path, + const std::string& to_path, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(imageburn::kImageBurnServiceInterface, imageburn::kBurnImage); dbus::MessageWriter writer(&method_call); @@ -39,7 +39,7 @@ class ImageBurnerClientImpl : public ImageBurnerClient { } // ImageBurnerClient override. - virtual void SetEventHandlers( + void SetEventHandlers( const BurnFinishedHandler& burn_finished_handler, const BurnProgressUpdateHandler& burn_progress_update_handler) override { burn_finished_handler_ = burn_finished_handler; @@ -47,13 +47,13 @@ class ImageBurnerClientImpl : public ImageBurnerClient { } // ImageBurnerClient override. - virtual void ResetEventHandlers() override { + void ResetEventHandlers() override { burn_finished_handler_.Reset(); burn_progress_update_handler_.Reset(); } protected: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { proxy_ = bus->GetObjectProxy(imageburn::kImageBurnServiceName, dbus::ObjectPath(imageburn::kImageBurnServicePath)); diff --git a/chromeos/dbus/image_burner_client.h b/chromeos/dbus/image_burner_client.h index bbd0616..0c3f573f 100644 --- a/chromeos/dbus/image_burner_client.h +++ b/chromeos/dbus/image_burner_client.h @@ -19,7 +19,7 @@ namespace chromeos { // initializes the DBusThreadManager instance. class CHROMEOS_EXPORT ImageBurnerClient : public DBusClient { public: - virtual ~ImageBurnerClient(); + ~ImageBurnerClient() override; // A callback to be called when DBus method call fails. typedef base::Callback<void()> ErrorCallback; diff --git a/chromeos/dbus/introspectable_client.cc b/chromeos/dbus/introspectable_client.cc index 4b51755..9e56a99 100644 --- a/chromeos/dbus/introspectable_client.cc +++ b/chromeos/dbus/introspectable_client.cc @@ -34,13 +34,12 @@ class IntrospectableClientImpl : public IntrospectableClient { public: IntrospectableClientImpl() : bus_(NULL), weak_ptr_factory_(this) {} - virtual ~IntrospectableClientImpl() { - } + ~IntrospectableClientImpl() override {} // IntrospectableClient override. - virtual void Introspect(const std::string& service_name, - const dbus::ObjectPath& object_path, - const IntrospectCallback& callback) override { + void Introspect(const std::string& service_name, + const dbus::ObjectPath& object_path, + const IntrospectCallback& callback) override { dbus::MethodCall method_call(kIntrospectableInterface, kIntrospect); dbus::ObjectProxy* object_proxy = bus_->GetObjectProxy(service_name, @@ -55,7 +54,7 @@ class IntrospectableClientImpl : public IntrospectableClient { } protected: - virtual void Init(dbus::Bus* bus) override { bus_ = bus; } + void Init(dbus::Bus* bus) override { bus_ = bus; } private: // Called by dbus:: when a response for Introspect() is recieved. diff --git a/chromeos/dbus/introspectable_client.h b/chromeos/dbus/introspectable_client.h index 2f49636..1a4edab 100644 --- a/chromeos/dbus/introspectable_client.h +++ b/chromeos/dbus/introspectable_client.h @@ -19,7 +19,7 @@ namespace chromeos { // from a remote object. class CHROMEOS_EXPORT IntrospectableClient : public DBusClient { public: - virtual ~IntrospectableClient(); + ~IntrospectableClient() override; // The IntrospectCallback is used for the Introspect() method. It receives // four arguments, the first two are the |service_name| and |object_path| diff --git a/chromeos/dbus/lorgnette_manager_client.cc b/chromeos/dbus/lorgnette_manager_client.cc index 109ea6d..bdbb28b 100644 --- a/chromeos/dbus/lorgnette_manager_client.cc +++ b/chromeos/dbus/lorgnette_manager_client.cc @@ -30,7 +30,7 @@ class LorgnetteManagerClientImpl : public LorgnetteManagerClient { LorgnetteManagerClientImpl() : lorgnette_daemon_proxy_(NULL), weak_ptr_factory_(this) {} - virtual ~LorgnetteManagerClientImpl() {} + ~LorgnetteManagerClientImpl() override {} void ListScanners(const ListScannersCallback& callback) override { dbus::MethodCall method_call(lorgnette::kManagerServiceInterface, diff --git a/chromeos/dbus/modem_messaging_client.cc b/chromeos/dbus/modem_messaging_client.cc index 93e1330..ce4929d 100644 --- a/chromeos/dbus/modem_messaging_client.cc +++ b/chromeos/dbus/modem_messaging_client.cc @@ -138,36 +138,32 @@ class CHROMEOS_EXPORT ModemMessagingClientImpl : public ModemMessagingClient { proxies_deleter_(&proxies_) { } - virtual void SetSmsReceivedHandler( - const std::string& service_name, - const dbus::ObjectPath& object_path, - const SmsReceivedHandler& handler) override { + void SetSmsReceivedHandler(const std::string& service_name, + const dbus::ObjectPath& object_path, + const SmsReceivedHandler& handler) override { GetProxy(service_name, object_path)->SetSmsReceivedHandler(handler); } - virtual void ResetSmsReceivedHandler( - const std::string& service_name, - const dbus::ObjectPath& object_path) override { + void ResetSmsReceivedHandler(const std::string& service_name, + const dbus::ObjectPath& object_path) override { GetProxy(service_name, object_path)->ResetSmsReceivedHandler(); } - virtual void Delete(const std::string& service_name, - const dbus::ObjectPath& object_path, - const dbus::ObjectPath& sms_path, - const DeleteCallback& callback) override { + void Delete(const std::string& service_name, + const dbus::ObjectPath& object_path, + const dbus::ObjectPath& sms_path, + const DeleteCallback& callback) override { GetProxy(service_name, object_path)->Delete(sms_path, callback); } - virtual void List(const std::string& service_name, - const dbus::ObjectPath& object_path, - const ListCallback& callback) override { + void List(const std::string& service_name, + const dbus::ObjectPath& object_path, + const ListCallback& callback) override { GetProxy(service_name, object_path)->List(callback); } protected: - virtual void Init(dbus::Bus* bus) override { - bus_ = bus; - }; + void Init(dbus::Bus* bus) override { bus_ = bus; }; private: typedef std::map<std::pair<std::string, std::string>, ModemMessagingProxy*> diff --git a/chromeos/dbus/modem_messaging_client.h b/chromeos/dbus/modem_messaging_client.h index 65ce2d3..879d0c2 100644 --- a/chromeos/dbus/modem_messaging_client.h +++ b/chromeos/dbus/modem_messaging_client.h @@ -31,7 +31,7 @@ class CHROMEOS_EXPORT ModemMessagingClient : public DBusClient { typedef base::Callback<void(const std::vector<dbus::ObjectPath>& paths)> ListCallback; - virtual ~ModemMessagingClient(); + ~ModemMessagingClient() override; // Factory function, creates a new instance and returns ownership. // For normal usage, access the singleton via DBusThreadManager::Get(). diff --git a/chromeos/dbus/modem_messaging_client_unittest.cc b/chromeos/dbus/modem_messaging_client_unittest.cc index e59fb76..fc04932 100644 --- a/chromeos/dbus/modem_messaging_client_unittest.cc +++ b/chromeos/dbus/modem_messaging_client_unittest.cc @@ -54,7 +54,7 @@ class ModemMessagingClientTest : public testing::Test { ModemMessagingClientTest() : response_(NULL), expected_result_(NULL) {} - virtual void SetUp() override { + void SetUp() override { // Create a mock bus. dbus::Bus::Options options; options.bus_type = dbus::Bus::SYSTEM; @@ -89,9 +89,7 @@ class ModemMessagingClientTest : public testing::Test { client_->Init(mock_bus_.get()); } - virtual void TearDown() override { - mock_bus_->ShutdownAndBlock(); - } + void TearDown() override { mock_bus_->ShutdownAndBlock(); } // Handles Delete method call. void OnDelete(dbus::MethodCall* method_call, diff --git a/chromeos/dbus/nfc_adapter_client.cc b/chromeos/dbus/nfc_adapter_client.cc index 2c94534..3cd3664 100644 --- a/chromeos/dbus/nfc_adapter_client.cc +++ b/chromeos/dbus/nfc_adapter_client.cc @@ -48,36 +48,33 @@ class NfcAdapterClientImpl DCHECK(manager_client); } - virtual ~NfcAdapterClientImpl() { - manager_client_->RemoveObserver(this); - } + ~NfcAdapterClientImpl() override { manager_client_->RemoveObserver(this); } // NfcAdapterClient override. - virtual void AddObserver(NfcAdapterClient::Observer* observer) override { + void AddObserver(NfcAdapterClient::Observer* observer) override { DCHECK(observer); observers_.AddObserver(observer); } // NfcAdapterClient override. - virtual void RemoveObserver(NfcAdapterClient::Observer* observer) override { + void RemoveObserver(NfcAdapterClient::Observer* observer) override { DCHECK(observer); observers_.RemoveObserver(observer); } // NfcAdapterClient override. - virtual std::vector<dbus::ObjectPath> GetAdapters() override { + std::vector<dbus::ObjectPath> GetAdapters() override { return object_map_->GetObjectPaths(); } // NfcAdapterClient override. - virtual Properties* GetProperties(const dbus::ObjectPath& object_path) - override { + Properties* GetProperties(const dbus::ObjectPath& object_path) override { return static_cast<Properties*>( object_map_->GetObjectProperties(object_path)); } // NfcAdapterClient override. - virtual void StartPollLoop( + void StartPollLoop( const dbus::ObjectPath& object_path, const std::string& mode, const base::Closure& callback, @@ -104,7 +101,7 @@ class NfcAdapterClientImpl } // NfcAdapterClient override. - virtual void StopPollLoop( + void StopPollLoop( const dbus::ObjectPath& object_path, const base::Closure& callback, const nfc_client_helpers::ErrorCallback& error_callback) override { @@ -129,7 +126,7 @@ class NfcAdapterClientImpl protected: // DBusClient override. - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { VLOG(1) << "Creating NfcAdapterClientImpl"; DCHECK(bus); bus_ = bus; @@ -141,8 +138,7 @@ class NfcAdapterClientImpl private: // NfcManagerClient::Observer override. - virtual void ManagerPropertyChanged( - const std::string& property_name) override { + void ManagerPropertyChanged(const std::string& property_name) override { // Update the adapter proxies. DCHECK(manager_client_); NfcManagerClient::Properties* manager_properties = @@ -160,8 +156,7 @@ class NfcAdapterClientImpl } // nfc_client_helpers::DBusObjectMap::Delegate override. - virtual NfcPropertySet* CreateProperties( - dbus::ObjectProxy* object_proxy) override { + NfcPropertySet* CreateProperties(dbus::ObjectProxy* object_proxy) override { return new Properties( object_proxy, base::Bind(&NfcAdapterClientImpl::OnPropertyChanged, @@ -170,13 +165,13 @@ class NfcAdapterClientImpl } // nfc_client_helpers::DBusObjectMap::Delegate override. - virtual void ObjectAdded(const dbus::ObjectPath& object_path) override { + void ObjectAdded(const dbus::ObjectPath& object_path) override { FOR_EACH_OBSERVER(NfcAdapterClient::Observer, observers_, AdapterAdded(object_path)); } // nfc_client_helpers::DBusObjectMap::Delegate override. - virtual void ObjectRemoved(const dbus::ObjectPath& object_path) override { + void ObjectRemoved(const dbus::ObjectPath& object_path) override { FOR_EACH_OBSERVER(NfcAdapterClient::Observer, observers_, AdapterRemoved(object_path)); } diff --git a/chromeos/dbus/nfc_adapter_client.h b/chromeos/dbus/nfc_adapter_client.h index 6da4614..51cf24d 100644 --- a/chromeos/dbus/nfc_adapter_client.h +++ b/chromeos/dbus/nfc_adapter_client.h @@ -55,7 +55,7 @@ class CHROMEOS_EXPORT NfcAdapterClient : public DBusClient { Properties(dbus::ObjectProxy* object_proxy, const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; }; // Interface for observing changes from a local NFC adapter. @@ -77,7 +77,7 @@ class CHROMEOS_EXPORT NfcAdapterClient : public DBusClient { const std::string& property_name) {} }; - virtual ~NfcAdapterClient(); + ~NfcAdapterClient() override; // Adds and removes observers for events on all local bluetooth adapters. // Check the |object_path| parameter of the observer methods to determine diff --git a/chromeos/dbus/nfc_device_client.cc b/chromeos/dbus/nfc_device_client.cc index 4b5281b..8d185c2 100644 --- a/chromeos/dbus/nfc_device_client.cc +++ b/chromeos/dbus/nfc_device_client.cc @@ -43,25 +43,25 @@ class NfcDeviceClientImpl : public NfcDeviceClient, DCHECK(adapter_client); } - virtual ~NfcDeviceClientImpl() { + ~NfcDeviceClientImpl() override { DCHECK(adapter_client_); adapter_client_->RemoveObserver(this); } // NfcDeviceClient override. - virtual void AddObserver(NfcDeviceClient::Observer* observer) override { + void AddObserver(NfcDeviceClient::Observer* observer) override { DCHECK(observer); observers_.AddObserver(observer); } // NfcDeviceClient override. - virtual void RemoveObserver(NfcDeviceClient::Observer* observer) override { + void RemoveObserver(NfcDeviceClient::Observer* observer) override { DCHECK(observer); observers_.RemoveObserver(observer); } // NfcDeviceClient override. - virtual std::vector<dbus::ObjectPath> GetDevicesForAdapter( + std::vector<dbus::ObjectPath> GetDevicesForAdapter( const dbus::ObjectPath& adapter_path) override { DBusObjectMap* object_map = adapters_to_object_maps_.GetObjectMap(adapter_path); @@ -71,18 +71,16 @@ class NfcDeviceClientImpl : public NfcDeviceClient, } // NfcDeviceClient override. - virtual Properties* GetProperties( - const dbus::ObjectPath& object_path) override { + Properties* GetProperties(const dbus::ObjectPath& object_path) override { return static_cast<Properties*>( adapters_to_object_maps_.FindObjectProperties(object_path)); } // NfcDeviceClient override. - virtual void Push( - const dbus::ObjectPath& object_path, - const base::DictionaryValue& attributes, - const base::Closure& callback, - const nfc_client_helpers::ErrorCallback& error_callback) override { + void Push(const dbus::ObjectPath& object_path, + const base::DictionaryValue& attributes, + const base::Closure& callback, + const nfc_client_helpers::ErrorCallback& error_callback) override { dbus::ObjectProxy* object_proxy = adapters_to_object_maps_.FindObjectProxy(object_path); if (!object_proxy) { @@ -120,7 +118,7 @@ class NfcDeviceClientImpl : public NfcDeviceClient, protected: // DBusClient override. - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { VLOG(1) << "Creating NfcDeviceClientImpl"; DCHECK(bus); bus_ = bus; @@ -130,7 +128,7 @@ class NfcDeviceClientImpl : public NfcDeviceClient, private: // NfcAdapterClient::Observer override. - virtual void AdapterAdded(const dbus::ObjectPath& object_path) override { + void AdapterAdded(const dbus::ObjectPath& object_path) override { VLOG(1) << "Adapter added. Creating map for device proxies belonging to " << "adapter: " << object_path.value(); adapters_to_object_maps_.CreateObjectMap( @@ -138,7 +136,7 @@ class NfcDeviceClientImpl : public NfcDeviceClient, } // NfcAdapterClient::Observer override. - virtual void AdapterRemoved(const dbus::ObjectPath& object_path) override { + void AdapterRemoved(const dbus::ObjectPath& object_path) override { // Neard doesn't send out property changed signals for the devices that // are removed when the adapter they belong to is removed. Clean up the // object proxies for devices that are managed by the removed adapter. @@ -150,9 +148,8 @@ class NfcDeviceClientImpl : public NfcDeviceClient, } // NfcAdapterClient::Observer override. - virtual void AdapterPropertyChanged( - const dbus::ObjectPath& object_path, - const std::string& property_name) override { + void AdapterPropertyChanged(const dbus::ObjectPath& object_path, + const std::string& property_name) override { DCHECK(adapter_client_); NfcAdapterClient::Properties *adapter_properties = adapter_client_->GetProperties(object_path); @@ -173,8 +170,7 @@ class NfcDeviceClientImpl : public NfcDeviceClient, } // nfc_client_helpers::DBusObjectMap::Delegate override. - virtual NfcPropertySet* CreateProperties( - dbus::ObjectProxy* object_proxy) override { + NfcPropertySet* CreateProperties(dbus::ObjectProxy* object_proxy) override { return new Properties( object_proxy, base::Bind(&NfcDeviceClientImpl::OnPropertyChanged, @@ -183,12 +179,12 @@ class NfcDeviceClientImpl : public NfcDeviceClient, } // nfc_client_helpers::DBusObjectMap::Delegate override. - virtual void ObjectAdded(const dbus::ObjectPath& object_path) override { + void ObjectAdded(const dbus::ObjectPath& object_path) override { FOR_EACH_OBSERVER(NfcDeviceClient::Observer, observers_, DeviceAdded(object_path)); } - virtual void ObjectRemoved(const dbus::ObjectPath& object_path) override { + void ObjectRemoved(const dbus::ObjectPath& object_path) override { FOR_EACH_OBSERVER(NfcDeviceClient::Observer, observers_, DeviceRemoved(object_path)); } diff --git a/chromeos/dbus/nfc_device_client.h b/chromeos/dbus/nfc_device_client.h index 47ab9b7..db9b753 100644 --- a/chromeos/dbus/nfc_device_client.h +++ b/chromeos/dbus/nfc_device_client.h @@ -35,7 +35,7 @@ class CHROMEOS_EXPORT NfcDeviceClient : public DBusClient { Properties(dbus::ObjectProxy* object_proxy, const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; }; // Interface for observing changes from a remote NFC device. @@ -57,7 +57,7 @@ class CHROMEOS_EXPORT NfcDeviceClient : public DBusClient { const std::string& property_name) {} }; - virtual ~NfcDeviceClient(); + ~NfcDeviceClient() override; // Adds and removes observers for events on all remote NFC devices. Check the // |object_path| parameter of observer methods to determine which device is diff --git a/chromeos/dbus/nfc_manager_client.cc b/chromeos/dbus/nfc_manager_client.cc index 00a99d9..53813f3 100644 --- a/chromeos/dbus/nfc_manager_client.cc +++ b/chromeos/dbus/nfc_manager_client.cc @@ -33,29 +33,26 @@ class NfcManagerClientImpl : public NfcManagerClient { weak_ptr_factory_(this) { } - virtual ~NfcManagerClientImpl() { - } + ~NfcManagerClientImpl() override {} // NfcManagerClient override. - virtual void AddObserver(Observer* observer) override { + void AddObserver(Observer* observer) override { DCHECK(observer); observers_.AddObserver(observer); } // NfcManagerClient override. - virtual void RemoveObserver(Observer* observer) override { + void RemoveObserver(Observer* observer) override { DCHECK(observer); observers_.RemoveObserver(observer); } // NfcManagerClient override. - virtual Properties* GetProperties() override { - return properties_.get(); - } + Properties* GetProperties() override { return properties_.get(); } protected: // DBusClient override. - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { VLOG(1) << "Creating NfcManagerClientImpl"; // Create the object proxy. diff --git a/chromeos/dbus/nfc_manager_client.h b/chromeos/dbus/nfc_manager_client.h index db2215f..7e62070 100644 --- a/chromeos/dbus/nfc_manager_client.h +++ b/chromeos/dbus/nfc_manager_client.h @@ -26,7 +26,7 @@ class CHROMEOS_EXPORT NfcManagerClient : public DBusClient { Properties(dbus::ObjectProxy* object_proxy, const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; }; // Interface for observing changes to the NFC manager. Use this interface @@ -51,7 +51,7 @@ class CHROMEOS_EXPORT NfcManagerClient : public DBusClient { virtual void ManagerPropertyChanged(const std::string& property_name) {} }; - virtual ~NfcManagerClient(); + ~NfcManagerClient() override; // Adds and removes observers for events on the NFC manager. virtual void AddObserver(Observer* observer) = 0; diff --git a/chromeos/dbus/nfc_property_set.h b/chromeos/dbus/nfc_property_set.h index f6b50a2..7aae766 100644 --- a/chromeos/dbus/nfc_property_set.h +++ b/chromeos/dbus/nfc_property_set.h @@ -26,21 +26,19 @@ class NfcPropertySet : public dbus::PropertySet { // Destructor; we don't hold on to any references or memory that needs // explicit clean-up, but clang thinks we might. - virtual ~NfcPropertySet(); + ~NfcPropertySet() override; // Caches |callback| so that it will be invoked after a call to GetAll() // has successfully received all existing properties from the remote object. void SetAllPropertiesReceivedCallback(const base::Closure& callback); // dbus::PropertySet overrides - virtual void ConnectSignals() override; - virtual void Get(dbus::PropertyBase* property, - GetCallback callback) override; - virtual void GetAll() override; - virtual void OnGetAll(dbus::Response* response) override; - virtual void Set(dbus::PropertyBase* property, - SetCallback callback) override; - virtual void ChangedReceived(dbus::Signal* signal) override; + void ConnectSignals() override; + void Get(dbus::PropertyBase* property, GetCallback callback) override; + void GetAll() override; + void OnGetAll(dbus::Response* response) override; + void Set(dbus::PropertyBase* property, SetCallback callback) override; + void ChangedReceived(dbus::Signal* signal) override; protected: const base::Closure& on_get_all_callback() { return on_get_all_callback_; } diff --git a/chromeos/dbus/nfc_record_client.cc b/chromeos/dbus/nfc_record_client.cc index 334a174..5bd7a76 100644 --- a/chromeos/dbus/nfc_record_client.cc +++ b/chromeos/dbus/nfc_record_client.cc @@ -52,7 +52,7 @@ class NfcRecordClientImpl : public NfcRecordClient, DCHECK(tag_client); } - virtual ~NfcRecordClientImpl() { + ~NfcRecordClientImpl() override { DCHECK(device_client_); DCHECK(tag_client_); device_client_->RemoveObserver(this); @@ -60,18 +60,18 @@ class NfcRecordClientImpl : public NfcRecordClient, } // NfcRecordClient override. - virtual void AddObserver(NfcRecordClient::Observer* observer) override { + void AddObserver(NfcRecordClient::Observer* observer) override { DCHECK(observer); observers_.AddObserver(observer); } // NfcRecordClient override. - virtual void RemoveObserver(NfcRecordClient::Observer* observer) override { + void RemoveObserver(NfcRecordClient::Observer* observer) override { DCHECK(observer); observers_.RemoveObserver(observer); } - virtual std::vector<dbus::ObjectPath> GetRecordsForDevice( + std::vector<dbus::ObjectPath> GetRecordsForDevice( const dbus::ObjectPath& device_path) override { DBusObjectMap* object_map = devices_and_tags_to_object_maps_.GetObjectMap(device_path); @@ -80,21 +80,20 @@ class NfcRecordClientImpl : public NfcRecordClient, return object_map->GetObjectPaths(); } - virtual std::vector<dbus::ObjectPath> GetRecordsForTag( + std::vector<dbus::ObjectPath> GetRecordsForTag( const dbus::ObjectPath& tag_path) override { return GetRecordsForDevice(tag_path); } // NfcRecordClient override. - virtual Properties* GetProperties( - const dbus::ObjectPath& object_path) override { + Properties* GetProperties(const dbus::ObjectPath& object_path) override { return static_cast<Properties*>( devices_and_tags_to_object_maps_.FindObjectProperties(object_path)); } protected: // DBusClient override. - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { VLOG(1) << "Creating NfcRecordClient impl"; DCHECK(bus); bus_ = bus; @@ -106,7 +105,7 @@ class NfcRecordClientImpl : public NfcRecordClient, private: // NfcDeviceClient::Observer override. - virtual void DeviceAdded(const dbus::ObjectPath& object_path) override { + void DeviceAdded(const dbus::ObjectPath& object_path) override { VLOG(1) << "Device added. Creating map for record proxies belonging to " << "device: " << object_path.value(); devices_and_tags_to_object_maps_.CreateObjectMap( @@ -114,7 +113,7 @@ class NfcRecordClientImpl : public NfcRecordClient, } // NfcDeviceClient::Observer override. - virtual void DeviceRemoved(const dbus::ObjectPath& object_path) override { + void DeviceRemoved(const dbus::ObjectPath& object_path) override { // Neard doesn't send out property changed signals for the records that // are removed when the device they belong to is removed. Clean up the // object proxies for records that belong to the removed device. @@ -126,9 +125,8 @@ class NfcRecordClientImpl : public NfcRecordClient, } // NfcDeviceClient::Observer override. - virtual void DevicePropertyChanged( - const dbus::ObjectPath& object_path, - const std::string& property_name) override { + void DevicePropertyChanged(const dbus::ObjectPath& object_path, + const std::string& property_name) override { // Update the record proxies using records from the device. DCHECK(device_client_); NfcDeviceClient::Properties* device_properties = @@ -149,7 +147,7 @@ class NfcRecordClientImpl : public NfcRecordClient, } // NfcTagClient::Observer override. - virtual void TagAdded(const dbus::ObjectPath& object_path) override { + void TagAdded(const dbus::ObjectPath& object_path) override { VLOG(1) << "Tag added. Creating map for record proxies belonging to " << "tag: " << object_path.value(); devices_and_tags_to_object_maps_.CreateObjectMap( @@ -157,7 +155,7 @@ class NfcRecordClientImpl : public NfcRecordClient, } // NfcTagClient::Observer override. - virtual void TagRemoved(const dbus::ObjectPath& object_path) override { + void TagRemoved(const dbus::ObjectPath& object_path) override { // Neard doesn't send out property changed signals for the records that // are removed when the tag they belong to is removed. Clean up the // object proxies for records that belong to the removed tag. @@ -169,8 +167,8 @@ class NfcRecordClientImpl : public NfcRecordClient, } // NfcTagClient::Observer override. - virtual void TagPropertyChanged(const dbus::ObjectPath& object_path, - const std::string& property_name) override { + void TagPropertyChanged(const dbus::ObjectPath& object_path, + const std::string& property_name) override { // Update the record proxies using records from the tag. DCHECK(device_client_); NfcTagClient::Properties* tag_properties = @@ -198,8 +196,7 @@ class NfcRecordClientImpl : public NfcRecordClient, } // nfc_client_helpers::DBusObjectMap::Delegate override. - virtual NfcPropertySet* CreateProperties( - dbus::ObjectProxy* object_proxy) override { + NfcPropertySet* CreateProperties(dbus::ObjectProxy* object_proxy) override { Properties* properties = new Properties( object_proxy, base::Bind(&NfcRecordClientImpl::OnPropertyChanged, @@ -213,13 +210,13 @@ class NfcRecordClientImpl : public NfcRecordClient, } // nfc_client_helpers::DBusObjectMap::Delegate override. - virtual void ObjectAdded(const dbus::ObjectPath& object_path) override { + void ObjectAdded(const dbus::ObjectPath& object_path) override { FOR_EACH_OBSERVER(NfcRecordClient::Observer, observers_, RecordAdded(object_path)); } // nfc_client_helpers::DBusObjectMap::Delegate override. - virtual void ObjectRemoved(const dbus::ObjectPath& object_path) override { + void ObjectRemoved(const dbus::ObjectPath& object_path) override { FOR_EACH_OBSERVER(NfcRecordClient::Observer, observers_, RecordRemoved(object_path)); } diff --git a/chromeos/dbus/nfc_record_client.h b/chromeos/dbus/nfc_record_client.h index 37a277e..783258b 100644 --- a/chromeos/dbus/nfc_record_client.h +++ b/chromeos/dbus/nfc_record_client.h @@ -71,7 +71,7 @@ class CHROMEOS_EXPORT NfcRecordClient : public DBusClient { Properties(dbus::ObjectProxy* object_proxy, const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; }; // Interface for observing changes from a remote NFC NDEF record. @@ -103,7 +103,7 @@ class CHROMEOS_EXPORT NfcRecordClient : public DBusClient { const dbus::ObjectPath& object_path) {} }; - virtual ~NfcRecordClient(); + ~NfcRecordClient() override; // Adds and removes observers for events on all remote NFC records. Check the // |object_path| parameter of observer methods to determine which record is diff --git a/chromeos/dbus/nfc_tag_client.cc b/chromeos/dbus/nfc_tag_client.cc index cbcb4d1..5db650a 100644 --- a/chromeos/dbus/nfc_tag_client.cc +++ b/chromeos/dbus/nfc_tag_client.cc @@ -46,25 +46,25 @@ class NfcTagClientImpl : public NfcTagClient, DCHECK(adapter_client); } - virtual ~NfcTagClientImpl() { + ~NfcTagClientImpl() override { DCHECK(adapter_client_); adapter_client_->RemoveObserver(this); } // NfcTagClient override. - virtual void AddObserver(NfcTagClient::Observer* observer) override { + void AddObserver(NfcTagClient::Observer* observer) override { DCHECK(observer); observers_.AddObserver(observer); } // NfcTagClient override. - virtual void RemoveObserver(NfcTagClient::Observer* observer) override { + void RemoveObserver(NfcTagClient::Observer* observer) override { DCHECK(observer); observers_.RemoveObserver(observer); } // NfcTagClient override. - virtual std::vector<dbus::ObjectPath> GetTagsForAdapter( + std::vector<dbus::ObjectPath> GetTagsForAdapter( const dbus::ObjectPath& adapter_path) override { DBusObjectMap* object_map = adapters_to_object_maps_.GetObjectMap(adapter_path); @@ -74,18 +74,16 @@ class NfcTagClientImpl : public NfcTagClient, } // NfcTagClient override. - virtual Properties* GetProperties( - const dbus::ObjectPath& object_path) override { + Properties* GetProperties(const dbus::ObjectPath& object_path) override { return static_cast<Properties*>( adapters_to_object_maps_.FindObjectProperties(object_path)); } // NfcTagClient override. - virtual void Write( - const dbus::ObjectPath& object_path, - const base::DictionaryValue& attributes, - const base::Closure& callback, - const nfc_client_helpers::ErrorCallback& error_callback) override { + void Write(const dbus::ObjectPath& object_path, + const base::DictionaryValue& attributes, + const base::Closure& callback, + const nfc_client_helpers::ErrorCallback& error_callback) override { dbus::ObjectProxy* object_proxy = adapters_to_object_maps_.FindObjectProxy(object_path); if (!object_proxy) { @@ -121,7 +119,7 @@ class NfcTagClientImpl : public NfcTagClient, protected: // DBusClient override. - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { VLOG(1) << "Creating NfcTagClientImpl"; DCHECK(bus); bus_ = bus; @@ -131,7 +129,7 @@ class NfcTagClientImpl : public NfcTagClient, private: // NfcAdapterClient::Observer override. - virtual void AdapterAdded(const dbus::ObjectPath& object_path) override { + void AdapterAdded(const dbus::ObjectPath& object_path) override { VLOG(1) << "Adapter added. Creating map for tag proxies belonging to " << "adapter: " << object_path.value(); adapters_to_object_maps_.CreateObjectMap( @@ -139,7 +137,7 @@ class NfcTagClientImpl : public NfcTagClient, } // NfcAdapterClient::Observer override. - virtual void AdapterRemoved(const dbus::ObjectPath& object_path) override { + void AdapterRemoved(const dbus::ObjectPath& object_path) override { // Neard doesn't send out property changed signals for the tags that // are removed when the adapter they belong to is removed. Clean up the // object proxies for devices that are managed by the removed adapter. @@ -151,9 +149,8 @@ class NfcTagClientImpl : public NfcTagClient, } // NfcAdapterClient::Observer override. - virtual void AdapterPropertyChanged( - const dbus::ObjectPath& object_path, - const std::string& property_name) override { + void AdapterPropertyChanged(const dbus::ObjectPath& object_path, + const std::string& property_name) override { // Update the tag proxies. DCHECK(adapter_client_); NfcAdapterClient::Properties *adapter_properties = @@ -180,8 +177,7 @@ class NfcTagClientImpl : public NfcTagClient, } // nfc_client_helpers::DBusObjectMap::Delegate override. - virtual NfcPropertySet* CreateProperties( - dbus::ObjectProxy* object_proxy) override { + NfcPropertySet* CreateProperties(dbus::ObjectProxy* object_proxy) override { Properties* properties = new Properties( object_proxy, base::Bind(&NfcTagClientImpl::OnPropertyChanged, @@ -195,12 +191,12 @@ class NfcTagClientImpl : public NfcTagClient, } // nfc_client_helpers::DBusObjectMap::Delegate override. - virtual void ObjectAdded(const dbus::ObjectPath& object_path) override { + void ObjectAdded(const dbus::ObjectPath& object_path) override { FOR_EACH_OBSERVER(NfcTagClient::Observer, observers_, TagAdded(object_path)); } - virtual void ObjectRemoved(const dbus::ObjectPath& object_path) override { + void ObjectRemoved(const dbus::ObjectPath& object_path) override { FOR_EACH_OBSERVER(NfcTagClient::Observer, observers_, TagRemoved(object_path)); } diff --git a/chromeos/dbus/nfc_tag_client.h b/chromeos/dbus/nfc_tag_client.h index 444a0ae..144f1de 100644 --- a/chromeos/dbus/nfc_tag_client.h +++ b/chromeos/dbus/nfc_tag_client.h @@ -46,7 +46,7 @@ class CHROMEOS_EXPORT NfcTagClient : public DBusClient { Properties(dbus::ObjectProxy* object_proxy, const PropertyChangedCallback& callback); - virtual ~Properties(); + ~Properties() override; }; // Interface for observing changes from a remote NFC tag. @@ -77,7 +77,7 @@ class CHROMEOS_EXPORT NfcTagClient : public DBusClient { virtual void TagPropertiesReceived(const dbus::ObjectPath& object_path) {} }; - virtual ~NfcTagClient(); + ~NfcTagClient() override; // Adds and removes observers for events on all remote NFC tags. Check the // |object_path| parameter of observer methods to determine which tag is diff --git a/chromeos/dbus/permission_broker_client.cc b/chromeos/dbus/permission_broker_client.cc index 6531057f..bd34d58 100644 --- a/chromeos/dbus/permission_broker_client.cc +++ b/chromeos/dbus/permission_broker_client.cc @@ -23,9 +23,9 @@ class PermissionBrokerClientImpl : public PermissionBrokerClient { public: PermissionBrokerClientImpl() : proxy_(NULL), weak_ptr_factory_(this) {} - virtual void RequestPathAccess(const std::string& path, - const int interface_id, - const ResultCallback& callback) override { + void RequestPathAccess(const std::string& path, + const int interface_id, + const ResultCallback& callback) override { dbus::MethodCall method_call(kPermissionBrokerInterface, kRequestPathAccess); dbus::MessageWriter writer(&method_call); @@ -38,7 +38,7 @@ class PermissionBrokerClientImpl : public PermissionBrokerClient { } protected: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { proxy_ = bus->GetObjectProxy(kPermissionBrokerServiceName, dbus::ObjectPath(kPermissionBrokerServicePath)); diff --git a/chromeos/dbus/permission_broker_client.h b/chromeos/dbus/permission_broker_client.h index cf759fe..752f82b 100644 --- a/chromeos/dbus/permission_broker_client.h +++ b/chromeos/dbus/permission_broker_client.h @@ -28,7 +28,7 @@ class CHROMEOS_EXPORT PermissionBrokerClient : public DBusClient { // the operation that it was submitted alongside. typedef base::Callback<void(bool)> ResultCallback; - virtual ~PermissionBrokerClient(); + ~PermissionBrokerClient() override; static PermissionBrokerClient* Create(); diff --git a/chromeos/dbus/pipe_reader.h b/chromeos/dbus/pipe_reader.h index 851eda6..ad52549 100644 --- a/chromeos/dbus/pipe_reader.h +++ b/chromeos/dbus/pipe_reader.h @@ -74,7 +74,7 @@ class PipeReaderForString : public PipeReader { PipeReaderForString(const scoped_refptr<base::TaskRunner>& task_runner, const IOCompleteCallback& callback); - virtual void AcceptData(const char *data, int length) override; + void AcceptData(const char* data, int length) override; // Destructively returns collected data, by swapping |data_| with |data|. void GetData(std::string* data); diff --git a/chromeos/dbus/power_manager_client.cc b/chromeos/dbus/power_manager_client.cc index 374af7f..6840dcf 100644 --- a/chromeos/dbus/power_manager_client.cc +++ b/chromeos/dbus/power_manager_client.cc @@ -59,7 +59,7 @@ class PowerManagerClientImpl : public PowerManagerClient { last_is_projecting_(false), weak_ptr_factory_(this) {} - virtual ~PowerManagerClientImpl() { + ~PowerManagerClientImpl() override { // Here we should unregister suspend notifications from powerd, // however: // - The lifetime of the PowerManagerClientImpl can extend past that of @@ -70,27 +70,27 @@ class PowerManagerClientImpl : public PowerManagerClient { // PowerManagerClient overrides: - virtual void AddObserver(Observer* observer) override { + void AddObserver(Observer* observer) override { CHECK(observer); // http://crbug.com/119976 observers_.AddObserver(observer); } - virtual void RemoveObserver(Observer* observer) override { + void RemoveObserver(Observer* observer) override { observers_.RemoveObserver(observer); } - virtual bool HasObserver(const Observer* observer) const override { + bool HasObserver(const Observer* observer) const override { return observers_.HasObserver(observer); } - virtual void SetRenderProcessManagerDelegate( + void SetRenderProcessManagerDelegate( base::WeakPtr<RenderProcessManagerDelegate> delegate) override { DCHECK(!render_process_manager_delegate_) << "There can be only one! ...RenderProcessManagerDelegate"; render_process_manager_delegate_ = delegate; } - virtual void DecreaseScreenBrightness(bool allow_off) override { + void DecreaseScreenBrightness(bool allow_off) override { dbus::MethodCall method_call( power_manager::kPowerManagerInterface, power_manager::kDecreaseScreenBrightnessMethod); @@ -102,23 +102,22 @@ class PowerManagerClientImpl : public PowerManagerClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void IncreaseScreenBrightness() override { + void IncreaseScreenBrightness() override { SimpleMethodCallToPowerManager( power_manager::kIncreaseScreenBrightnessMethod); } - virtual void DecreaseKeyboardBrightness() override { + void DecreaseKeyboardBrightness() override { SimpleMethodCallToPowerManager( power_manager::kDecreaseKeyboardBrightnessMethod); } - virtual void IncreaseKeyboardBrightness() override { + void IncreaseKeyboardBrightness() override { SimpleMethodCallToPowerManager( power_manager::kIncreaseKeyboardBrightnessMethod); } - virtual void SetScreenBrightnessPercent(double percent, - bool gradual) override { + void SetScreenBrightnessPercent(double percent, bool gradual) override { dbus::MethodCall method_call( power_manager::kPowerManagerInterface, power_manager::kSetScreenBrightnessPercentMethod); @@ -134,7 +133,7 @@ class PowerManagerClientImpl : public PowerManagerClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void GetScreenBrightnessPercent( + void GetScreenBrightnessPercent( const GetScreenBrightnessPercentCallback& callback) override { dbus::MethodCall method_call( power_manager::kPowerManagerInterface, @@ -146,7 +145,7 @@ class PowerManagerClientImpl : public PowerManagerClient { weak_ptr_factory_.GetWeakPtr(), callback)); } - virtual void RequestStatusUpdate() override { + void RequestStatusUpdate() override { POWER_LOG(USER) << "RequestStatusUpdate"; dbus::MethodCall method_call( power_manager::kPowerManagerInterface, @@ -158,23 +157,22 @@ class PowerManagerClientImpl : public PowerManagerClient { weak_ptr_factory_.GetWeakPtr())); } - virtual void RequestSuspend() override { + void RequestSuspend() override { POWER_LOG(USER) << "RequestSuspend"; SimpleMethodCallToPowerManager(power_manager::kRequestSuspendMethod); } - virtual void RequestRestart() override { + void RequestRestart() override { POWER_LOG(USER) << "RequestRestart"; SimpleMethodCallToPowerManager(power_manager::kRequestRestartMethod); } - virtual void RequestShutdown() override { + void RequestShutdown() override { POWER_LOG(USER) << "RequestShutdown"; SimpleMethodCallToPowerManager(power_manager::kRequestShutdownMethod); } - virtual void NotifyUserActivity( - power_manager::UserActivityType type) override { + void NotifyUserActivity(power_manager::UserActivityType type) override { dbus::MethodCall method_call( power_manager::kPowerManagerInterface, power_manager::kHandleUserActivityMethod); @@ -187,7 +185,7 @@ class PowerManagerClientImpl : public PowerManagerClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void NotifyVideoActivity(bool is_fullscreen) override { + void NotifyVideoActivity(bool is_fullscreen) override { dbus::MethodCall method_call( power_manager::kPowerManagerInterface, power_manager::kHandleVideoActivityMethod); @@ -200,8 +198,7 @@ class PowerManagerClientImpl : public PowerManagerClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void SetPolicy( - const power_manager::PowerManagementPolicy& policy) override { + void SetPolicy(const power_manager::PowerManagementPolicy& policy) override { POWER_LOG(USER) << "SetPolicy"; dbus::MethodCall method_call( power_manager::kPowerManagerInterface, @@ -217,7 +214,7 @@ class PowerManagerClientImpl : public PowerManagerClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void SetIsProjecting(bool is_projecting) override { + void SetIsProjecting(bool is_projecting) override { POWER_LOG(USER) << "SetIsProjecting"; dbus::MethodCall method_call( power_manager::kPowerManagerInterface, @@ -231,7 +228,7 @@ class PowerManagerClientImpl : public PowerManagerClient { last_is_projecting_ = is_projecting; } - virtual base::Closure GetSuspendReadinessCallback() override { + base::Closure GetSuspendReadinessCallback() override { DCHECK(OnOriginThread()); DCHECK(suspend_is_pending_); num_pending_suspend_readiness_callbacks_++; @@ -240,12 +237,12 @@ class PowerManagerClientImpl : public PowerManagerClient { suspending_from_dark_resume_); } - virtual int GetNumPendingSuspendReadinessCallbacks() override { + int GetNumPendingSuspendReadinessCallbacks() override { return num_pending_suspend_readiness_callbacks_; } protected: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { power_manager_proxy_ = bus->GetObjectProxy( power_manager::kPowerManagerServiceName, dbus::ObjectPath(power_manager::kPowerManagerServicePath)); @@ -786,14 +783,14 @@ class PowerManagerClientStubImpl : public PowerManagerClient { num_pending_suspend_readiness_callbacks_(0), weak_ptr_factory_(this) {} - virtual ~PowerManagerClientStubImpl() {} + ~PowerManagerClientStubImpl() override {} int num_pending_suspend_readiness_callbacks() const { return num_pending_suspend_readiness_callbacks_; } // PowerManagerClient overrides: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { ParseCommandLineSwitch(); if (power_cycle_delay_ != base::TimeDelta()) { update_timer_.Start(FROM_HERE, @@ -803,76 +800,72 @@ class PowerManagerClientStubImpl : public PowerManagerClient { } } - virtual void AddObserver(Observer* observer) override { + void AddObserver(Observer* observer) override { observers_.AddObserver(observer); } - virtual void RemoveObserver(Observer* observer) override { + void RemoveObserver(Observer* observer) override { observers_.RemoveObserver(observer); } - virtual bool HasObserver(const Observer* observer) const override { + bool HasObserver(const Observer* observer) const override { return observers_.HasObserver(observer); } - virtual void SetRenderProcessManagerDelegate( - base::WeakPtr<RenderProcessManagerDelegate> delegate) override { - } + void SetRenderProcessManagerDelegate( + base::WeakPtr<RenderProcessManagerDelegate> delegate) override {} - virtual void DecreaseScreenBrightness(bool allow_off) override { + void DecreaseScreenBrightness(bool allow_off) override { POWER_LOG(USER) << "Requested to descrease screen brightness"; SetBrightness(brightness_ - 5.0, true); } - virtual void IncreaseScreenBrightness() override { + void IncreaseScreenBrightness() override { POWER_LOG(USER) << "Requested to increase screen brightness"; SetBrightness(brightness_ + 5.0, true); } - virtual void SetScreenBrightnessPercent(double percent, - bool gradual) override { + void SetScreenBrightnessPercent(double percent, bool gradual) override { POWER_LOG(USER) << "Requested to set screen brightness to " << percent << "% " << (gradual ? "gradually" : "instantaneously"); SetBrightness(percent, false); } - virtual void GetScreenBrightnessPercent( + void GetScreenBrightnessPercent( const GetScreenBrightnessPercentCallback& callback) override { POWER_LOG(USER) << "Requested to get screen brightness"; callback.Run(brightness_); } - virtual void DecreaseKeyboardBrightness() override { + void DecreaseKeyboardBrightness() override { POWER_LOG(USER) << "Requested to descrease keyboard brightness"; } - virtual void IncreaseKeyboardBrightness() override { + void IncreaseKeyboardBrightness() override { POWER_LOG(USER) << "Requested to increase keyboard brightness"; } - virtual void RequestStatusUpdate() override { + void RequestStatusUpdate() override { POWER_LOG(USER) << "Requested status update"; base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&PowerManagerClientStubImpl::UpdateStatus, weak_ptr_factory_.GetWeakPtr())); } - virtual void RequestSuspend() override {} - virtual void RequestRestart() override {} - virtual void RequestShutdown() override {} + void RequestSuspend() override {} + void RequestRestart() override {} + void RequestShutdown() override {} - virtual void NotifyUserActivity( - power_manager::UserActivityType type) override {} - virtual void NotifyVideoActivity(bool is_fullscreen) override {} - virtual void SetPolicy( - const power_manager::PowerManagementPolicy& policy) override {} - virtual void SetIsProjecting(bool is_projecting) override {} - virtual base::Closure GetSuspendReadinessCallback() override { + void NotifyUserActivity(power_manager::UserActivityType type) override {} + void NotifyVideoActivity(bool is_fullscreen) override {} + void SetPolicy(const power_manager::PowerManagementPolicy& policy) override {} + void SetIsProjecting(bool is_projecting) override {} + base::Closure GetSuspendReadinessCallback() override { num_pending_suspend_readiness_callbacks_++; return base::Bind(&PowerManagerClientStubImpl::HandleSuspendReadiness, weak_ptr_factory_.GetWeakPtr()); } - virtual int GetNumPendingSuspendReadinessCallbacks() override { + int GetNumPendingSuspendReadinessCallbacks() override { return num_pending_suspend_readiness_callbacks_; } diff --git a/chromeos/dbus/power_manager_client.h b/chromeos/dbus/power_manager_client.h index f79b5ec..e6ea159 100644 --- a/chromeos/dbus/power_manager_client.h +++ b/chromeos/dbus/power_manager_client.h @@ -187,7 +187,7 @@ class CHROMEOS_EXPORT PowerManagerClient : public DBusClient { // Creates the instance. static PowerManagerClient* Create(DBusClientImplementationType type); - virtual ~PowerManagerClient(); + ~PowerManagerClient() override; protected: // Create() should be used instead. diff --git a/chromeos/dbus/power_policy_controller_unittest.cc b/chromeos/dbus/power_policy_controller_unittest.cc index 8c35f3c..3d05c0b 100644 --- a/chromeos/dbus/power_policy_controller_unittest.cc +++ b/chromeos/dbus/power_policy_controller_unittest.cc @@ -16,15 +16,15 @@ class PowerPolicyControllerTest : public testing::Test { PowerPolicyControllerTest() : fake_power_client_(new FakePowerManagerClient) {} - virtual ~PowerPolicyControllerTest() {} + ~PowerPolicyControllerTest() override {} - virtual void SetUp() override { + void SetUp() override { PowerPolicyController::Initialize(fake_power_client_.get()); ASSERT_TRUE(PowerPolicyController::IsInitialized()); policy_controller_ = PowerPolicyController::Get(); } - virtual void TearDown() override { + void TearDown() override { if (PowerPolicyController::IsInitialized()) PowerPolicyController::Shutdown(); } diff --git a/chromeos/dbus/services/cros_dbus_service.cc b/chromeos/dbus/services/cros_dbus_service.cc index 3e04416..bfcd405 100644 --- a/chromeos/dbus/services/cros_dbus_service.cc +++ b/chromeos/dbus/services/cros_dbus_service.cc @@ -98,8 +98,7 @@ class CrosDBusServiceStubImpl : public CrosDBusService { CrosDBusServiceStubImpl() { } - virtual ~CrosDBusServiceStubImpl() { - } + ~CrosDBusServiceStubImpl() override {} }; // static diff --git a/chromeos/dbus/services/cros_dbus_service_unittest.cc b/chromeos/dbus/services/cros_dbus_service_unittest.cc index fa4a0df..1a0a25f 100644 --- a/chromeos/dbus/services/cros_dbus_service_unittest.cc +++ b/chromeos/dbus/services/cros_dbus_service_unittest.cc @@ -35,7 +35,7 @@ class CrosDBusServiceTest : public testing::Test { } // Creates an instance of CrosDBusService with mocks injected. - virtual void SetUp() { + void SetUp() override { // Create a mock bus. dbus::Bus::Options options; options.bus_type = dbus::Bus::SYSTEM; @@ -70,7 +70,7 @@ class CrosDBusServiceTest : public testing::Test { mock_bus_.get(), service_providers.Pass()); } - virtual void TearDown() { + void TearDown() override { // Shutdown the cros service. CrosDBusService::Shutdown(); diff --git a/chromeos/dbus/services/display_power_service_provider.h b/chromeos/dbus/services/display_power_service_provider.h index 68e1e67..132c45d 100644 --- a/chromeos/dbus/services/display_power_service_provider.h +++ b/chromeos/dbus/services/display_power_service_provider.h @@ -41,11 +41,10 @@ class CHROMEOS_EXPORT DisplayPowerServiceProvider }; explicit DisplayPowerServiceProvider(scoped_ptr<Delegate> delegate); - virtual ~DisplayPowerServiceProvider(); + ~DisplayPowerServiceProvider() override; // CrosDBusService::ServiceProviderInterface overrides: - virtual void Start( - scoped_refptr<dbus::ExportedObject> exported_object) override; + void Start(scoped_refptr<dbus::ExportedObject> exported_object) override; private: // Called from ExportedObject when a handler is exported as a D-Bus diff --git a/chromeos/dbus/services/liveness_service_provider.h b/chromeos/dbus/services/liveness_service_provider.h index 559d071..a261ff2 100644 --- a/chromeos/dbus/services/liveness_service_provider.h +++ b/chromeos/dbus/services/liveness_service_provider.h @@ -38,11 +38,10 @@ class CHROMEOS_EXPORT LivenessServiceProvider : public CrosDBusService::ServiceProviderInterface { public: LivenessServiceProvider(); - virtual ~LivenessServiceProvider(); + ~LivenessServiceProvider() override; // CrosDBusService::ServiceProviderInterface overrides: - virtual void Start( - scoped_refptr<dbus::ExportedObject> exported_object) override; + void Start(scoped_refptr<dbus::ExportedObject> exported_object) override; private: // Called from ExportedObject when CheckLiveness() is exported as a D-Bus diff --git a/chromeos/dbus/services/proxy_resolution_service_provider.cc b/chromeos/dbus/services/proxy_resolution_service_provider.cc index 749ea08..fcdcf97 100644 --- a/chromeos/dbus/services/proxy_resolution_service_provider.cc +++ b/chromeos/dbus/services/proxy_resolution_service_provider.cc @@ -56,7 +56,7 @@ class ProxyResolverImpl : public ProxyResolverInterface { weak_ptr_factory_(this) { } - virtual ~ProxyResolverImpl() { + ~ProxyResolverImpl() override { DCHECK(OnOriginThread()); for (std::set<Request*>::iterator iter = all_requests_.begin(); @@ -68,7 +68,7 @@ class ProxyResolverImpl : public ProxyResolverInterface { } // ProxyResolverInterface override. - virtual void ResolveProxy( + void ResolveProxy( const std::string& source_url, const std::string& signal_interface, const std::string& signal_name, diff --git a/chromeos/dbus/services/proxy_resolution_service_provider.h b/chromeos/dbus/services/proxy_resolution_service_provider.h index daef7b5..acc25c2 100644 --- a/chromeos/dbus/services/proxy_resolution_service_provider.h +++ b/chromeos/dbus/services/proxy_resolution_service_provider.h @@ -84,11 +84,10 @@ class ProxyResolverInterface; class CHROMEOS_EXPORT ProxyResolutionServiceProvider : public CrosDBusService::ServiceProviderInterface { public: - virtual ~ProxyResolutionServiceProvider(); + ~ProxyResolutionServiceProvider() override; // CrosDBusService::ServiceProviderInterface override. - virtual void Start( - scoped_refptr<dbus::ExportedObject> exported_object) override; + void Start(scoped_refptr<dbus::ExportedObject> exported_object) override; // Creates the instance. static ProxyResolutionServiceProvider* Create( diff --git a/chromeos/dbus/session_manager_client.cc b/chromeos/dbus/session_manager_client.cc index 27adf8b..825699b 100644 --- a/chromeos/dbus/session_manager_client.cc +++ b/chromeos/dbus/session_manager_client.cc @@ -69,35 +69,34 @@ class SessionManagerClientImpl : public SessionManagerClient { screen_is_locked_(false), weak_ptr_factory_(this) {} - virtual ~SessionManagerClientImpl() { - } + ~SessionManagerClientImpl() override {} // SessionManagerClient overrides: - virtual void SetStubDelegate(StubDelegate* delegate) override { + void SetStubDelegate(StubDelegate* delegate) override { // Do nothing; this isn't a stub implementation. } - virtual void AddObserver(Observer* observer) override { + void AddObserver(Observer* observer) override { observers_.AddObserver(observer); } - virtual void RemoveObserver(Observer* observer) override { + void RemoveObserver(Observer* observer) override { observers_.RemoveObserver(observer); } - virtual bool HasObserver(const Observer* observer) const override { + bool HasObserver(const Observer* observer) const override { return observers_.HasObserver(observer); } - virtual bool IsScreenLocked() const override { return screen_is_locked_; } + bool IsScreenLocked() const override { return screen_is_locked_; } - virtual void EmitLoginPromptVisible() override { + void EmitLoginPromptVisible() override { SimpleMethodCallToSessionManager( login_manager::kSessionManagerEmitLoginPromptVisible); FOR_EACH_OBSERVER(Observer, observers_, EmitLoginPromptVisibleCalled()); } - virtual void RestartJob(int pid, const std::string& command_line) override { + void RestartJob(int pid, const std::string& command_line) override { dbus::MethodCall method_call(login_manager::kSessionManagerInterface, login_manager::kSessionManagerRestartJob); dbus::MessageWriter writer(&method_call); @@ -110,7 +109,7 @@ class SessionManagerClientImpl : public SessionManagerClient { weak_ptr_factory_.GetWeakPtr())); } - virtual void StartSession(const std::string& user_email) override { + void StartSession(const std::string& user_email) override { dbus::MethodCall method_call(login_manager::kSessionManagerInterface, login_manager::kSessionManagerStartSession); dbus::MessageWriter writer(&method_call); @@ -123,7 +122,7 @@ class SessionManagerClientImpl : public SessionManagerClient { weak_ptr_factory_.GetWeakPtr())); } - virtual void StopSession() override { + void StopSession() override { dbus::MethodCall method_call(login_manager::kSessionManagerInterface, login_manager::kSessionManagerStopSession); dbus::MessageWriter writer(&method_call); @@ -135,7 +134,7 @@ class SessionManagerClientImpl : public SessionManagerClient { weak_ptr_factory_.GetWeakPtr())); } - virtual void StartDeviceWipe() override { + void StartDeviceWipe() override { dbus::MethodCall method_call(login_manager::kSessionManagerInterface, login_manager::kSessionManagerStartDeviceWipe); session_manager_proxy_->CallMethod( @@ -145,32 +144,31 @@ class SessionManagerClientImpl : public SessionManagerClient { weak_ptr_factory_.GetWeakPtr())); } - virtual void RequestLockScreen() override { + void RequestLockScreen() override { SimpleMethodCallToSessionManager(login_manager::kSessionManagerLockScreen); } - virtual void NotifyLockScreenShown() override { + void NotifyLockScreenShown() override { SimpleMethodCallToSessionManager( login_manager::kSessionManagerHandleLockScreenShown); } - virtual void NotifyLockScreenDismissed() override { + void NotifyLockScreenDismissed() override { SimpleMethodCallToSessionManager( login_manager::kSessionManagerHandleLockScreenDismissed); } - virtual void NotifySupervisedUserCreationStarted() override { + void NotifySupervisedUserCreationStarted() override { SimpleMethodCallToSessionManager( login_manager::kSessionManagerHandleSupervisedUserCreationStarting); } - virtual void NotifySupervisedUserCreationFinished() override { + void NotifySupervisedUserCreationFinished() override { SimpleMethodCallToSessionManager( login_manager::kSessionManagerHandleSupervisedUserCreationFinished); } - virtual void RetrieveActiveSessions( - const ActiveSessionsCallback& callback) override { + void RetrieveActiveSessions(const ActiveSessionsCallback& callback) override { dbus::MethodCall method_call( login_manager::kSessionManagerInterface, login_manager::kSessionManagerRetrieveActiveSessions); @@ -184,8 +182,7 @@ class SessionManagerClientImpl : public SessionManagerClient { callback)); } - virtual void RetrieveDevicePolicy( - const RetrievePolicyCallback& callback) override { + void RetrieveDevicePolicy(const RetrievePolicyCallback& callback) override { dbus::MethodCall method_call(login_manager::kSessionManagerInterface, login_manager::kSessionManagerRetrievePolicy); session_manager_proxy_->CallMethod( @@ -197,16 +194,15 @@ class SessionManagerClientImpl : public SessionManagerClient { callback)); } - virtual void RetrievePolicyForUser( - const std::string& username, - const RetrievePolicyCallback& callback) override { + void RetrievePolicyForUser(const std::string& username, + const RetrievePolicyCallback& callback) override { CallRetrievePolicyByUsername( login_manager::kSessionManagerRetrievePolicyForUser, username, callback); } - virtual std::string BlockingRetrievePolicyForUser( + std::string BlockingRetrievePolicyForUser( const std::string& username) override { dbus::MethodCall method_call( login_manager::kSessionManagerInterface, @@ -222,7 +218,7 @@ class SessionManagerClientImpl : public SessionManagerClient { return policy; } - virtual void RetrieveDeviceLocalAccountPolicy( + void RetrieveDeviceLocalAccountPolicy( const std::string& account_name, const RetrievePolicyCallback& callback) override { CallRetrievePolicyByUsername( @@ -231,8 +227,8 @@ class SessionManagerClientImpl : public SessionManagerClient { callback); } - virtual void StoreDevicePolicy(const std::string& policy_blob, - const StorePolicyCallback& callback) override { + void StoreDevicePolicy(const std::string& policy_blob, + const StorePolicyCallback& callback) override { dbus::MethodCall method_call(login_manager::kSessionManagerInterface, login_manager::kSessionManagerStorePolicy); dbus::MessageWriter writer(&method_call); @@ -248,17 +244,16 @@ class SessionManagerClientImpl : public SessionManagerClient { callback)); } - virtual void StorePolicyForUser( - const std::string& username, - const std::string& policy_blob, - const StorePolicyCallback& callback) override { + void StorePolicyForUser(const std::string& username, + const std::string& policy_blob, + const StorePolicyCallback& callback) override { CallStorePolicyByUsername(login_manager::kSessionManagerStorePolicyForUser, username, policy_blob, callback); } - virtual void StoreDeviceLocalAccountPolicy( + void StoreDeviceLocalAccountPolicy( const std::string& account_name, const std::string& policy_blob, const StorePolicyCallback& callback) override { @@ -269,8 +264,8 @@ class SessionManagerClientImpl : public SessionManagerClient { callback); } - virtual void SetFlagsForUser(const std::string& username, - const std::vector<std::string>& flags) override { + void SetFlagsForUser(const std::string& username, + const std::vector<std::string>& flags) override { dbus::MethodCall method_call(login_manager::kSessionManagerInterface, login_manager::kSessionManagerSetFlagsForUser); dbus::MessageWriter writer(&method_call); @@ -282,8 +277,7 @@ class SessionManagerClientImpl : public SessionManagerClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual void GetServerBackedStateKeys(const StateKeysCallback& callback) - override { + void GetServerBackedStateKeys(const StateKeysCallback& callback) override { dbus::MethodCall method_call( login_manager::kSessionManagerInterface, login_manager::kSessionManagerGetServerBackedStateKeys); @@ -297,7 +291,7 @@ class SessionManagerClientImpl : public SessionManagerClient { } protected: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { session_manager_proxy_ = bus->GetObjectProxy( login_manager::kSessionManagerServiceName, dbus::ObjectPath(login_manager::kSessionManagerServicePath)); @@ -588,46 +582,45 @@ class SessionManagerClientImpl : public SessionManagerClient { class SessionManagerClientStubImpl : public SessionManagerClient { public: SessionManagerClientStubImpl() : delegate_(NULL), screen_is_locked_(false) {} - virtual ~SessionManagerClientStubImpl() {} + ~SessionManagerClientStubImpl() override {} // SessionManagerClient overrides - virtual void Init(dbus::Bus* bus) override {} - virtual void SetStubDelegate(StubDelegate* delegate) override { + void Init(dbus::Bus* bus) override {} + void SetStubDelegate(StubDelegate* delegate) override { delegate_ = delegate; } - virtual void AddObserver(Observer* observer) override { + void AddObserver(Observer* observer) override { observers_.AddObserver(observer); } - virtual void RemoveObserver(Observer* observer) override { + void RemoveObserver(Observer* observer) override { observers_.RemoveObserver(observer); } - virtual bool HasObserver(const Observer* observer) const override { + bool HasObserver(const Observer* observer) const override { return observers_.HasObserver(observer); } - virtual bool IsScreenLocked() const override { return screen_is_locked_; } - virtual void EmitLoginPromptVisible() override {} - virtual void RestartJob(int pid, const std::string& command_line) override {} - virtual void StartSession(const std::string& user_email) override {} - virtual void StopSession() override {} - virtual void NotifySupervisedUserCreationStarted() override {} - virtual void NotifySupervisedUserCreationFinished() override {} - virtual void StartDeviceWipe() override {} - virtual void RequestLockScreen() override { + bool IsScreenLocked() const override { return screen_is_locked_; } + void EmitLoginPromptVisible() override {} + void RestartJob(int pid, const std::string& command_line) override {} + void StartSession(const std::string& user_email) override {} + void StopSession() override {} + void NotifySupervisedUserCreationStarted() override {} + void NotifySupervisedUserCreationFinished() override {} + void StartDeviceWipe() override {} + void RequestLockScreen() override { if (delegate_) delegate_->LockScreenForStub(); } - virtual void NotifyLockScreenShown() override { + void NotifyLockScreenShown() override { screen_is_locked_ = true; FOR_EACH_OBSERVER(Observer, observers_, ScreenIsLocked()); } - virtual void NotifyLockScreenDismissed() override { + void NotifyLockScreenDismissed() override { screen_is_locked_ = false; FOR_EACH_OBSERVER(Observer, observers_, ScreenIsUnlocked()); } - virtual void RetrieveActiveSessions( - const ActiveSessionsCallback& callback) override {} - virtual void RetrieveDevicePolicy( - const RetrievePolicyCallback& callback) override { + void RetrieveActiveSessions(const ActiveSessionsCallback& callback) override { + } + void RetrieveDevicePolicy(const RetrievePolicyCallback& callback) override { base::FilePath owner_key_path; if (!PathService::Get(chromeos::FILE_OWNER_KEY, &owner_key_path)) { callback.Run(""); @@ -641,26 +634,25 @@ class SessionManagerClientStubImpl : public SessionManagerClient { base::Bind(&GetFileContent, device_policy_path), callback); } - virtual void RetrievePolicyForUser( - const std::string& username, - const RetrievePolicyCallback& callback) override { + void RetrievePolicyForUser(const std::string& username, + const RetrievePolicyCallback& callback) override { base::PostTaskAndReplyWithResult( base::WorkerPool::GetTaskRunner(false).get(), FROM_HERE, base::Bind(&GetFileContent, GetUserFilePath(username, "stub_policy")), callback); } - virtual std::string BlockingRetrievePolicyForUser( + std::string BlockingRetrievePolicyForUser( const std::string& username) override { return GetFileContent(GetUserFilePath(username, "stub_policy")); } - virtual void RetrieveDeviceLocalAccountPolicy( + void RetrieveDeviceLocalAccountPolicy( const std::string& account_name, const RetrievePolicyCallback& callback) override { RetrievePolicyForUser(account_name, callback); } - virtual void StoreDevicePolicy(const std::string& policy_blob, - const StorePolicyCallback& callback) override { + void StoreDevicePolicy(const std::string& policy_blob, + const StorePolicyCallback& callback) override { enterprise_management::PolicyFetchResponse response; base::FilePath owner_key_path; if (!response.ParseFromString(policy_blob) || @@ -689,10 +681,9 @@ class SessionManagerClientStubImpl : public SessionManagerClient { base::Bind(callback, true), false); } - virtual void StorePolicyForUser( - const std::string& username, - const std::string& policy_blob, - const StorePolicyCallback& callback) override { + void StorePolicyForUser(const std::string& username, + const std::string& policy_blob, + const StorePolicyCallback& callback) override { // The session manager writes the user policy key to a well-known // location. Do the same with the stub impl, so that user policy works and // can be tested on desktop builds. @@ -719,18 +710,16 @@ class SessionManagerClientStubImpl : public SessionManagerClient { base::Bind(callback, true), false); } - virtual void StoreDeviceLocalAccountPolicy( + void StoreDeviceLocalAccountPolicy( const std::string& account_name, const std::string& policy_blob, const StorePolicyCallback& callback) override { StorePolicyForUser(account_name, policy_blob, callback); } - virtual void SetFlagsForUser(const std::string& username, - const std::vector<std::string>& flags) override { - } + void SetFlagsForUser(const std::string& username, + const std::vector<std::string>& flags) override {} - virtual void GetServerBackedStateKeys(const StateKeysCallback& callback) - override { + void GetServerBackedStateKeys(const StateKeysCallback& callback) override { std::vector<std::string> state_keys; for (int i = 0; i < 5; ++i) state_keys.push_back(crypto::SHA256HashString(base::IntToString(i))); diff --git a/chromeos/dbus/session_manager_client.h b/chromeos/dbus/session_manager_client.h index dd6048d..254e762 100644 --- a/chromeos/dbus/session_manager_client.h +++ b/chromeos/dbus/session_manager_client.h @@ -194,7 +194,7 @@ class CHROMEOS_EXPORT SessionManagerClient : public DBusClient { // Creates the instance. static SessionManagerClient* Create(DBusClientImplementationType type); - virtual ~SessionManagerClient(); + ~SessionManagerClient() override; protected: // Create() should be used instead. diff --git a/chromeos/dbus/shill_client_unittest_base.h b/chromeos/dbus/shill_client_unittest_base.h index 1c06535..d7b8cde 100644 --- a/chromeos/dbus/shill_client_unittest_base.h +++ b/chromeos/dbus/shill_client_unittest_base.h @@ -100,10 +100,10 @@ class ShillClientUnittestBase : public testing::Test { explicit ShillClientUnittestBase(const std::string& interface_name, const dbus::ObjectPath& object_path); - virtual ~ShillClientUnittestBase(); + ~ShillClientUnittestBase() override; - virtual void SetUp() override; - virtual void TearDown() override; + void SetUp() override; + void TearDown() override; protected: // A callback to intercept and check the method call arguments. diff --git a/chromeos/dbus/shill_device_client.cc b/chromeos/dbus/shill_device_client.cc index 5685b6096..64fef54d 100644 --- a/chromeos/dbus/shill_device_client.cc +++ b/chromeos/dbus/shill_device_client.cc @@ -28,7 +28,7 @@ class ShillDeviceClientImpl : public ShillDeviceClient { : bus_(NULL) { } - virtual ~ShillDeviceClientImpl() { + ~ShillDeviceClientImpl() override { for (HelperMap::iterator iter = helpers_.begin(); iter != helpers_.end(); ++iter) { // This *should* never happen, yet we're getting crash reports that @@ -43,37 +43,37 @@ class ShillDeviceClientImpl : public ShillDeviceClient { /////////////////////////////////////// // ShillDeviceClient overrides. - virtual void AddPropertyChangedObserver( + void AddPropertyChangedObserver( const dbus::ObjectPath& device_path, ShillPropertyChangedObserver* observer) override { GetHelper(device_path)->AddPropertyChangedObserver(observer); } - virtual void RemovePropertyChangedObserver( + void RemovePropertyChangedObserver( const dbus::ObjectPath& device_path, ShillPropertyChangedObserver* observer) override { GetHelper(device_path)->RemovePropertyChangedObserver(observer); } - virtual void GetProperties(const dbus::ObjectPath& device_path, - const DictionaryValueCallback& callback) override { + void GetProperties(const dbus::ObjectPath& device_path, + const DictionaryValueCallback& callback) override { dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, shill::kGetPropertiesFunction); GetHelper(device_path)->CallDictionaryValueMethod(&method_call, callback); } - virtual void ProposeScan(const dbus::ObjectPath& device_path, - const VoidDBusMethodCallback& callback) override { + void ProposeScan(const dbus::ObjectPath& device_path, + const VoidDBusMethodCallback& callback) override { dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, shill::kProposeScanFunction); GetHelper(device_path)->CallVoidMethod(&method_call, callback); } - virtual void SetProperty(const dbus::ObjectPath& device_path, - const std::string& name, - const base::Value& value, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void SetProperty(const dbus::ObjectPath& device_path, + const std::string& name, + const base::Value& value, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, shill::kSetPropertyFunction); dbus::MessageWriter writer(&method_call); @@ -84,9 +84,9 @@ class ShillDeviceClientImpl : public ShillDeviceClient { error_callback); } - virtual void ClearProperty(const dbus::ObjectPath& device_path, - const std::string& name, - const VoidDBusMethodCallback& callback) override { + void ClearProperty(const dbus::ObjectPath& device_path, + const std::string& name, + const VoidDBusMethodCallback& callback) override { dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, shill::kClearPropertyFunction); dbus::MessageWriter writer(&method_call); @@ -94,10 +94,9 @@ class ShillDeviceClientImpl : public ShillDeviceClient { GetHelper(device_path)->CallVoidMethod(&method_call, callback); } - virtual void AddIPConfig( - const dbus::ObjectPath& device_path, - const std::string& method, - const ObjectPathDBusMethodCallback& callback) override { + void AddIPConfig(const dbus::ObjectPath& device_path, + const std::string& method, + const ObjectPathDBusMethodCallback& callback) override { dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, shill::kAddIPConfigFunction); dbus::MessageWriter writer(&method_call); @@ -105,11 +104,11 @@ class ShillDeviceClientImpl : public ShillDeviceClient { GetHelper(device_path)->CallObjectPathMethod(&method_call, callback); } - virtual void RequirePin(const dbus::ObjectPath& device_path, - const std::string& pin, - bool require, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void RequirePin(const dbus::ObjectPath& device_path, + const std::string& pin, + bool require, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, shill::kRequirePinFunction); dbus::MessageWriter writer(&method_call); @@ -119,10 +118,10 @@ class ShillDeviceClientImpl : public ShillDeviceClient { &method_call, callback, error_callback); } - virtual void EnterPin(const dbus::ObjectPath& device_path, - const std::string& pin, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void EnterPin(const dbus::ObjectPath& device_path, + const std::string& pin, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, shill::kEnterPinFunction); dbus::MessageWriter writer(&method_call); @@ -131,11 +130,11 @@ class ShillDeviceClientImpl : public ShillDeviceClient { &method_call, callback, error_callback); } - virtual void UnblockPin(const dbus::ObjectPath& device_path, - const std::string& puk, - const std::string& pin, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void UnblockPin(const dbus::ObjectPath& device_path, + const std::string& puk, + const std::string& pin, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, shill::kUnblockPinFunction); dbus::MessageWriter writer(&method_call); @@ -145,11 +144,11 @@ class ShillDeviceClientImpl : public ShillDeviceClient { &method_call, callback, error_callback); } - virtual void ChangePin(const dbus::ObjectPath& device_path, - const std::string& old_pin, - const std::string& new_pin, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void ChangePin(const dbus::ObjectPath& device_path, + const std::string& old_pin, + const std::string& new_pin, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, shill::kChangePinFunction); dbus::MessageWriter writer(&method_call); @@ -159,10 +158,10 @@ class ShillDeviceClientImpl : public ShillDeviceClient { &method_call, callback, error_callback); } - virtual void Register(const dbus::ObjectPath& device_path, - const std::string& network_id, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void Register(const dbus::ObjectPath& device_path, + const std::string& network_id, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, shill::kRegisterFunction); dbus::MessageWriter writer(&method_call); @@ -171,10 +170,10 @@ class ShillDeviceClientImpl : public ShillDeviceClient { &method_call, callback, error_callback); } - virtual void SetCarrier(const dbus::ObjectPath& device_path, - const std::string& carrier, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void SetCarrier(const dbus::ObjectPath& device_path, + const std::string& carrier, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, shill::kSetCarrierFunction); dbus::MessageWriter writer(&method_call); @@ -183,21 +182,20 @@ class ShillDeviceClientImpl : public ShillDeviceClient { &method_call, callback, error_callback); } - virtual void Reset(const dbus::ObjectPath& device_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void Reset(const dbus::ObjectPath& device_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, shill::kResetFunction); GetHelper(device_path)->CallVoidMethodWithErrorCallback( &method_call, callback, error_callback); } - virtual void PerformTDLSOperation( - const dbus::ObjectPath& device_path, - const std::string& operation, - const std::string& peer, - const StringCallback& callback, - const ErrorCallback& error_callback) override { + void PerformTDLSOperation(const dbus::ObjectPath& device_path, + const std::string& operation, + const std::string& peer, + const StringCallback& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, shill::kPerformTDLSOperationFunction); dbus::MessageWriter writer(&method_call); @@ -255,14 +253,10 @@ class ShillDeviceClientImpl : public ShillDeviceClient { error_callback); } - virtual TestInterface* GetTestInterface() override { - return NULL; - } + TestInterface* GetTestInterface() override { return NULL; } protected: - virtual void Init(dbus::Bus* bus) override { - bus_ = bus; - } + void Init(dbus::Bus* bus) override { bus_ = bus; } private: typedef std::map<std::string, ShillClientHelper*> HelperMap; diff --git a/chromeos/dbus/shill_device_client.h b/chromeos/dbus/shill_device_client.h index 2e0a376..d7128eb 100644 --- a/chromeos/dbus/shill_device_client.h +++ b/chromeos/dbus/shill_device_client.h @@ -64,7 +64,7 @@ class CHROMEOS_EXPORT ShillDeviceClient : public DBusClient { virtual ~TestInterface() {} }; - virtual ~ShillDeviceClient(); + ~ShillDeviceClient() override; // Factory function, creates a new instance which is owned by the caller. // For normal usage, access the singleton via DBusThreadManager::Get(). diff --git a/chromeos/dbus/shill_device_client_unittest.cc b/chromeos/dbus/shill_device_client_unittest.cc index 0660ae4..164f592 100644 --- a/chromeos/dbus/shill_device_client_unittest.cc +++ b/chromeos/dbus/shill_device_client_unittest.cc @@ -56,7 +56,7 @@ class ShillDeviceClientTest : public ShillClientUnittestBase { dbus::ObjectPath(kExampleDevicePath)) { } - virtual void SetUp() { + void SetUp() override { ShillClientUnittestBase::SetUp(); // Create a client with the mock bus. client_.reset(ShillDeviceClient::Create()); @@ -65,9 +65,7 @@ class ShillDeviceClientTest : public ShillClientUnittestBase { message_loop_.RunUntilIdle(); } - virtual void TearDown() { - ShillClientUnittestBase::TearDown(); - } + void TearDown() override { ShillClientUnittestBase::TearDown(); } protected: scoped_ptr<ShillDeviceClient> client_; diff --git a/chromeos/dbus/shill_ipconfig_client.cc b/chromeos/dbus/shill_ipconfig_client.cc index cd4467f..7f48e97 100644 --- a/chromeos/dbus/shill_ipconfig_client.cc +++ b/chromeos/dbus/shill_ipconfig_client.cc @@ -27,36 +27,34 @@ class ShillIPConfigClientImpl : public ShillIPConfigClient { //////////////////////////////////// // ShillIPConfigClient overrides. - virtual void AddPropertyChangedObserver( + void AddPropertyChangedObserver( const dbus::ObjectPath& ipconfig_path, ShillPropertyChangedObserver* observer) override { GetHelper(ipconfig_path)->AddPropertyChangedObserver(observer); } - virtual void RemovePropertyChangedObserver( + void RemovePropertyChangedObserver( const dbus::ObjectPath& ipconfig_path, ShillPropertyChangedObserver* observer) override { GetHelper(ipconfig_path)->RemovePropertyChangedObserver(observer); } - virtual void Refresh(const dbus::ObjectPath& ipconfig_path, - const VoidDBusMethodCallback& callback) override; - virtual void GetProperties(const dbus::ObjectPath& ipconfig_path, - const DictionaryValueCallback& callback) override; - virtual void SetProperty(const dbus::ObjectPath& ipconfig_path, - const std::string& name, - const base::Value& value, - const VoidDBusMethodCallback& callback) override; - virtual void ClearProperty(const dbus::ObjectPath& ipconfig_path, - const std::string& name, - const VoidDBusMethodCallback& callback) override; - virtual void Remove(const dbus::ObjectPath& ipconfig_path, - const VoidDBusMethodCallback& callback) override; - virtual ShillIPConfigClient::TestInterface* GetTestInterface() override; + void Refresh(const dbus::ObjectPath& ipconfig_path, + const VoidDBusMethodCallback& callback) override; + void GetProperties(const dbus::ObjectPath& ipconfig_path, + const DictionaryValueCallback& callback) override; + void SetProperty(const dbus::ObjectPath& ipconfig_path, + const std::string& name, + const base::Value& value, + const VoidDBusMethodCallback& callback) override; + void ClearProperty(const dbus::ObjectPath& ipconfig_path, + const std::string& name, + const VoidDBusMethodCallback& callback) override; + void Remove(const dbus::ObjectPath& ipconfig_path, + const VoidDBusMethodCallback& callback) override; + ShillIPConfigClient::TestInterface* GetTestInterface() override; protected: - virtual void Init(dbus::Bus* bus) override { - bus_ = bus; - } + void Init(dbus::Bus* bus) override { bus_ = bus; } private: typedef std::map<std::string, ShillClientHelper*> HelperMap; diff --git a/chromeos/dbus/shill_ipconfig_client.h b/chromeos/dbus/shill_ipconfig_client.h index 379d8e9..8461380 100644 --- a/chromeos/dbus/shill_ipconfig_client.h +++ b/chromeos/dbus/shill_ipconfig_client.h @@ -48,7 +48,7 @@ class CHROMEOS_EXPORT ShillIPConfigClient : public DBusClient { virtual ~TestInterface() {} }; - virtual ~ShillIPConfigClient(); + ~ShillIPConfigClient() override; // Factory function, creates a new instance which is owned by the caller. // For normal usage, access the singleton via DBusThreadManager::Get(). diff --git a/chromeos/dbus/shill_ipconfig_client_unittest.cc b/chromeos/dbus/shill_ipconfig_client_unittest.cc index b12f25b..68d6913 100644 --- a/chromeos/dbus/shill_ipconfig_client_unittest.cc +++ b/chromeos/dbus/shill_ipconfig_client_unittest.cc @@ -30,7 +30,7 @@ class ShillIPConfigClientTest : public ShillClientUnittestBase { dbus::ObjectPath(kExampleIPConfigPath)) { } - virtual void SetUp() { + void SetUp() override { ShillClientUnittestBase::SetUp(); // Create a client with the mock bus. client_.reset(ShillIPConfigClient::Create()); @@ -39,9 +39,7 @@ class ShillIPConfigClientTest : public ShillClientUnittestBase { message_loop_.RunUntilIdle(); } - virtual void TearDown() { - ShillClientUnittestBase::TearDown(); - } + void TearDown() override { ShillClientUnittestBase::TearDown(); } protected: scoped_ptr<ShillIPConfigClient> client_; diff --git a/chromeos/dbus/shill_manager_client.cc b/chromeos/dbus/shill_manager_client.cc index f1ea6710..46179a9 100644 --- a/chromeos/dbus/shill_manager_client.cc +++ b/chromeos/dbus/shill_manager_client.cc @@ -28,33 +28,33 @@ class ShillManagerClientImpl : public ShillManagerClient { //////////////////////////////////// // ShillManagerClient overrides. - virtual void AddPropertyChangedObserver( + void AddPropertyChangedObserver( ShillPropertyChangedObserver* observer) override { helper_->AddPropertyChangedObserver(observer); } - virtual void RemovePropertyChangedObserver( + void RemovePropertyChangedObserver( ShillPropertyChangedObserver* observer) override { helper_->RemovePropertyChangedObserver(observer); } - virtual void GetProperties(const DictionaryValueCallback& callback) override { + void GetProperties(const DictionaryValueCallback& callback) override { dbus::MethodCall method_call(shill::kFlimflamManagerInterface, shill::kGetPropertiesFunction); helper_->CallDictionaryValueMethod(&method_call, callback); } - virtual void GetNetworksForGeolocation( + void GetNetworksForGeolocation( const DictionaryValueCallback& callback) override { dbus::MethodCall method_call(shill::kFlimflamManagerInterface, shill::kGetNetworksForGeolocation); helper_->CallDictionaryValueMethod(&method_call, callback); } - virtual void SetProperty(const std::string& name, - const base::Value& value, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void SetProperty(const std::string& name, + const base::Value& value, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamManagerInterface, shill::kSetPropertyFunction); dbus::MessageWriter writer(&method_call); @@ -65,9 +65,9 @@ class ShillManagerClientImpl : public ShillManagerClient { error_callback); } - virtual void RequestScan(const std::string& type, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void RequestScan(const std::string& type, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamManagerInterface, shill::kRequestScanFunction); dbus::MessageWriter writer(&method_call); @@ -77,10 +77,9 @@ class ShillManagerClientImpl : public ShillManagerClient { error_callback); } - virtual void EnableTechnology( - const std::string& type, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void EnableTechnology(const std::string& type, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamManagerInterface, shill::kEnableTechnologyFunction); dbus::MessageWriter writer(&method_call); @@ -90,10 +89,9 @@ class ShillManagerClientImpl : public ShillManagerClient { error_callback); } - virtual void DisableTechnology( - const std::string& type, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void DisableTechnology(const std::string& type, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamManagerInterface, shill::kDisableTechnologyFunction); dbus::MessageWriter writer(&method_call); @@ -103,10 +101,9 @@ class ShillManagerClientImpl : public ShillManagerClient { error_callback); } - virtual void ConfigureService( - const base::DictionaryValue& properties, - const ObjectPathCallback& callback, - const ErrorCallback& error_callback) override { + void ConfigureService(const base::DictionaryValue& properties, + const ObjectPathCallback& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamManagerInterface, shill::kConfigureServiceFunction); dbus::MessageWriter writer(&method_call); @@ -116,7 +113,7 @@ class ShillManagerClientImpl : public ShillManagerClient { error_callback); } - virtual void ConfigureServiceForProfile( + void ConfigureServiceForProfile( const dbus::ObjectPath& profile_path, const base::DictionaryValue& properties, const ObjectPathCallback& callback, @@ -131,10 +128,9 @@ class ShillManagerClientImpl : public ShillManagerClient { error_callback); } - virtual void GetService( - const base::DictionaryValue& properties, - const ObjectPathCallback& callback, - const ErrorCallback& error_callback) override { + void GetService(const base::DictionaryValue& properties, + const ObjectPathCallback& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamManagerInterface, shill::kGetServiceFunction); dbus::MessageWriter writer(&method_call); @@ -144,9 +140,9 @@ class ShillManagerClientImpl : public ShillManagerClient { error_callback); } - virtual void VerifyDestination(const VerificationProperties& properties, - const BooleanCallback& callback, - const ErrorCallback& error_callback) override { + void VerifyDestination(const VerificationProperties& properties, + const BooleanCallback& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamManagerInterface, shill::kVerifyDestinationFunction); dbus::MessageWriter writer(&method_call); @@ -161,7 +157,7 @@ class ShillManagerClientImpl : public ShillManagerClient { &method_call, callback, error_callback); } - virtual void VerifyAndEncryptCredentials( + void VerifyAndEncryptCredentials( const VerificationProperties& properties, const std::string& service_path, const StringCallback& callback, @@ -181,11 +177,10 @@ class ShillManagerClientImpl : public ShillManagerClient { &method_call, callback, error_callback); } - virtual void VerifyAndEncryptData( - const VerificationProperties& properties, - const std::string& data, - const StringCallback& callback, - const ErrorCallback& error_callback) override { + void VerifyAndEncryptData(const VerificationProperties& properties, + const std::string& data, + const StringCallback& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamManagerInterface, shill::kVerifyAndEncryptDataFunction); dbus::MessageWriter writer(&method_call); @@ -201,9 +196,8 @@ class ShillManagerClientImpl : public ShillManagerClient { &method_call, callback, error_callback); } - virtual void ConnectToBestServices( - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void ConnectToBestServices(const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamManagerInterface, shill::kConnectToBestServicesFunction); helper_->CallVoidMethodWithErrorCallback(&method_call, @@ -211,12 +205,10 @@ class ShillManagerClientImpl : public ShillManagerClient { error_callback); } - virtual TestInterface* GetTestInterface() override { - return NULL; - } + TestInterface* GetTestInterface() override { return NULL; } protected: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { proxy_ = bus->GetObjectProxy(shill::kFlimflamServiceName, dbus::ObjectPath(shill::kFlimflamServicePath)); helper_.reset(new ShillClientHelper(proxy_)); diff --git a/chromeos/dbus/shill_manager_client.h b/chromeos/dbus/shill_manager_client.h index e8b3177..68fcf44 100644 --- a/chromeos/dbus/shill_manager_client.h +++ b/chromeos/dbus/shill_manager_client.h @@ -127,7 +127,7 @@ class CHROMEOS_EXPORT ShillManagerClient : public DBusClient { std::string device_bssid; }; - virtual ~ShillManagerClient(); + ~ShillManagerClient() override; // Factory function, creates a new instance which is owned by the caller. // For normal usage, access the singleton via DBusThreadManager::Get(). diff --git a/chromeos/dbus/shill_manager_client_unittest.cc b/chromeos/dbus/shill_manager_client_unittest.cc index 7f5a13e..c9eb1a8 100644 --- a/chromeos/dbus/shill_manager_client_unittest.cc +++ b/chromeos/dbus/shill_manager_client_unittest.cc @@ -56,7 +56,7 @@ class ShillManagerClientTest : public ShillClientUnittestBase { dbus::ObjectPath(shill::kFlimflamServicePath)) { } - virtual void SetUp() { + void SetUp() override { ShillClientUnittestBase::SetUp(); // Create a client with the mock bus. client_.reset(ShillManagerClient::Create()); @@ -65,9 +65,7 @@ class ShillManagerClientTest : public ShillClientUnittestBase { message_loop_.RunUntilIdle(); } - virtual void TearDown() { - ShillClientUnittestBase::TearDown(); - } + void TearDown() override { ShillClientUnittestBase::TearDown(); } protected: scoped_ptr<ShillManagerClient> client_; diff --git a/chromeos/dbus/shill_profile_client.cc b/chromeos/dbus/shill_profile_client.cc index f7f3de5..291c36a0 100644 --- a/chromeos/dbus/shill_profile_client.cc +++ b/chromeos/dbus/shill_profile_client.cc @@ -26,39 +26,34 @@ class ShillProfileClientImpl : public ShillProfileClient { public: ShillProfileClientImpl(); - virtual void AddPropertyChangedObserver( + void AddPropertyChangedObserver( const dbus::ObjectPath& profile_path, ShillPropertyChangedObserver* observer) override { GetHelper(profile_path)->AddPropertyChangedObserver(observer); } - virtual void RemovePropertyChangedObserver( + void RemovePropertyChangedObserver( const dbus::ObjectPath& profile_path, ShillPropertyChangedObserver* observer) override { GetHelper(profile_path)->RemovePropertyChangedObserver(observer); } - virtual void GetProperties( - const dbus::ObjectPath& profile_path, - const DictionaryValueCallbackWithoutStatus& callback, - const ErrorCallback& error_callback) override; - virtual void GetEntry(const dbus::ObjectPath& profile_path, - const std::string& entry_path, - const DictionaryValueCallbackWithoutStatus& callback, - const ErrorCallback& error_callback) override; - virtual void DeleteEntry(const dbus::ObjectPath& profile_path, - const std::string& entry_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override; - - virtual TestInterface* GetTestInterface() override { - return NULL; - } + void GetProperties(const dbus::ObjectPath& profile_path, + const DictionaryValueCallbackWithoutStatus& callback, + const ErrorCallback& error_callback) override; + void GetEntry(const dbus::ObjectPath& profile_path, + const std::string& entry_path, + const DictionaryValueCallbackWithoutStatus& callback, + const ErrorCallback& error_callback) override; + void DeleteEntry(const dbus::ObjectPath& profile_path, + const std::string& entry_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override; + + TestInterface* GetTestInterface() override { return NULL; } protected: - virtual void Init(dbus::Bus* bus) override { - bus_ = bus; - } + void Init(dbus::Bus* bus) override { bus_ = bus; } private: typedef std::map<std::string, ShillClientHelper*> HelperMap; diff --git a/chromeos/dbus/shill_profile_client.h b/chromeos/dbus/shill_profile_client.h index 9c0f925..885151f 100644 --- a/chromeos/dbus/shill_profile_client.h +++ b/chromeos/dbus/shill_profile_client.h @@ -87,7 +87,7 @@ class CHROMEOS_EXPORT ShillProfileClient : public DBusClient { virtual ~TestInterface() {} }; - virtual ~ShillProfileClient(); + ~ShillProfileClient() override; // Factory function, creates a new instance which is owned by the caller. // For normal usage, access the singleton via DBusThreadManager::Get(). diff --git a/chromeos/dbus/shill_profile_client_unittest.cc b/chromeos/dbus/shill_profile_client_unittest.cc index 223cd73..e9fa142 100644 --- a/chromeos/dbus/shill_profile_client_unittest.cc +++ b/chromeos/dbus/shill_profile_client_unittest.cc @@ -38,7 +38,7 @@ class ShillProfileClientTest : public ShillClientUnittestBase { dbus::ObjectPath(kDefaultProfilePath)) { } - virtual void SetUp() { + void SetUp() override { ShillClientUnittestBase::SetUp(); // Create a client with the mock bus. client_.reset(ShillProfileClient::Create()); @@ -47,9 +47,7 @@ class ShillProfileClientTest : public ShillClientUnittestBase { message_loop_.RunUntilIdle(); } - virtual void TearDown() { - ShillClientUnittestBase::TearDown(); - } + void TearDown() override { ShillClientUnittestBase::TearDown(); } protected: scoped_ptr<ShillProfileClient> client_; diff --git a/chromeos/dbus/shill_service_client.cc b/chromeos/dbus/shill_service_client.cc index 6d81c24..7d1746f 100644 --- a/chromeos/dbus/shill_service_client.cc +++ b/chromeos/dbus/shill_service_client.cc @@ -58,7 +58,7 @@ class ShillServiceClientImpl : public ShillServiceClient { weak_ptr_factory_(this) { } - virtual ~ShillServiceClientImpl() { + ~ShillServiceClientImpl() override { for (HelperMap::iterator iter = helpers_.begin(); iter != helpers_.end(); ++iter) { ShillClientHelper* helper = iter->second; @@ -69,20 +69,20 @@ class ShillServiceClientImpl : public ShillServiceClient { } } - virtual void AddPropertyChangedObserver( + void AddPropertyChangedObserver( const dbus::ObjectPath& service_path, ShillPropertyChangedObserver* observer) override { GetHelper(service_path)->AddPropertyChangedObserver(observer); } - virtual void RemovePropertyChangedObserver( + void RemovePropertyChangedObserver( const dbus::ObjectPath& service_path, ShillPropertyChangedObserver* observer) override { GetHelper(service_path)->RemovePropertyChangedObserver(observer); } - virtual void GetProperties(const dbus::ObjectPath& service_path, - const DictionaryValueCallback& callback) override { + void GetProperties(const dbus::ObjectPath& service_path, + const DictionaryValueCallback& callback) override { dbus::MethodCall method_call(shill::kFlimflamServiceInterface, shill::kGetPropertiesFunction); GetHelper(service_path)->CallDictionaryValueMethodWithErrorCallback( @@ -92,11 +92,11 @@ class ShillServiceClientImpl : public ShillServiceClient { service_path, callback)); } - virtual void SetProperty(const dbus::ObjectPath& service_path, - const std::string& name, - const base::Value& value, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void SetProperty(const dbus::ObjectPath& service_path, + const std::string& name, + const base::Value& value, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamServiceInterface, shill::kSetPropertyFunction); dbus::MessageWriter writer(&method_call); @@ -107,10 +107,10 @@ class ShillServiceClientImpl : public ShillServiceClient { error_callback); } - virtual void SetProperties(const dbus::ObjectPath& service_path, - const base::DictionaryValue& properties, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void SetProperties(const dbus::ObjectPath& service_path, + const base::DictionaryValue& properties, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamServiceInterface, shill::kSetPropertiesFunction); dbus::MessageWriter writer(&method_call); @@ -120,10 +120,10 @@ class ShillServiceClientImpl : public ShillServiceClient { error_callback); } - virtual void ClearProperty(const dbus::ObjectPath& service_path, - const std::string& name, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void ClearProperty(const dbus::ObjectPath& service_path, + const std::string& name, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamServiceInterface, shill::kClearPropertyFunction); dbus::MessageWriter writer(&method_call); @@ -133,11 +133,10 @@ class ShillServiceClientImpl : public ShillServiceClient { error_callback); } - - virtual void ClearProperties(const dbus::ObjectPath& service_path, - const std::vector<std::string>& names, - const ListValueCallback& callback, - const ErrorCallback& error_callback) override { + void ClearProperties(const dbus::ObjectPath& service_path, + const std::vector<std::string>& names, + const ListValueCallback& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamServiceInterface, shill::kClearPropertiesFunction); dbus::MessageWriter writer(&method_call); @@ -148,18 +147,18 @@ class ShillServiceClientImpl : public ShillServiceClient { error_callback); } - virtual void Connect(const dbus::ObjectPath& service_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void Connect(const dbus::ObjectPath& service_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamServiceInterface, shill::kConnectFunction); GetHelper(service_path)->CallVoidMethodWithErrorCallback( &method_call, callback, error_callback); } - virtual void Disconnect(const dbus::ObjectPath& service_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void Disconnect(const dbus::ObjectPath& service_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamServiceInterface, shill::kDisconnectFunction); GetHelper(service_path)->CallVoidMethodWithErrorCallback(&method_call, @@ -167,9 +166,9 @@ class ShillServiceClientImpl : public ShillServiceClient { error_callback); } - virtual void Remove(const dbus::ObjectPath& service_path, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void Remove(const dbus::ObjectPath& service_path, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamServiceInterface, shill::kRemoveServiceFunction); GetHelper(service_path)->CallVoidMethodWithErrorCallback(&method_call, @@ -177,11 +176,10 @@ class ShillServiceClientImpl : public ShillServiceClient { error_callback); } - virtual void ActivateCellularModem( - const dbus::ObjectPath& service_path, - const std::string& carrier, - const base::Closure& callback, - const ErrorCallback& error_callback) override { + void ActivateCellularModem(const dbus::ObjectPath& service_path, + const std::string& carrier, + const base::Closure& callback, + const ErrorCallback& error_callback) override { dbus::MethodCall method_call(shill::kFlimflamServiceInterface, shill::kActivateCellularModemFunction); dbus::MessageWriter writer(&method_call); @@ -191,7 +189,7 @@ class ShillServiceClientImpl : public ShillServiceClient { error_callback); } - virtual void CompleteCellularActivation( + void CompleteCellularActivation( const dbus::ObjectPath& service_path, const base::Closure& callback, const ErrorCallback& error_callback) override { @@ -203,7 +201,7 @@ class ShillServiceClientImpl : public ShillServiceClient { error_callback); } - virtual void GetLoadableProfileEntries( + void GetLoadableProfileEntries( const dbus::ObjectPath& service_path, const DictionaryValueCallback& callback) override { dbus::MethodCall method_call(shill::kFlimflamServiceInterface, @@ -215,14 +213,12 @@ class ShillServiceClientImpl : public ShillServiceClient { service_path, callback)); } - virtual ShillServiceClient::TestInterface* GetTestInterface() override { + ShillServiceClient::TestInterface* GetTestInterface() override { return NULL; } protected: - virtual void Init(dbus::Bus* bus) override { - bus_ = bus; - } + void Init(dbus::Bus* bus) override { bus_ = bus; } private: typedef std::map<std::string, ShillClientHelper*> HelperMap; diff --git a/chromeos/dbus/shill_service_client.h b/chromeos/dbus/shill_service_client.h index a2e8950..0bb7db4 100644 --- a/chromeos/dbus/shill_service_client.h +++ b/chromeos/dbus/shill_service_client.h @@ -88,7 +88,7 @@ class CHROMEOS_EXPORT ShillServiceClient : public DBusClient { protected: virtual ~TestInterface() {} }; - virtual ~ShillServiceClient(); + ~ShillServiceClient() override; // Factory function, creates a new instance which is owned by the caller. // For normal usage, access the singleton via DBusThreadManager::Get(). diff --git a/chromeos/dbus/shill_service_client_unittest.cc b/chromeos/dbus/shill_service_client_unittest.cc index 414adac..0e03578 100644 --- a/chromeos/dbus/shill_service_client_unittest.cc +++ b/chromeos/dbus/shill_service_client_unittest.cc @@ -30,7 +30,7 @@ class ShillServiceClientTest : public ShillClientUnittestBase { dbus::ObjectPath(kExampleServicePath)) { } - virtual void SetUp() { + void SetUp() override { ShillClientUnittestBase::SetUp(); // Create a client with the mock bus. client_.reset(ShillServiceClient::Create()); @@ -39,9 +39,7 @@ class ShillServiceClientTest : public ShillClientUnittestBase { message_loop_.RunUntilIdle(); } - virtual void TearDown() { - ShillClientUnittestBase::TearDown(); - } + void TearDown() override { ShillClientUnittestBase::TearDown(); } protected: scoped_ptr<ShillServiceClient> client_; diff --git a/chromeos/dbus/sms_client.cc b/chromeos/dbus/sms_client.cc index 7c0d218..fc8e874 100644 --- a/chromeos/dbus/sms_client.cc +++ b/chromeos/dbus/sms_client.cc @@ -32,12 +32,12 @@ class SMSClientImpl : public SMSClient { public: SMSClientImpl() : bus_(NULL), weak_ptr_factory_(this) {} - virtual ~SMSClientImpl() {} + ~SMSClientImpl() override {} // Calls GetAll method. |callback| is called after the method call succeeds. - virtual void GetAll(const std::string& service_name, - const dbus::ObjectPath& object_path, - const GetAllCallback& callback) override { + void GetAll(const std::string& service_name, + const dbus::ObjectPath& object_path, + const GetAllCallback& callback) override { dbus::ObjectProxy *proxy = bus_->GetObjectProxy(service_name, object_path); dbus::MethodCall method_call(dbus::kDBusPropertiesInterface, dbus::kDBusPropertiesGetAll); @@ -50,9 +50,7 @@ class SMSClientImpl : public SMSClient { } protected: - virtual void Init(dbus::Bus* bus) override { - bus_ = bus; - } + void Init(dbus::Bus* bus) override { bus_ = bus; } private: // Handles responses of GetAll method calls. diff --git a/chromeos/dbus/sms_client.h b/chromeos/dbus/sms_client.h index 507bfde..acc6b7e 100644 --- a/chromeos/dbus/sms_client.h +++ b/chromeos/dbus/sms_client.h @@ -30,7 +30,7 @@ class CHROMEOS_EXPORT SMSClient : public DBusClient { public: typedef base::Callback<void(const base::DictionaryValue& sms)> GetAllCallback; - virtual ~SMSClient(); + ~SMSClient() override; // Factory function, creates a new instance and returns ownership. // For normal usage, access the singleton via DBusThreadManager::Get(). diff --git a/chromeos/dbus/system_clock_client.cc b/chromeos/dbus/system_clock_client.cc index 9614c59..862cdc6 100644 --- a/chromeos/dbus/system_clock_client.cc +++ b/chromeos/dbus/system_clock_client.cc @@ -24,22 +24,21 @@ class SystemClockClientImpl : public SystemClockClient { system_clock_proxy_(NULL), weak_ptr_factory_(this) {} - virtual ~SystemClockClientImpl() { - } + ~SystemClockClientImpl() override {} - virtual void AddObserver(Observer* observer) override { + void AddObserver(Observer* observer) override { observers_.AddObserver(observer); } - virtual void RemoveObserver(Observer* observer) override { + void RemoveObserver(Observer* observer) override { observers_.RemoveObserver(observer); } - virtual bool HasObserver(const Observer* observer) const override { + bool HasObserver(const Observer* observer) const override { return observers_.HasObserver(observer); } - virtual void SetTime(int64 time_in_seconds) override { + void SetTime(int64 time_in_seconds) override { // Always try to set the time, because |can_set_time_| may be stale. dbus::MethodCall method_call(system_clock::kSystemClockInterface, system_clock::kSystemClockSet); @@ -50,10 +49,10 @@ class SystemClockClientImpl : public SystemClockClient { dbus::ObjectProxy::EmptyResponseCallback()); } - virtual bool CanSetTime() override { return can_set_time_; } + bool CanSetTime() override { return can_set_time_; } protected: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { system_clock_proxy_ = bus->GetObjectProxy( system_clock::kSystemClockServiceName, dbus::ObjectPath(system_clock::kSystemClockServicePath)); diff --git a/chromeos/dbus/system_clock_client.h b/chromeos/dbus/system_clock_client.h index 8380ff1..3b84501 100644 --- a/chromeos/dbus/system_clock_client.h +++ b/chromeos/dbus/system_clock_client.h @@ -28,7 +28,7 @@ class CHROMEOS_EXPORT SystemClockClient : public DBusClient { virtual ~Observer() {} }; - virtual ~SystemClockClient(); + ~SystemClockClient() override; // Adds the given observer. virtual void AddObserver(Observer* observer) = 0; diff --git a/chromeos/dbus/update_engine_client.cc b/chromeos/dbus/update_engine_client.cc index 321b247..28d5b00 100644 --- a/chromeos/dbus/update_engine_client.cc +++ b/chromeos/dbus/update_engine_client.cc @@ -86,24 +86,22 @@ class UpdateEngineClientImpl : public UpdateEngineClient { UpdateEngineClientImpl() : update_engine_proxy_(NULL), last_status_(), weak_ptr_factory_(this) {} - virtual ~UpdateEngineClientImpl() { - } + ~UpdateEngineClientImpl() override {} // UpdateEngineClient implementation: - virtual void AddObserver(Observer* observer) override { + void AddObserver(Observer* observer) override { observers_.AddObserver(observer); } - virtual void RemoveObserver(Observer* observer) override { + void RemoveObserver(Observer* observer) override { observers_.RemoveObserver(observer); } - virtual bool HasObserver(const Observer* observer) const override { + bool HasObserver(const Observer* observer) const override { return observers_.HasObserver(observer); } - virtual void RequestUpdateCheck( - const UpdateCheckCallback& callback) override { + void RequestUpdateCheck(const UpdateCheckCallback& callback) override { dbus::MethodCall method_call( update_engine::kUpdateEngineInterface, update_engine::kAttemptUpdate); @@ -120,7 +118,7 @@ class UpdateEngineClientImpl : public UpdateEngineClient { callback)); } - virtual void RebootAfterUpdate() override { + void RebootAfterUpdate() override { dbus::MethodCall method_call( update_engine::kUpdateEngineInterface, update_engine::kRebootIfNeeded); @@ -133,7 +131,7 @@ class UpdateEngineClientImpl : public UpdateEngineClient { weak_ptr_factory_.GetWeakPtr())); } - virtual void Rollback() override { + void Rollback() override { VLOG(1) << "Requesting a rollback"; dbus::MethodCall method_call( update_engine::kUpdateEngineInterface, @@ -148,9 +146,7 @@ class UpdateEngineClientImpl : public UpdateEngineClient { weak_ptr_factory_.GetWeakPtr())); } - - virtual void CanRollbackCheck( - const RollbackCheckCallback& callback) override { + void CanRollbackCheck(const RollbackCheckCallback& callback) override { dbus::MethodCall method_call( update_engine::kUpdateEngineInterface, update_engine::kCanRollback); @@ -164,12 +160,10 @@ class UpdateEngineClientImpl : public UpdateEngineClient { callback)); } - virtual Status GetLastStatus() override { - return last_status_; - } + Status GetLastStatus() override { return last_status_; } - virtual void SetChannel(const std::string& target_channel, - bool is_powerwash_allowed) override { + void SetChannel(const std::string& target_channel, + bool is_powerwash_allowed) override { if (!IsValidChannel(target_channel)) { LOG(ERROR) << "Invalid channel name: " << target_channel; return; @@ -192,8 +186,8 @@ class UpdateEngineClientImpl : public UpdateEngineClient { weak_ptr_factory_.GetWeakPtr())); } - virtual void GetChannel(bool get_current_channel, - const GetChannelCallback& callback) override { + void GetChannel(bool get_current_channel, + const GetChannelCallback& callback) override { dbus::MethodCall method_call( update_engine::kUpdateEngineInterface, update_engine::kGetChannel); @@ -211,7 +205,7 @@ class UpdateEngineClientImpl : public UpdateEngineClient { } protected: - virtual void Init(dbus::Bus* bus) override { + void Init(dbus::Bus* bus) override { update_engine_proxy_ = bus->GetObjectProxy( update_engine::kUpdateEngineServiceName, dbus::ObjectPath(update_engine::kUpdateEngineServicePath)); @@ -409,33 +403,29 @@ class UpdateEngineClientStubImpl : public UpdateEngineClient { target_channel_(kReleaseChannelBeta) {} // UpdateEngineClient implementation: - virtual void Init(dbus::Bus* bus) override {} - virtual void AddObserver(Observer* observer) override {} - virtual void RemoveObserver(Observer* observer) override {} - virtual bool HasObserver(const Observer* observer) const override { - return false; - } + void Init(dbus::Bus* bus) override {} + void AddObserver(Observer* observer) override {} + void RemoveObserver(Observer* observer) override {} + bool HasObserver(const Observer* observer) const override { return false; } - virtual void RequestUpdateCheck( - const UpdateCheckCallback& callback) override { + void RequestUpdateCheck(const UpdateCheckCallback& callback) override { callback.Run(UPDATE_RESULT_NOTIMPLEMENTED); } - virtual void RebootAfterUpdate() override {} - virtual void Rollback() override {} - virtual void CanRollbackCheck( - const RollbackCheckCallback& callback) override { + void RebootAfterUpdate() override {} + void Rollback() override {} + void CanRollbackCheck(const RollbackCheckCallback& callback) override { callback.Run(true); } - virtual Status GetLastStatus() override { return Status(); } - virtual void SetChannel(const std::string& target_channel, - bool is_powerwash_allowed) override { + Status GetLastStatus() override { return Status(); } + void SetChannel(const std::string& target_channel, + bool is_powerwash_allowed) override { VLOG(1) << "Requesting to set channel: " << "target_channel=" << target_channel << ", " << "is_powerwash_allowed=" << is_powerwash_allowed; target_channel_ = target_channel; } - virtual void GetChannel(bool get_current_channel, - const GetChannelCallback& callback) override { + void GetChannel(bool get_current_channel, + const GetChannelCallback& callback) override { VLOG(1) << "Requesting to get channel, get_current_channel=" << get_current_channel; if (get_current_channel) @@ -455,26 +445,24 @@ class UpdateEngineClientFakeImpl : public UpdateEngineClientStubImpl { UpdateEngineClientFakeImpl() : weak_factory_(this) { } - virtual ~UpdateEngineClientFakeImpl() { - } + ~UpdateEngineClientFakeImpl() override {} // UpdateEngineClient implementation: - virtual void AddObserver(Observer* observer) override { + void AddObserver(Observer* observer) override { if (observer) observers_.AddObserver(observer); } - virtual void RemoveObserver(Observer* observer) override { + void RemoveObserver(Observer* observer) override { if (observer) observers_.RemoveObserver(observer); } - virtual bool HasObserver(const Observer* observer) const override { + bool HasObserver(const Observer* observer) const override { return observers_.HasObserver(observer); } - virtual void RequestUpdateCheck( - const UpdateCheckCallback& callback) override { + void RequestUpdateCheck(const UpdateCheckCallback& callback) override { if (last_status_.status != UPDATE_STATUS_IDLE) { callback.Run(UPDATE_RESULT_FAILED); return; @@ -491,7 +479,7 @@ class UpdateEngineClientFakeImpl : public UpdateEngineClientStubImpl { base::TimeDelta::FromMilliseconds(kStateTransitionDefaultDelayMs)); } - virtual Status GetLastStatus() override { return last_status_; } + Status GetLastStatus() override { return last_status_; } private: void StateTransition() { diff --git a/chromeos/dbus/update_engine_client.h b/chromeos/dbus/update_engine_client.h index c92ddca..99de142 100644 --- a/chromeos/dbus/update_engine_client.h +++ b/chromeos/dbus/update_engine_client.h @@ -69,7 +69,7 @@ class CHROMEOS_EXPORT UpdateEngineClient : public DBusClient { virtual void UpdateStatusChanged(const Status& status) {} }; - virtual ~UpdateEngineClient(); + ~UpdateEngineClient() override; // Adds and removes the observer. virtual void AddObserver(Observer* observer) = 0; |